Skip to content

Commit

Permalink
Merge pull request openwebwork#2450 from drgrice1/delete-lti-course-m…
Browse files Browse the repository at this point in the history
…ap-with-course

Delete an LTI course map entry for a course if that course is deleted.
  • Loading branch information
Alex-Jordan authored Jul 9, 2024
2 parents 745d4ad + f562d7e commit 580ce22
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/WeBWorK/Utils/CourseManagement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,9 @@ sub deleteCourse {
my $create_db_result = $db->delete_tables;
die "$courseID: course database deletion failed.\n" unless $create_db_result;

# If this course has an entry in the LTI course map, then delete it also.
$db->deleteLTICourseMapWhere({ course_id => $courseID });

##### step 2: delete course directory structure #####

my @courseDirNames = sort { $courseDirs{$a} cmp $courseDirs{$b} } keys %courseDirs;
Expand Down

0 comments on commit 580ce22

Please sign in to comment.