From 08a38fef7eed53d38ff4c18b1def9d30c430bfba Mon Sep 17 00:00:00 2001 From: Alex Jordan Date: Mon, 6 Apr 2026 00:31:23 -0700 Subject: [PATCH] show desired course ID in messages for when course does not exist --- lib/WeBWorK.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/WeBWorK.pm b/lib/WeBWorK.pm index a80dd817ce..85333bd79f 100644 --- a/lib/WeBWorK.pm +++ b/lib/WeBWorK.pm @@ -140,10 +140,11 @@ async sub dispatch ($c) { # This route could have the courseID set, but does not need authentication. return 1 if $c->current_route eq 'saml2_metadata'; - return (0, 'This course does not exist.') + return (0, "The course $routeCaptures{courseID} does not exist.") unless (-e $ce->{courseDirs}{root} || -e "$ce->{webwork_courses_dir}/$ce->{admin_course_id}/archives/$routeCaptures{courseID}.tar.gz"); - return (0, 'This course has been archived and closed.') unless -e $ce->{courseDirs}{root}; + return (0, "The course $routeCaptures{courseID} has been archived and closed.") + unless -e $ce->{courseDirs}{root}; my $db = WeBWorK::DB->new($ce); debug("(here's the DB handle: $db)\n");