From 87c342864c83421da6e600914d7ba63a12578d1f Mon Sep 17 00:00:00 2001 From: Peter Staab Date: Wed, 24 Jan 2024 15:44:18 -0500 Subject: [PATCH] fix typos and add some space for clarify. --- lib/HardcopyRenderedProblem.pm | 1 + lib/WeBWorK/ContentGenerator/Hardcopy.pm | 1 + lib/WeBWorK/Utils/CourseManagement.pm | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/HardcopyRenderedProblem.pm b/lib/HardcopyRenderedProblem.pm index a53035ee85..524fbb3af0 100644 --- a/lib/HardcopyRenderedProblem.pm +++ b/lib/HardcopyRenderedProblem.pm @@ -175,6 +175,7 @@ sub generate_hardcopy_tex { push(@$errors, qq{Failed to create zip archive of directory "$working_dir"}) unless ($zip->writeToFileNamed($working_dir->dirname->child('hardcopy.zip')->to_string) == AZ_OK); + return; } diff --git a/lib/WeBWorK/ContentGenerator/Hardcopy.pm b/lib/WeBWorK/ContentGenerator/Hardcopy.pm index 5fa55db2c9..4456ca0a8c 100644 --- a/lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ b/lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -739,6 +739,7 @@ sub generate_hardcopy_tex ($c, $temp_dir_path, $final_file_basename) { $c->add_error('Failed to create zip archive of directory "', $c->tag('code', $bundle_path), '"'); return "$bundle_path/$src_name"; } + return $zip_file; } diff --git a/lib/WeBWorK/Utils/CourseManagement.pm b/lib/WeBWorK/Utils/CourseManagement.pm index 60303bf53e..88ddb6c207 100644 --- a/lib/WeBWorK/Utils/CourseManagement.pm +++ b/lib/WeBWorK/Utils/CourseManagement.pm @@ -282,7 +282,7 @@ sub addCourse { # try to create it eval { Mojo::File($courseDir)->make_path }; - warn "Failed to create $courseDirName directory '$courseDir': $!. " + warn "Failed to create $courseDirName directory '$courseDir': $@. " . "You will have to create this directory manually." if $@; } @@ -659,7 +659,7 @@ sub deleteCourse { # try to delete the directory debug("Going to delete $courseDir...\n"); eval { Mojo::File->new($courseDir)->remove_tree }; - warn "A error occurred when deleting $courseDir" if $@; + warn "An error occurred when deleting $courseDir" if $@; } else { debug("courseDir $courseDir was already deleted.\n"); }