From 6794d6a775f5742b67843c771d1195688d2374d5 Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Sat, 6 Jul 2024 08:48:31 +0200 Subject: [PATCH 1/2] Adds better checks for no students --- adm/gits/datintro-setup.nw | 5 +++++ modules/git/grading/grade.sh.nw | 3 +++ modules/latex/grading/grade.sh.nw | 3 +++ 3 files changed, 11 insertions(+) diff --git a/adm/gits/datintro-setup.nw b/adm/gits/datintro-setup.nw index f0b22c6..edd687d 100644 --- a/adm/gits/datintro-setup.nw +++ b/adm/gits/datintro-setup.nw @@ -110,6 +110,11 @@ for round in ${COURSE_CODE_ORG}; do users=$(mktemp) extract_users ${canvas_id} > ${users} + if [[ ! -s ${users} ]]; then + rm $users + continue + fi + add_to_org ${gits_id} ${users} rm $users done diff --git a/modules/git/grading/grade.sh.nw b/modules/git/grading/grade.sh.nw index a875940..550c18d 100644 --- a/modules/git/grading/grade.sh.nw +++ b/modules/git/grading/grade.sh.nw @@ -103,6 +103,9 @@ grade_students() { local github=$(echo $course | cut -f 2 -d :) local students_w_times=$(students_with_grading_time "$canvas" "$assignm") + if [[ -z "$students_w_times" ]]; then + continue + fi local repos=$(clone_repos $github $(echo "$students_w_times" | cut -f 1)) diff --git a/modules/latex/grading/grade.sh.nw b/modules/latex/grading/grade.sh.nw index 9d0d752..1e81b78 100644 --- a/modules/latex/grading/grade.sh.nw +++ b/modules/latex/grading/grade.sh.nw @@ -188,6 +188,9 @@ grade_students() { local github=$(echo $course | cut -f 2 -d :) local students_w_times=$(students_with_grading_time "$canvas" "$assignm") + if [[ -z "$students_w_times" ]]; then + continue + fi local repos=$(clone_repos $github $(echo "$students_w_times" | cut -f 1)) From d5c972b4ef6e14780604d51528b7547f2c905273 Mon Sep 17 00:00:00 2001 From: Daniel Bosk Date: Sat, 17 Aug 2024 13:54:34 +0200 Subject: [PATCH 2/2] Update guide.md Adds a video option for installing WSL2 on Windows. --- modules/ssh/guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ssh/guide.md b/modules/ssh/guide.md index 6cc11bb..857cc6e 100644 --- a/modules/ssh/guide.md +++ b/modules/ssh/guide.md @@ -41,6 +41,7 @@ also have a command-line interface, it's not compatible with a UNIX-like interface. If you run Windows 10, just go ahead and install Windows Subsystem for Linux (WSL) to run Ubuntu in Windows. There are various guides: + - [Installing WSL2 on Windows][wsl2install] (FeedbackFruits, recommended) - [Microsoft's installation guide][ms-wsl] - [Ubuntu's installation guide][ubuntu-wsl] - [omg!ubuntu!'s guide][WSL2] @@ -48,6 +49,7 @@ for Linux (WSL) to run Ubuntu in Windows. There are various guides: Pick your favourite! +[wsl2install]: https://eu.feedbackfruits.com/courses/activity-course/0ccfb0cc-3274-470f-9def-0ddec7bd1c73 [ms-wsl]: https://aka.ms/wsl2-install [ubuntu-wsl]: https://ubuntu.com/tutorials/ubuntu-on-windows#1-overview [WSL]: https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/