You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
! egrep " *[0-9]+.* history *>>? *([^ ]+/)?history.txt" $filepath > /dev/null; then
168
+
return 1
169
+
fi
170
+
return 0
171
+
fi
117
172
173
+
# Provide specific feedback based on the failure mode
118
174
if ! [ -d $path ]; then
119
-
#echo "Can't find datintro directory in directory Publicin your home directory."
175
+
echo "Can't find the 'datintro' directory in the 'Public' directory in your home directory. Please ensure you create it in the correct location (~/Public/datintro)."
120
176
return 1
121
177
elif ! [ -f $filepath ]; then
122
-
#echo "Can't find history.txt located in directory Public/datintro in your home directory."
178
+
echo "Can't find the file 'history.txt' in the 'Public/datintro' directory in your home directory. Please ensure you create it in the correct location (~/Public/datintro/history.txt)."
179
+
return 1
180
+
elif ! [ -r $filepath ]; then
181
+
echo "The file 'Public/datintro/history.txt' exists but cannot be read. This usually means you created the file outside the 'Public' directory and then moved it there. Files must be created directly in the 'Public' directory to inherit the correct permissions. Please remove the 'datintro' directory and create it again inside 'Public', then create the 'history.txt' file there. Warning: Never remove the 'Public' directory itself."
#echo "Found Public/datintro/history.txt in your home directory, but it seems to have the wrong format."
186
+
echo "Found 'Public/datintro/history.txt' in your home directory, but it doesn't have the correct content. Please read the assignment instructions carefully and ensure you redirect the output of the 'history' command to the file."
128
187
return 1
129
188
fi
130
189
}
@@ -138,10 +197,15 @@ the first argument (it's a regex passed to [[canvaslms]]). The remaining
138
197
arguments constitutes a list of courses.
139
198
140
199
To grade, we iterate through the remaining students, given by
141
-
[[students_to_grade]] (from [[common.sh]]).
142
-
We get the home directories of the students through [[get_home_directory]].
0 commit comments