Skip to content

Commit fb3b720

Browse files
authored
Merge pull request #2943 from Alex-Jordan/archive
show desired course ID in messages for when course does not exist
2 parents 30d712a + 08a38fe commit fb3b720

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/WeBWorK.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,11 @@ async sub dispatch ($c) {
140140
# This route could have the courseID set, but does not need authentication.
141141
return 1 if $c->current_route eq 'saml2_metadata';
142142

143-
return (0, 'This course does not exist.')
143+
return (0, "The course $routeCaptures{courseID} does not exist.")
144144
unless (-e $ce->{courseDirs}{root}
145145
|| -e "$ce->{webwork_courses_dir}/$ce->{admin_course_id}/archives/$routeCaptures{courseID}.tar.gz");
146-
return (0, 'This course has been archived and closed.') unless -e $ce->{courseDirs}{root};
146+
return (0, "The course $routeCaptures{courseID} has been archived and closed.")
147+
unless -e $ce->{courseDirs}{root};
147148

148149
my $db = WeBWorK::DB->new($ce);
149150
debug("(here's the DB handle: $db)\n");

0 commit comments

Comments
 (0)