From b54c4705597def884958cfa0b663a1caaff779f6 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Wed, 20 Nov 2024 20:50:46 -0600 Subject: [PATCH 1/2] Switch to using Perl::Tidy version 20240903 (the latest). This commit just makes the changes in the scripts, but does not yet run perltidy with the new setup. That will be done in the next commit. Note that the `-vxl='q'` option has been removed. This option disables vertical alignment of qw quotes. Alignment of qw quotes was added in version 20220613 (the previous version), and this option to disable that was added to the webwork2 (and pg) perltidy configuration to avoid the alignment because it changes so many files. However, I don't think that alignment is bad, and I am tired of adding new options to prevent code changes. With this newer version another option would be needed to prevent the new signed number alignment (although that affects PG much more than webwork2). Note that the `bin/dev_scripts/run-perltidy.pl` script now insists on this specific version of perltidy instead of this version or newer. This is because every time a new version of perltidy comes out, it changes things. So developers really need to be using the same version or it will not be consistent with the github workflow result. Also, the version requirement in the check_modules.pl script has been removed. Only developers need a specific version of perltidy. Those running webwork2 can use other versions. This is only used for formatting problems in the PG problem editor, and using other versions may result in slightly different formatting there, but that is not so consequential that we need to require a specific version. Note that this change depends on the corresponding pg pull request, because in that pull request the `-vxl='q'` option has been removed. Otherwise version 20220613 or newer of perltidy would still be needed. --- .github/workflows/check-formats.yml | 2 +- .perltidyrc | 1 - bin/check_modules.pl | 1 - bin/dev_scripts/run-perltidy.pl | 5 ++--- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-formats.yml b/.github/workflows/check-formats.yml index e94ca09ae2..092dabe309 100644 --- a/.github/workflows/check-formats.yml +++ b/.github/workflows/check-formats.yml @@ -20,7 +20,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - name: Install dependencies - run: cpanm -n Perl::Tidy@20220613 + run: cpanm -n Perl::Tidy@20240903 - name: Run perltidy shell: bash run: | diff --git a/.perltidyrc b/.perltidyrc index 4620751c6f..8314b7c173 100644 --- a/.perltidyrc +++ b/.perltidyrc @@ -20,4 +20,3 @@ -nlop # No logical padding (this causes mixed tabs and spaces) -wn # Weld nested containers -xci # Extended continuation indentation --vxl='q' # No vertical alignment of qw quotes diff --git a/bin/check_modules.pl b/bin/check_modules.pl index 428cb83094..8731bc7504 100755 --- a/bin/check_modules.pl +++ b/bin/check_modules.pl @@ -165,7 +165,6 @@ =head1 DESCRIPTION 'LWP::Protocol::https' => 6.06, 'Mojolicious' => 9.34, 'Net::SSLeay' => 1.46, - 'Perl::Tidy' => 20220613, 'SQL::Abstract' => 2.000000 ); diff --git a/bin/dev_scripts/run-perltidy.pl b/bin/dev_scripts/run-perltidy.pl index 1c882f608f..70f60faece 100755 --- a/bin/dev_scripts/run-perltidy.pl +++ b/bin/dev_scripts/run-perltidy.pl @@ -63,9 +63,8 @@ =head1 OPTIONS my $webwork_root = curfile->dirname->dirname->dirname; -die "Version 20220613 or newer of perltidy is required for this script.\n" - . "The installed version is $Perl::Tidy::VERSION.\n" - unless $Perl::Tidy::VERSION >= 20220613; +die "Version 20240903 of perltidy is required for this script.\nThe installed version is $Perl::Tidy::VERSION.\n" + unless $Perl::Tidy::VERSION == 20240903; die "The .perltidyrc file in the webwork root directory is not readable.\n" unless -r "$webwork_root/.perltidyrc"; From 2349421ef306040598db2b68527bd00921186a49 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sun, 20 Oct 2024 19:57:31 -0500 Subject: [PATCH 2/2] Run perltidy on the code with the new version. --- bin/crypt_passwords_in_classlist.pl | 2 +- bin/dev_scripts/PODtoHTML.pm | 4 ++-- bin/dev_scripts/generate-ww-pg-pod.pl | 4 ++-- bin/download-OPL-metadata-release.pl | 2 +- bin/dump-OPL-tables.pl | 2 +- bin/dump-past-answers.pl | 2 +- bin/generate-OPL-set-def-lists.pl | 2 +- bin/importClassList.pl | 4 ++-- bin/load-OPL-global-statistics.pl | 2 +- bin/restore-OPL-tables.pl | 2 +- bin/test_library_build.pl | 2 +- bin/update-OPL-statistics.pl | 2 +- bin/updateOPLextras.pl | 2 +- bin/upgrade-database-to-utf8mb4.pl | 2 +- bin/upgrade_admin_db.pl | 2 +- bin/upload-OPL-statistics.pl | 2 +- lib/FormatRenderedProblem.pm | 4 ++-- lib/HardcopyRenderedProblem.pm | 5 ++--- lib/Mojolicious/WeBWorK.pm | 2 +- lib/WeBWorK/AchievementEvaluator.pm | 2 +- lib/WeBWorK/AchievementItems/AddNewTestGW.pm | 4 ++-- lib/WeBWorK/AchievementItems/DoubleProb.pm | 4 ++-- lib/WeBWorK/AchievementItems/DoubleSet.pm | 4 ++-- lib/WeBWorK/AchievementItems/DuplicateProb.pm | 4 ++-- lib/WeBWorK/AchievementItems/ExtendDueDate.pm | 4 ++-- .../AchievementItems/ExtendDueDateGW.pm | 4 ++-- .../AchievementItems/FullCreditProb.pm | 4 ++-- lib/WeBWorK/AchievementItems/FullCreditSet.pm | 4 ++-- .../AchievementItems/HalfCreditProb.pm | 4 ++-- lib/WeBWorK/AchievementItems/HalfCreditSet.pm | 4 ++-- lib/WeBWorK/AchievementItems/ReducedCred.pm | 4 ++-- .../ResetIncorrectAttempts.pm | 4 ++-- lib/WeBWorK/AchievementItems/ResurrectGW.pm | 4 ++-- lib/WeBWorK/AchievementItems/ResurrectHW.pm | 4 ++-- .../AchievementItems/SuperExtendDueDate.pm | 4 ++-- lib/WeBWorK/Authen.pm | 4 ++-- lib/WeBWorK/Authen/LDAP.pm | 2 +- lib/WeBWorK/Authen/LTI/GradePassback.pm | 2 +- lib/WeBWorK/Authen/LTIAdvanced.pm | 2 +- lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm | 4 ++-- lib/WeBWorK/Authen/LTIAdvantage.pm | 5 ++--- .../Authen/LTIAdvantage/SubmitGrade.pm | 6 +++--- lib/WeBWorK/Authen/Proctor.pm | 2 +- lib/WeBWorK/Authz.pm | 2 +- lib/WeBWorK/ConfigValues.pm | 2 +- lib/WeBWorK/ContentGenerator.pm | 12 ++++++------ lib/WeBWorK/ContentGenerator/GatewayQuiz.pm | 18 +++++++++--------- lib/WeBWorK/ContentGenerator/Grades.pm | 8 ++++---- lib/WeBWorK/ContentGenerator/Hardcopy.pm | 19 +++++++++---------- .../Instructor/AchievementEditor.pm | 2 +- .../Instructor/AchievementList.pm | 2 +- .../AchievementNotificationEditor.pm | 2 +- .../ContentGenerator/Instructor/AddUsers.pm | 2 +- .../Instructor/FileManager.pm | 6 +++--- .../ContentGenerator/Instructor/Index.pm | 4 ++-- .../ContentGenerator/Instructor/LTIUpdate.pm | 2 +- .../Instructor/PGProblemEditor.pm | 8 ++++---- .../Instructor/ProblemGrader.pm | 4 ++-- .../Instructor/ProblemSetDetail.pm | 8 ++++---- .../Instructor/ProblemSetList.pm | 8 ++++---- .../ContentGenerator/Instructor/Scoring.pm | 2 +- .../ContentGenerator/Instructor/SetMaker.pm | 6 +++--- .../Instructor/ShowAnswers.pm | 2 +- .../ContentGenerator/Instructor/Stats.pm | 4 ++-- .../Instructor/StudentProgress.pm | 8 ++++---- .../ContentGenerator/Instructor/UserDetail.pm | 4 ++-- .../ContentGenerator/Instructor/UserList.pm | 8 ++++---- .../Instructor/UsersAssignedToSet.pm | 2 +- lib/WeBWorK/ContentGenerator/LTIAdvanced.pm | 2 +- lib/WeBWorK/ContentGenerator/LTIAdvantage.pm | 8 ++++---- lib/WeBWorK/ContentGenerator/Login.pm | 2 +- lib/WeBWorK/ContentGenerator/LoginProctor.pm | 2 +- lib/WeBWorK/ContentGenerator/Problem.pm | 14 +++++++------- lib/WeBWorK/ContentGenerator/ProblemSet.pm | 10 +++++----- lib/WeBWorK/ContentGenerator/ProblemSets.pm | 6 +++--- lib/WeBWorK/ContentGenerator/ShowMeAnother.pm | 4 ++-- lib/WeBWorK/DB.pm | 4 ++-- lib/WeBWorK/DB/Schema/NewSQL.pm | 2 +- lib/WeBWorK/Debug.pm | 2 +- lib/WeBWorK/File/SetDef.pm | 10 +++++----- lib/WeBWorK/HTML/ScrollingRecordList.pm | 2 +- lib/WeBWorK/Upload.pm | 2 +- lib/WeBWorK/Utils.pm | 2 +- lib/WeBWorK/Utils/CourseManagement.pm | 8 ++++---- lib/WeBWorK/Utils/FilterRecords.pm | 2 +- lib/WeBWorK/Utils/FormatRecords.pm | 2 +- lib/WeBWorK/Utils/ProblemProcessing.pm | 8 ++++---- lib/WeBWorK/Utils/Rendering.pm | 8 ++++---- lib/WeBWorK/Utils/Routes.pm | 2 +- lib/WeBWorK/Utils/Sets.pm | 4 ++-- lib/WeBWorK/Utils/TOTP.pm | 4 ++-- lib/WebworkWebservice/CourseActions.pm | 8 ++++---- lib/WebworkWebservice/ProblemActions.pm | 2 +- lib/WebworkWebservice/RenderProblem.pm | 6 +++--- lib/WebworkWebservice/SetActions.pm | 4 ++-- 95 files changed, 205 insertions(+), 208 deletions(-) diff --git a/bin/crypt_passwords_in_classlist.pl b/bin/crypt_passwords_in_classlist.pl index 88ed9f9fd2..1faa331daa 100755 --- a/bin/crypt_passwords_in_classlist.pl +++ b/bin/crypt_passwords_in_classlist.pl @@ -13,7 +13,7 @@ BEGIN use lib "$ENV{WEBWORK_ROOT}/lib"; -use WeBWorK::Utils qw(cryptPassword); +use WeBWorK::Utils qw(cryptPassword); use WeBWorK::File::Classlist qw(parse_classlist write_classlist); unless (@ARGV == 1) { diff --git a/bin/dev_scripts/PODtoHTML.pm b/bin/dev_scripts/PODtoHTML.pm index 9c7810a55b..1956dedfa0 100644 --- a/bin/dev_scripts/PODtoHTML.pm +++ b/bin/dev_scripts/PODtoHTML.pm @@ -23,8 +23,8 @@ use Pod::Simple::Search; use Mojo::Template; use Mojo::DOM; use Mojo::Collection qw(c); -use File::Path qw(make_path); -use File::Basename qw(dirname); +use File::Path qw(make_path); +use File::Basename qw(dirname); use IO::File; use POSIX qw(strftime); diff --git a/bin/dev_scripts/generate-ww-pg-pod.pl b/bin/dev_scripts/generate-ww-pg-pod.pl index b0e6e06d99..9024801fb5 100755 --- a/bin/dev_scripts/generate-ww-pg-pod.pl +++ b/bin/dev_scripts/generate-ww-pg-pod.pl @@ -65,9 +65,9 @@ =head1 DESCRIPTION use Mojo::Template; use IO::File; use File::Copy; -use File::Path qw(make_path remove_tree); +use File::Path qw(make_path remove_tree); use File::Basename qw(dirname); -use Cwd qw(abs_path); +use Cwd qw(abs_path); use lib dirname(dirname(dirname(__FILE__))) . '/lib'; use lib dirname(__FILE__); diff --git a/bin/download-OPL-metadata-release.pl b/bin/download-OPL-metadata-release.pl index 2c6f3238bf..250e34ea45 100755 --- a/bin/download-OPL-metadata-release.pl +++ b/bin/download-OPL-metadata-release.pl @@ -15,7 +15,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/dump-OPL-tables.pl b/bin/dump-OPL-tables.pl index 27ba37a4af..181188b9da 100755 --- a/bin/dump-OPL-tables.pl +++ b/bin/dump-OPL-tables.pl @@ -22,7 +22,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/dump-past-answers.pl b/bin/dump-past-answers.pl index a386421e62..551bb31d3a 100755 --- a/bin/dump-past-answers.pl +++ b/bin/dump-past-answers.pl @@ -98,7 +98,7 @@ =head1 DESCRIPTION BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/generate-OPL-set-def-lists.pl b/bin/generate-OPL-set-def-lists.pl index dbfaac2b4b..b0a8bb9b2d 100755 --- a/bin/generate-OPL-set-def-lists.pl +++ b/bin/generate-OPL-set-def-lists.pl @@ -26,7 +26,7 @@ =head1 DESCRIPTION BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/importClassList.pl b/bin/importClassList.pl index d1bc2e5da8..7946ed5c85 100755 --- a/bin/importClassList.pl +++ b/bin/importClassList.pl @@ -19,7 +19,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } @@ -31,7 +31,7 @@ BEGIN use WeBWorK::DB qw(check_user_id); use WeBWorK::File::Classlist; -use WeBWorK::Utils qw(cryptPassword); +use WeBWorK::Utils qw(cryptPassword); use WeBWorK::File::Classlist qw(parse_classlist); if ((scalar(@ARGV) != 2)) { diff --git a/bin/load-OPL-global-statistics.pl b/bin/load-OPL-global-statistics.pl index e4da44ad0f..69d3256324 100755 --- a/bin/load-OPL-global-statistics.pl +++ b/bin/load-OPL-global-statistics.pl @@ -21,7 +21,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/restore-OPL-tables.pl b/bin/restore-OPL-tables.pl index ecbe022774..b9ace43884 100755 --- a/bin/restore-OPL-tables.pl +++ b/bin/restore-OPL-tables.pl @@ -22,7 +22,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/test_library_build.pl b/bin/test_library_build.pl index 7952b810dd..b7b7dc9f96 100755 --- a/bin/test_library_build.pl +++ b/bin/test_library_build.pl @@ -2,7 +2,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/update-OPL-statistics.pl b/bin/update-OPL-statistics.pl index 1342477597..c906887748 100755 --- a/bin/update-OPL-statistics.pl +++ b/bin/update-OPL-statistics.pl @@ -19,7 +19,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/updateOPLextras.pl b/bin/updateOPLextras.pl index 93d74cc976..31151eb904 100755 --- a/bin/updateOPLextras.pl +++ b/bin/updateOPLextras.pl @@ -71,7 +71,7 @@ =head1 DESCRIPTION BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/upgrade-database-to-utf8mb4.pl b/bin/upgrade-database-to-utf8mb4.pl index 24240fbfb5..4765ce28db 100755 --- a/bin/upgrade-database-to-utf8mb4.pl +++ b/bin/upgrade-database-to-utf8mb4.pl @@ -126,7 +126,7 @@ =head1 OPTIONS BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/upgrade_admin_db.pl b/bin/upgrade_admin_db.pl index 470a6f4306..15823bfebf 100755 --- a/bin/upgrade_admin_db.pl +++ b/bin/upgrade_admin_db.pl @@ -16,7 +16,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/bin/upload-OPL-statistics.pl b/bin/upload-OPL-statistics.pl index 51cd9a7f94..0fb18f4a3c 100755 --- a/bin/upload-OPL-statistics.pl +++ b/bin/upload-OPL-statistics.pl @@ -19,7 +19,7 @@ BEGIN { use Mojo::File qw(curfile); - use Env qw(WEBWORK_ROOT); + use Env qw(WEBWORK_ROOT); $WEBWORK_ROOT = curfile->dirname->dirname; } diff --git a/lib/FormatRenderedProblem.pm b/lib/FormatRenderedProblem.pm index c681e25249..4ac56a80d6 100644 --- a/lib/FormatRenderedProblem.pm +++ b/lib/FormatRenderedProblem.pm @@ -26,10 +26,10 @@ use warnings; use JSON; use Digest::SHA qw(sha1_base64); -use Mojo::Util qw(xml_escape); +use Mojo::Util qw(xml_escape); use Mojo::DOM; -use WeBWorK::Utils qw(getAssetURL); +use WeBWorK::Utils qw(getAssetURL); use WeBWorK::Utils::LanguageAndDirection qw(get_lang_and_dir get_problem_lang_and_dir); sub formatRenderedProblem { diff --git a/lib/HardcopyRenderedProblem.pm b/lib/HardcopyRenderedProblem.pm index 76380647d0..c3beb3bee7 100644 --- a/lib/HardcopyRenderedProblem.pm +++ b/lib/HardcopyRenderedProblem.pm @@ -29,7 +29,7 @@ use warnings; use File::Path; use String::ShellQuote; use Archive::Zip qw(:ERROR_CODES); -use Mojo::File qw(path tempdir); +use Mojo::File qw(path tempdir); use XML::LibXML; sub hardcopyRenderedProblem { @@ -265,8 +265,7 @@ sub write_problem_tex { $correctTeX .= "\\item\n\$\\displaystyle " . ($rh_result->{answers}{$_}{correct_ans_latex_string} - || "\\text{$rh_result->{answers}{$_}{correct_ans}}") - . "\$\n"; + || "\\text{$rh_result->{answers}{$_}{correct_ans}}") . "\$\n"; } $correctTeX .= "\\end{itemize}}\\par\n"; diff --git a/lib/Mojolicious/WeBWorK.pm b/lib/Mojolicious/WeBWorK.pm index 66281467f9..6f82083271 100644 --- a/lib/Mojolicious/WeBWorK.pm +++ b/lib/Mojolicious/WeBWorK.pm @@ -28,7 +28,7 @@ use Mojo::JSON qw(encode_json); use WeBWorK; use WeBWorK::CourseEnvironment; -use WeBWorK::Utils::Logs qw(writeTimingLogEntry); +use WeBWorK::Utils::Logs qw(writeTimingLogEntry); use WeBWorK::Utils::Routes qw(setup_content_generator_routes); sub startup ($app) { diff --git a/lib/WeBWorK/AchievementEvaluator.pm b/lib/WeBWorK/AchievementEvaluator.pm index fc21a716ce..f81eb63a64 100644 --- a/lib/WeBWorK/AchievementEvaluator.pm +++ b/lib/WeBWorK/AchievementEvaluator.pm @@ -24,7 +24,7 @@ use Mojo::Base 'Exporter', -signatures; use DateTime; -use WeBWorK::Utils qw(sortAchievements nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(sortAchievements nfreeze_base64 thaw_base64); use WeBWorK::Utils::ProblemProcessing qw(compute_unreduced_score); use WeBWorK::Utils::Tags; use WeBWorK::WWSafe; diff --git a/lib/WeBWorK/AchievementItems/AddNewTestGW.pm b/lib/WeBWorK/AchievementItems/AddNewTestGW.pm index 6674cb17f6..07b1d4e813 100644 --- a/lib/WeBWorK/AchievementItems/AddNewTestGW.pm +++ b/lib/WeBWorK/AchievementItems/AddNewTestGW.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to allow students to take an additional version of a test within its test version interval -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(before between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/DoubleProb.pm b/lib/WeBWorK/AchievementItems/DoubleProb.pm index 57f6e3b948..a23b294061 100644 --- a/lib/WeBWorK/AchievementItems/DoubleProb.pm +++ b/lib/WeBWorK/AchievementItems/DoubleProb.pm @@ -20,9 +20,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/DoubleSet.pm b/lib/WeBWorK/AchievementItems/DoubleSet.pm index bde65cd065..680ffc2672 100644 --- a/lib/WeBWorK/AchievementItems/DoubleSet.pm +++ b/lib/WeBWorK/AchievementItems/DoubleSet.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to make a homework set worth twice as much -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/DuplicateProb.pm b/lib/WeBWorK/AchievementItems/DuplicateProb.pm index e7841b86a8..054154cce7 100644 --- a/lib/WeBWorK/AchievementItems/DuplicateProb.pm +++ b/lib/WeBWorK/AchievementItems/DuplicateProb.pm @@ -20,9 +20,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ExtendDueDate.pm b/lib/WeBWorK/AchievementItems/ExtendDueDate.pm index 7b3214021f..f20aba7474 100644 --- a/lib/WeBWorK/AchievementItems/ExtendDueDate.pm +++ b/lib/WeBWorK/AchievementItems/ExtendDueDate.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to extend a close date by 24 hours. -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ExtendDueDateGW.pm b/lib/WeBWorK/AchievementItems/ExtendDueDateGW.pm index 710824605e..3d99f661f7 100644 --- a/lib/WeBWorK/AchievementItems/ExtendDueDateGW.pm +++ b/lib/WeBWorK/AchievementItems/ExtendDueDateGW.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to extend the close date on a test -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/FullCreditProb.pm b/lib/WeBWorK/AchievementItems/FullCreditProb.pm index 3bb8b38758..8cf759d30f 100644 --- a/lib/WeBWorK/AchievementItems/FullCreditProb.pm +++ b/lib/WeBWorK/AchievementItems/FullCreditProb.pm @@ -20,9 +20,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/FullCreditSet.pm b/lib/WeBWorK/AchievementItems/FullCreditSet.pm index b29469c69f..21bc077285 100644 --- a/lib/WeBWorK/AchievementItems/FullCreditSet.pm +++ b/lib/WeBWorK/AchievementItems/FullCreditSet.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to give half credit on all problems in a homework set. -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/HalfCreditProb.pm b/lib/WeBWorK/AchievementItems/HalfCreditProb.pm index 748ce57619..f607a8bb01 100644 --- a/lib/WeBWorK/AchievementItems/HalfCreditProb.pm +++ b/lib/WeBWorK/AchievementItems/HalfCreditProb.pm @@ -20,9 +20,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/HalfCreditSet.pm b/lib/WeBWorK/AchievementItems/HalfCreditSet.pm index ba01a455bd..c70cfa73c4 100644 --- a/lib/WeBWorK/AchievementItems/HalfCreditSet.pm +++ b/lib/WeBWorK/AchievementItems/HalfCreditSet.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to give half credit on all problems in a homework set. -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ReducedCred.pm b/lib/WeBWorK/AchievementItems/ReducedCred.pm index b1cbf412dd..9ff714ecb8 100644 --- a/lib/WeBWorK/AchievementItems/ReducedCred.pm +++ b/lib/WeBWorK/AchievementItems/ReducedCred.pm @@ -19,9 +19,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to extend a close date by 24 hours for reduced credit # Reduced scoring needs to be enabled for this item to work. -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ResetIncorrectAttempts.pm b/lib/WeBWorK/AchievementItems/ResetIncorrectAttempts.pm index 7f63b37e1f..6462fbae9a 100644 --- a/lib/WeBWorK/AchievementItems/ResetIncorrectAttempts.pm +++ b/lib/WeBWorK/AchievementItems/ResetIncorrectAttempts.pm @@ -20,9 +20,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ResurrectGW.pm b/lib/WeBWorK/AchievementItems/ResurrectGW.pm index beb9563f36..eb7286f3ec 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectGW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectGW.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to extend the due date on a gateway -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/ResurrectHW.pm b/lib/WeBWorK/AchievementItems/ResurrectHW.pm index 6cc97529fb..323c66020d 100644 --- a/lib/WeBWorK/AchievementItems/ResurrectHW.pm +++ b/lib/WeBWorK/AchievementItems/ResurrectHW.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to resurrect a homework for 24 hours -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/AchievementItems/SuperExtendDueDate.pm b/lib/WeBWorK/AchievementItems/SuperExtendDueDate.pm index 2c2216caa7..28ee31a660 100644 --- a/lib/WeBWorK/AchievementItems/SuperExtendDueDate.pm +++ b/lib/WeBWorK/AchievementItems/SuperExtendDueDate.pm @@ -18,9 +18,9 @@ use Mojo::Base 'WeBWorK::AchievementItems', -signatures; # Item to extend a close date by 48 hours. -use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); +use WeBWorK::Utils qw(x nfreeze_base64 thaw_base64); use WeBWorK::Utils::DateTime qw(between); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub new ($class) { return bless { diff --git a/lib/WeBWorK/Authen.pm b/lib/WeBWorK/Authen.pm index df77a42cfb..b380ce2782 100644 --- a/lib/WeBWorK/Authen.pm +++ b/lib/WeBWorK/Authen.pm @@ -52,10 +52,10 @@ use warnings; use Date::Format; use Scalar::Util qw(weaken); -use Mojo::Util qw(b64_encode b64_decode); +use Mojo::Util qw(b64_encode b64_decode); use WeBWorK::Debug; -use WeBWorK::Utils qw(x runtime_use); +use WeBWorK::Utils qw(x runtime_use); use WeBWorK::Utils::Logs qw(writeCourseLog); use WeBWorK::Utils::TOTP; use WeBWorK::Localize; diff --git a/lib/WeBWorK/Authen/LDAP.pm b/lib/WeBWorK/Authen/LDAP.pm index af2e5b83ef..714af03d04 100644 --- a/lib/WeBWorK/Authen/LDAP.pm +++ b/lib/WeBWorK/Authen/LDAP.pm @@ -20,7 +20,7 @@ use strict; use warnings; use WeBWorK::Debug qw(debug); -use Net::LDAP qw(LDAP_INVALID_CREDENTIALS); +use Net::LDAP qw(LDAP_INVALID_CREDENTIALS); sub checkPassword { my ($self, $userID, $possibleClearPassword) = @_; diff --git a/lib/WeBWorK/Authen/LTI/GradePassback.pm b/lib/WeBWorK/Authen/LTI/GradePassback.pm index 9ee61b50c0..b8acf5dde5 100644 --- a/lib/WeBWorK/Authen/LTI/GradePassback.pm +++ b/lib/WeBWorK/Authen/LTI/GradePassback.pm @@ -23,7 +23,7 @@ WeBWorK::Authen::LTI::GradePassback - Grade passback utilities for LTI authentic =cut use WeBWorK::Utils::DateTime qw(after before); -use WeBWorK::Utils::Sets qw(grade_set grade_gateway); +use WeBWorK::Utils::Sets qw(grade_set grade_gateway); our @EXPORT_OK = qw(massUpdate passbackGradeOnSubmit getSetPassbackScore); diff --git a/lib/WeBWorK/Authen/LTIAdvanced.pm b/lib/WeBWorK/Authen/LTIAdvanced.pm index 8234abbc02..b7dd57027e 100644 --- a/lib/WeBWorK/Authen/LTIAdvanced.pm +++ b/lib/WeBWorK/Authen/LTIAdvanced.pm @@ -33,7 +33,7 @@ use URI::Escape; use Net::OAuth; use WeBWorK::Debug; -use WeBWorK::Utils::DateTime qw(formatDateTime); +use WeBWorK::Utils::DateTime qw(formatDateTime); use WeBWorK::Utils::Instructor qw(assignSetToUser); use WeBWorK::Localize; use WeBWorK::Authen::LTIAdvanced::Nonce; diff --git a/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm b/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm index b86c6d5d7b..8839b0246c 100644 --- a/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm +++ b/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm @@ -29,8 +29,8 @@ use UUID::Tiny ':std'; use Digest::SHA qw(sha1_base64); use WeBWorK::Debug; -use WeBWorK::Utils qw(wwRound); -use WeBWorK::Utils::Sets qw(grade_all_sets); +use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils::Sets qw(grade_all_sets); use WeBWorK::Authen::LTI::GradePassback qw(getSetPassbackScore); # This package contains utilities for submitting grades to the LMS diff --git a/lib/WeBWorK/Authen/LTIAdvantage.pm b/lib/WeBWorK/Authen/LTIAdvantage.pm index 0d2b22f792..9dca92eb29 100644 --- a/lib/WeBWorK/Authen/LTIAdvantage.pm +++ b/lib/WeBWorK/Authen/LTIAdvantage.pm @@ -29,7 +29,7 @@ use experimental 'signatures'; use WeBWorK::Debug; use WeBWorK::Localize; -use WeBWorK::Utils::DateTime qw(formatDateTime); +use WeBWorK::Utils::DateTime qw(formatDateTime); use WeBWorK::Utils::Instructor qw(assignSetToUser); use WeBWorK::Authen::LTIAdvantage::SubmitGrade; @@ -323,8 +323,7 @@ sub authenticate ($self) { "Account creation blocked by block_lti_create_user setting. Did not create user $self->{user_id}."; if ($ce->{debug_lti_parameters}) { warn $c->maketext('Account creation is currently disabled in this course. ' - . 'Please speak to your instructor or system administrator.') - . "\n"; + . 'Please speak to your instructor or system administrator.') . "\n"; } return 0; } else { diff --git a/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm b/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm index 5802e4a663..7bc2d23f88 100644 --- a/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm +++ b/lib/WeBWorK/Authen/LTIAdvantage/SubmitGrade.pm @@ -34,12 +34,12 @@ use Mojo::IOLoop; use Crypt::JWT qw(encode_jwt); use Crypt::PK::RSA; use Math::Random::Secure qw(irand); -use Digest::SHA qw(sha256_hex); +use Digest::SHA qw(sha256_hex); use Time::HiRes; use WeBWorK::Debug; -use WeBWorK::Utils qw(wwRound); -use WeBWorK::Utils::Sets qw(grade_all_sets); +use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils::Sets qw(grade_all_sets); use WeBWorK::Authen::LTI::GradePassback qw(getSetPassbackScore); # This package contains utilities for submitting grades to the LMS via LTI 1.3. diff --git a/lib/WeBWorK/Authen/Proctor.pm b/lib/WeBWorK/Authen/Proctor.pm index 5ca8b50286..2cd91db890 100644 --- a/lib/WeBWorK/Authen/Proctor.pm +++ b/lib/WeBWorK/Authen/Proctor.pm @@ -25,7 +25,7 @@ WeBWorK::Authen::Proctor - Authenticate gateway test proctors. use strict; use warnings; -use WeBWorK::Utils qw(x); +use WeBWorK::Utils qw(x); use WeBWorK::DB::Utils qw(grok_vsetID); use constant GENERIC_ERROR_MESSAGE => x('Invalid user ID or password.'); diff --git a/lib/WeBWorK/Authz.pm b/lib/WeBWorK/Authz.pm index d94cccaa7b..71879a786a 100644 --- a/lib/WeBWorK/Authz.pm +++ b/lib/WeBWorK/Authz.pm @@ -61,7 +61,7 @@ use warnings; use Carp qw/croak/; use WeBWorK::Utils::DateTime qw(before); -use WeBWorK::Utils::Sets qw(is_restricted); +use WeBWorK::Utils::Sets qw(is_restricted); use WeBWorK::Authen::Proctor; use Net::IP; use Scalar::Util qw(weaken); diff --git a/lib/WeBWorK/ConfigValues.pm b/lib/WeBWorK/ConfigValues.pm index a30a0785ff..58955fc34e 100644 --- a/lib/WeBWorK/ConfigValues.pm +++ b/lib/WeBWorK/ConfigValues.pm @@ -1202,7 +1202,7 @@ sub getConfigValues ($ce) { @$configValues, [ x('LTI'), - map { $LTIConfigValues->{$_} } + map { $LTIConfigValues->{$_} } grep { defined $LTIConfigValues->{$_} } @{ $ce->{LTIConfigVariables} } ] ); diff --git a/lib/WeBWorK/ContentGenerator.pm b/lib/WeBWorK/ContentGenerator.pm index f935a90a7f..c3cf25ac9e 100644 --- a/lib/WeBWorK/ContentGenerator.pm +++ b/lib/WeBWorK/ContentGenerator.pm @@ -50,13 +50,13 @@ use Encode; use WeBWorK::File::Scoring qw(parse_scoring_file); use WeBWorK::Localize; -use WeBWorK::Utils qw(fetchEmailRecipients generateURLs getAssetURL); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::Utils qw(fetchEmailRecipients generateURLs getAssetURL); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); use WeBWorK::Utils::LanguageAndDirection qw(get_lang_and_dir); -use WeBWorK::Utils::Logs qw(writeCourseLog); -use WeBWorK::Utils::Routes qw(route_title route_navigation_is_restricted); -use WeBWorK::Utils::Sets qw(format_set_name_display); -use WeBWorK::Authen::LTI::GradePassback qw(massUpdate); +use WeBWorK::Utils::Logs qw(writeCourseLog); +use WeBWorK::Utils::Routes qw(route_title route_navigation_is_restricted); +use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Authen::LTI::GradePassback qw(massUpdate); =head1 INVOCATION diff --git a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm index 438e46f5ad..36ae2cb148 100644 --- a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm +++ b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm @@ -26,15 +26,15 @@ deal with versioning sets use Mojo::Promise; use Mojo::JSON qw(encode_json decode_json); -use WeBWorK::Utils qw(encodeAnswers decodeAnswers wwRound); -use WeBWorK::Utils::DateTime qw(before between after); -use WeBWorK::Utils::Files qw(path_is_subdir); -use WeBWorK::Utils::Instructor qw(assignSetVersionToUser); -use WeBWorK::Utils::Logs qw(writeLog writeCourseLog); +use WeBWorK::Utils qw(encodeAnswers decodeAnswers wwRound); +use WeBWorK::Utils::DateTime qw(before between after); +use WeBWorK::Utils::Files qw(path_is_subdir); +use WeBWorK::Utils::Instructor qw(assignSetVersionToUser); +use WeBWorK::Utils::Logs qw(writeLog writeCourseLog); use WeBWorK::Utils::ProblemProcessing qw/create_ans_str_from_responses compute_reduced_score/; -use WeBWorK::Utils::Rendering qw(getTranslatorDebuggingOptions renderPG); -use WeBWorK::Utils::Sets qw(is_restricted); -use WeBWorK::DB::Utils qw(global2user fake_set fake_set_version fake_problem); +use WeBWorK::Utils::Rendering qw(getTranslatorDebuggingOptions renderPG); +use WeBWorK::Utils::Sets qw(is_restricted); +use WeBWorK::DB::Utils qw(global2user fake_set fake_set_version fake_problem); use WeBWorK::Debug; use PGrandom; use WeBWorK::Authen::LTI::GradePassback qw(passbackGradeOnSubmit); @@ -498,7 +498,7 @@ async sub pre_header_initialize ($c) { if ($setVersionNumber && !$c->{invalidSet} && $setID ne 'Undefined_Set') { my @setVersionIDs = $db->listSetVersions($effectiveUserID, $setID); - my @setVersions = $db->getSetVersions(map { [ $effectiveUserID, $setID,, $_ ] } @setVersionIDs); + my @setVersions = $db->getSetVersions(map { [ $effectiveUserID, $setID, $_ ] } @setVersionIDs); for (@setVersions) { $totalNumVersions++; $currentNumVersions++ diff --git a/lib/WeBWorK/ContentGenerator/Grades.pm b/lib/WeBWorK/ContentGenerator/Grades.pm index bc6881fa36..432b8bbba1 100644 --- a/lib/WeBWorK/ContentGenerator/Grades.pm +++ b/lib/WeBWorK/ContentGenerator/Grades.pm @@ -22,10 +22,10 @@ WeBWorK::ContentGenerator::Grades - Display statistics by user. =cut -use WeBWorK::Utils qw(wwRound); -use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(grade_set format_set_name_display); +use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils::DateTime qw(after); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::Utils::Sets qw(grade_set format_set_name_display); use WeBWorK::Utils::ProblemProcessing qw(compute_unreduced_score); use WeBWorK::Localize; diff --git a/lib/WeBWorK/ContentGenerator/Hardcopy.pm b/lib/WeBWorK/ContentGenerator/Hardcopy.pm index ecfc9bc34f..da6349a052 100644 --- a/lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ b/lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -29,13 +29,13 @@ use String::ShellQuote; use Archive::Zip qw(:ERROR_CODES); use XML::LibXML; -use WeBWorK::DB::Utils qw/user2global/; -use WeBWorK::Utils qw(decodeAnswers x); -use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Files qw(readFile); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::DB::Utils qw/user2global/; +use WeBWorK::Utils qw(decodeAnswers x); +use WeBWorK::Utils::DateTime qw(after); +use WeBWorK::Utils::Files qw(readFile); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); use WeBWorK::Utils::Rendering qw(renderPG); -use WeBWorK::Utils::Sets qw(is_restricted); +use WeBWorK::Utils::Sets qw(is_restricted); use PGrandom; =head1 CONFIGURATION VARIABLES @@ -1007,8 +1007,7 @@ async sub write_set_tex ($c, $FH, $TargetUser, $themeTree, $setID) { { print $FH '\\def\\webworkReducedScoringDate{' . ($c->formatDateTime($MergedSet->{reduced_scoring_date}, $ce->{studentDateDisplayFormat}) =~ - s/\x{202f}/ /gr) - . "}%\n"; + s/\x{202f}/ /gr) . "}%\n"; } # write set header (theme presetheader, then PG header, then theme postsetheader) @@ -1181,10 +1180,10 @@ async sub write_problem_tex ($c, $FH, $TargetUser, $MergedSet, $themeTree, $prob problemID => $MergedProblem->problem_id, ), $MergedProblem->problem_id == 0 - # link for a fake problem (like a header file) + # link for a fake problem (like a header file) ? (params => { sourceFilePath => $MergedProblem->source_file, problemSeed => $MergedProblem->problem_seed }) - # link for a real problem + # link for a real problem : (), ); diff --git a/lib/WeBWorK/ContentGenerator/Instructor/AchievementEditor.pm b/lib/WeBWorK/ContentGenerator/Instructor/AchievementEditor.pm index 57b65b2500..861f636890 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/AchievementEditor.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/AchievementEditor.pm @@ -25,7 +25,7 @@ WeBWorK::ContentGenerator::Instructor::AchievementEditor - edit an achevement ev use HTML::Entities; use File::Copy; -use WeBWorK::Utils qw(fix_newlines not_blank x); +use WeBWorK::Utils qw(fix_newlines not_blank x); use WeBWorK::Utils::Files qw(surePathToFile readFile path_is_subdir); use constant ACTION_FORMS => [qw(save save_as)]; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/AchievementList.pm b/lib/WeBWorK/ContentGenerator/Instructor/AchievementList.pm index 0b78765f82..2278f45172 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/AchievementList.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/AchievementList.pm @@ -47,7 +47,7 @@ links to edit the evaluator and the individual user data. use Mojo::File; use Text::CSV; -use WeBWorK::Utils qw(sortAchievements x); +use WeBWorK::Utils qw(sortAchievements x); use WeBWorK::Utils::Files qw(surePathToFile); # Forms diff --git a/lib/WeBWorK/ContentGenerator/Instructor/AchievementNotificationEditor.pm b/lib/WeBWorK/ContentGenerator/Instructor/AchievementNotificationEditor.pm index 558d4f0350..3f2adb55dc 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/AchievementNotificationEditor.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/AchievementNotificationEditor.pm @@ -22,7 +22,7 @@ WeBWorK::ContentGenerator::Instructor::AchievementNotificationEditor - edit the =cut -use WeBWorK::Utils qw(fix_newlines not_blank x); +use WeBWorK::Utils qw(fix_newlines not_blank x); use WeBWorK::Utils::Files qw(surePathToFile readFile path_is_subdir); use constant ACTION_FORMS => [qw(save save_as existing disable)]; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/AddUsers.pm b/lib/WeBWorK/ContentGenerator/Instructor/AddUsers.pm index 3fba6e86ba..fe78b176bd 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/AddUsers.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/AddUsers.pm @@ -22,7 +22,7 @@ WeBWorK::ContentGenerator::Instructor::AddUsers - Menu interface for adding user =cut -use WeBWorK::Utils qw/cryptPassword trim_spaces/; +use WeBWorK::Utils qw/cryptPassword trim_spaces/; use WeBWorK::Utils::Instructor qw(assignSetsToUsers); sub initialize ($c) { diff --git a/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm b/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm index e4922bd4d4..350e1f7211 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm @@ -28,12 +28,12 @@ use File::Copy; use File::Spec; use String::ShellQuote; use Archive::Tar; -use Archive::Zip qw(:ERROR_CODES); +use Archive::Zip qw(:ERROR_CODES); use Archive::Zip::SimpleZip qw($SimpleZipError); -use WeBWorK::Utils qw(sortByName min); +use WeBWorK::Utils qw(sortByName min); use WeBWorK::Utils::CourseManagement qw(archiveCourse); -use WeBWorK::Utils::Files qw(readFile); +use WeBWorK::Utils::Files qw(readFile); use WeBWorK::Upload; use constant HOME => 'templates'; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/Index.pm b/lib/WeBWorK/ContentGenerator/Instructor/Index.pm index 21ef2c95f3..c24b770b5b 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/Index.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/Index.pm @@ -23,9 +23,9 @@ pages =cut -use WeBWorK::Utils qw(x); +use WeBWorK::Utils qw(x); use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(format_set_name_internal); +use WeBWorK::Utils::Sets qw(format_set_name_internal); use constant E_MAX_ONE_SET => x('Please select at most one set.'); use constant E_ONE_USER => x('Please select exactly one user.'); diff --git a/lib/WeBWorK/ContentGenerator/Instructor/LTIUpdate.pm b/lib/WeBWorK/ContentGenerator/Instructor/LTIUpdate.pm index 9c2ce76483..9aaed7d756 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/LTIUpdate.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/LTIUpdate.pm @@ -18,7 +18,7 @@ package WeBWorK::ContentGenerator::Instructor::LTIUpdate; use Mojo::Base 'WeBWorK::ContentGenerator', -signatures; -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); use WeBWorK::Authen::LTI::GradePassback qw(massUpdate); sub initialize ($c) { diff --git a/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm b/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm index ce08dd4635..fea13772f2 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -118,11 +118,11 @@ not exist. The path to the actual file being edited is stored in inputFilePath. use Mojo::File; use XML::LibXML; -use WeBWorK::Utils qw(not_blank x max); -use WeBWorK::Utils::Files qw(surePathToFile readFile path_is_subdir); +use WeBWorK::Utils qw(not_blank x max); +use WeBWorK::Utils::Files qw(surePathToFile readFile path_is_subdir); use WeBWorK::Utils::Instructor qw(assignProblemToAllSetUsers addProblemToSet); -use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); +use WeBWorK::Utils::Sets qw(format_set_name_display); use constant DEFAULT_SEED => 123456; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemGrader.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemGrader.pm index c23ad33e43..483bfc577e 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemGrader.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemGrader.pm @@ -25,9 +25,9 @@ manually grading webwork problems. use HTML::Entities; -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); use WeBWorK::Utils::Rendering qw(renderPG); -use WeBWorK::Utils::Sets qw(get_test_problem_position format_set_name_display); +use WeBWorK::Utils::Sets qw(get_test_problem_position format_set_name_display); async sub initialize ($c) { my $authz = $c->authz; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm index a55c3f6a0f..4ce8308a3b 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -25,11 +25,11 @@ specific user/set information as well as problem information use Exporter qw(import); -use WeBWorK::Utils qw(cryptPassword x); -use WeBWorK::Utils::Files qw(surePathToFile readFile); +use WeBWorK::Utils qw(cryptPassword x); +use WeBWorK::Utils::Files qw(surePathToFile readFile); use WeBWorK::Utils::Instructor qw(assignProblemToAllSetUsers addProblemToSet); -use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(format_set_name_internal format_set_name_display); +use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); +use WeBWorK::Utils::Sets qw(format_set_name_internal format_set_name_display); require WeBWorK::PG; our @EXPORT_OK = qw(FIELD_PROPERTIES); diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm index 1781b73609..0fc2f13b1c 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetList.pm @@ -79,11 +79,11 @@ Delete sets: use Mojo::File; use WeBWorK::Debug; -use WeBWorK::Utils qw(x); -use WeBWorK::Utils::DateTime qw(getDefaultSetDueDate); +use WeBWorK::Utils qw(x); +use WeBWorK::Utils::DateTime qw(getDefaultSetDueDate); use WeBWorK::Utils::Instructor qw(assignSetToUser); -use WeBWorK::Utils::Sets qw(format_set_name_internal format_set_name_display); -use WeBWorK::File::SetDef qw(importSetsFromDef exportSetsToDef); +use WeBWorK::Utils::Sets qw(format_set_name_internal format_set_name_display); +use WeBWorK::File::SetDef qw(importSetsFromDef exportSetsToDef); use constant HIDE_SETS_THRESHOLD => 500; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm b/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm index 3489fa6a45..eb65e2ebce 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm @@ -23,7 +23,7 @@ WeBWorK::ContentGenerator::Instructor::Scoring - Generate scoring data files =cut use WeBWorK::Debug; -use WeBWorK::Utils qw(wwRound x); +use WeBWorK::Utils qw(wwRound x); use WeBWorK::Utils::Files qw(readFile); use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); use WeBWorK::ContentGenerator::Instructor::FileManager; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm b/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm index 3e97535169..c43b072725 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm @@ -25,12 +25,12 @@ WeBWorK::ContentGenerator::Instructor::SetMaker - Make homework sets. use Mojo::File; use WeBWorK::Debug; -use WeBWorK::Utils qw(sortByName x); -use WeBWorK::Utils::DateTime qw(getDefaultSetDueDate); +use WeBWorK::Utils qw(sortByName x); +use WeBWorK::Utils::DateTime qw(getDefaultSetDueDate); use WeBWorK::Utils::Instructor qw(assignSetToUser assignProblemToAllSetUsers addProblemToSet); use WeBWorK::Utils::LibraryStats; use WeBWorK::Utils::ListingDB qw(getDBListings); -use WeBWorK::Utils::Sets qw(format_set_name_internal); +use WeBWorK::Utils::Sets qw(format_set_name_internal); use WeBWorK::Utils::Tags; # Use x to mark strings for maketext diff --git a/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm b/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm index d84ec86d92..4a2f06576b 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/ShowAnswers.pm @@ -25,7 +25,7 @@ WeBWorK::ContentGenerator::Instructor::ShowAnswers.pm -- display past answers o use Text::CSV; use Mojo::File; -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq prob_id_sort); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq prob_id_sort); use WeBWorK::Utils::Rendering qw(renderPG); use constant PAST_ANSWERS_FILENAME => 'past_answers'; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm b/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm index bc81081388..9b2d276298 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm @@ -26,8 +26,8 @@ homework set (including sv graphs). use SVG; use WeBWorK::Utils::FilterRecords qw(getFiltersForClass filterRecords); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); -use WeBWorK::Utils::Sets qw(grade_set format_set_name_display); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); +use WeBWorK::Utils::Sets qw(grade_set format_set_name_display); sub initialize ($c) { my $db = $c->db; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm index b052ea5419..7b0b91431d 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/StudentProgress.pm @@ -22,10 +22,10 @@ WeBWorK::ContentGenerator::Instructor::StudentProgress - Display Student Progres =cut -use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils qw(wwRound); use WeBWorK::Utils::FilterRecords qw(getFiltersForClass filterRecords); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(grade_set list_set_versions format_set_name_display); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::Utils::Sets qw(grade_set list_set_versions format_set_name_display); sub initialize ($c) { my $db = $c->db; @@ -219,7 +219,7 @@ sub displaySets ($c) { @user_set_list, { record => $studentRecord, - score => 0, + score => 0, total => -1, date => '', testtime => '', diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm b/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm index e86d376d9c..9372b36fef 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UserDetail.pm @@ -22,8 +22,8 @@ WeBWorK::ContentGenerator::Instructor::UserDetail - Detailed User specific infor =cut -use WeBWorK::DB::Utils qw(grok_versionID_from_vsetID_sql); -use WeBWorK::Utils qw(x); +use WeBWorK::DB::Utils qw(grok_versionID_from_vsetID_sql); +use WeBWorK::Utils qw(x); use WeBWorK::Utils::Instructor qw(assignSetToUser); use WeBWorK::Debug; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm b/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm index 62df5978c3..cdbced085a 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -63,7 +63,7 @@ Export users: use Mojo::File; use WeBWorK::File::Classlist qw(parse_classlist write_classlist); -use WeBWorK::Utils qw(cryptPassword x); +use WeBWorK::Utils qw(cryptPassword x); use constant HIDE_USERS_THRESHHOLD => 200; use constant EDIT_FORMS => [qw(save_edit cancel_edit)]; @@ -237,15 +237,15 @@ sub pre_header_initialize ($c) { # Always have a definite sort order in case the first three sorts don't determine things. $c->{sortedUserIDs} = [ map { $_->user_id } - sort { - $primarySortSub->() + sort { + $primarySortSub->() || $secondarySortSub->() || $ternarySortSub->() || byLastName() || byFirstName() || byUserID() } - grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers) + grep { $c->{visibleUserIDs}{ $_->user_id } } (values %allUsers) ]; return; diff --git a/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm b/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm index 63924f741a..687ac4961c 100644 --- a/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm +++ b/lib/WeBWorK/ContentGenerator/Instructor/UsersAssignedToSet.pm @@ -25,7 +25,7 @@ users to which sets are assigned. use WeBWorK::Debug; use WeBWorK::Utils::Instructor qw(assignSetToAllUsers assignSetToGivenUsers); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub initialize ($c) { my $authz = $c->authz; diff --git a/lib/WeBWorK/ContentGenerator/LTIAdvanced.pm b/lib/WeBWorK/ContentGenerator/LTIAdvanced.pm index c800489181..d07a5c5620 100644 --- a/lib/WeBWorK/ContentGenerator/LTIAdvanced.pm +++ b/lib/WeBWorK/ContentGenerator/LTIAdvanced.pm @@ -20,7 +20,7 @@ use Net::OAuth; use UUID::Tiny ':std'; use Mojo::JSON qw(encode_json); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); use WeBWorK::Utils::CourseManagement qw(listCourses); use WeBWorK::DB; diff --git a/lib/WeBWorK/ContentGenerator/LTIAdvantage.pm b/lib/WeBWorK/ContentGenerator/LTIAdvantage.pm index f250ed008e..df4a9d6281 100644 --- a/lib/WeBWorK/ContentGenerator/LTIAdvantage.pm +++ b/lib/WeBWorK/ContentGenerator/LTIAdvantage.pm @@ -17,15 +17,15 @@ package WeBWorK::ContentGenerator::LTIAdvantage; use Mojo::Base 'WeBWorK::ContentGenerator', -signatures; use Mojo::UserAgent; -use Mojo::JSON qw(decode_json); -use Crypt::JWT qw(decode_jwt encode_jwt); +use Mojo::JSON qw(decode_json); +use Crypt::JWT qw(decode_jwt encode_jwt); use Math::Random::Secure qw(irand); -use Digest::SHA qw(sha256_hex); +use Digest::SHA qw(sha256_hex); use WeBWorK::Debug qw(debug); use WeBWorK::Authen::LTIAdvantage::SubmitGrade; use WeBWorK::Utils::CourseManagement qw(listCourses); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub initializeRoute ($c, $routeCaptures) { # If this is the login phase of an LTI 1.3 login, then extract the courseID from the target_link_uri. If this is a diff --git a/lib/WeBWorK/ContentGenerator/Login.pm b/lib/WeBWorK/ContentGenerator/Login.pm index fb5ae41860..f16a11fd10 100644 --- a/lib/WeBWorK/ContentGenerator/Login.pm +++ b/lib/WeBWorK/ContentGenerator/Login.pm @@ -24,7 +24,7 @@ WeBWorK::ContentGenerator::Login - display a login form. use WeBWorK::Utils::Files qw(readFile); use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); sub page_title ($c) { # If the url is for a problem page, then the title is the set and problem id. diff --git a/lib/WeBWorK/ContentGenerator/LoginProctor.pm b/lib/WeBWorK/ContentGenerator/LoginProctor.pm index e0f011f95b..d0efe4e9ab 100644 --- a/lib/WeBWorK/ContentGenerator/LoginProctor.pm +++ b/lib/WeBWorK/ContentGenerator/LoginProctor.pm @@ -24,7 +24,7 @@ GatewayQuiz proctored tests. =cut use WeBWorK::Utils::Rendering qw(renderPG); -use WeBWorK::DB::Utils qw(grok_vsetID); +use WeBWorK::DB::Utils qw(grok_vsetID); async sub initialize ($c) { my $ce = $c->ce; diff --git a/lib/WeBWorK/ContentGenerator/Problem.pm b/lib/WeBWorK/ContentGenerator/Problem.pm index 717e938582..b3e81975fb 100644 --- a/lib/WeBWorK/ContentGenerator/Problem.pm +++ b/lib/WeBWorK/ContentGenerator/Problem.pm @@ -24,18 +24,18 @@ WeBWorK::ContentGenerator::Problem - Allow a student to interact with a problem. use WeBWorK::HTML::SingleProblemGrader; use WeBWorK::Debug; -use WeBWorK::Utils qw(decodeAnswers wwRound); +use WeBWorK::Utils qw(decodeAnswers wwRound); use WeBWorK::Utils::DateTime qw(before between after); -use WeBWorK::Utils::Files qw(path_is_subdir); -use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq is_jitar_problem_hidden is_jitar_problem_closed +use WeBWorK::Utils::Files qw(path_is_subdir); +use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq is_jitar_problem_hidden is_jitar_problem_closed jitar_problem_finished jitar_problem_adjusted_status); use WeBWorK::Utils::LanguageAndDirection qw(get_problem_lang_and_dir); -use WeBWorK::Utils::ProblemProcessing qw(process_and_log_answer jitar_send_warning_email compute_reduced_score +use WeBWorK::Utils::ProblemProcessing qw(process_and_log_answer jitar_send_warning_email compute_reduced_score compute_unreduced_score); -use WeBWorK::Utils::Rendering qw(getTranslatorDebuggingOptions renderPG); -use WeBWorK::Utils::Sets qw(is_restricted format_set_name_display); +use WeBWorK::Utils::Rendering qw(getTranslatorDebuggingOptions renderPG); +use WeBWorK::Utils::Sets qw(is_restricted format_set_name_display); use WeBWorK::AchievementEvaluator qw(checkForAchievements); -use WeBWorK::DB::Utils qw(global2user fake_set fake_problem); +use WeBWorK::DB::Utils qw(global2user fake_set fake_problem); use WeBWorK::Localize; use WeBWorK::AchievementEvaluator; diff --git a/lib/WeBWorK/ContentGenerator/ProblemSet.pm b/lib/WeBWorK/ContentGenerator/ProblemSet.pm index 1507ee8535..d54b813417 100644 --- a/lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ b/lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -24,12 +24,12 @@ problem set. =cut use WeBWorK::Debug; -use WeBWorK::Utils qw(wwRound); -use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Files qw(path_is_subdir); +use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils::DateTime qw(after); +use WeBWorK::Utils::Files qw(path_is_subdir); use WeBWorK::Utils::Rendering qw(renderPG); -use WeBWorK::Utils::Sets qw(is_restricted grade_set format_set_name_display); -use WeBWorK::DB::Utils qw(grok_versionID_from_vsetID_sql); +use WeBWorK::Utils::Sets qw(is_restricted grade_set format_set_name_display); +use WeBWorK::DB::Utils qw(grok_versionID_from_vsetID_sql); use WeBWorK::Localize; async sub initialize ($c) { diff --git a/lib/WeBWorK/ContentGenerator/ProblemSets.pm b/lib/WeBWorK/ContentGenerator/ProblemSets.pm index a453b6fc87..8386861bd6 100644 --- a/lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ b/lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -23,10 +23,10 @@ WeBWorK::ContentGenerator::ProblemSets - Display a list of built problem sets. =cut use WeBWorK::Debug; -use WeBWorK::Utils qw(sortByName); +use WeBWorK::Utils qw(sortByName); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::Files qw(readFile path_is_subdir); -use WeBWorK::Utils::Sets qw(is_restricted format_set_name_display); +use WeBWorK::Utils::Files qw(readFile path_is_subdir); +use WeBWorK::Utils::Sets qw(is_restricted format_set_name_display); use WeBWorK::Localize; # The "default" data in the course_info.txt file. diff --git a/lib/WeBWorK/ContentGenerator/ShowMeAnother.pm b/lib/WeBWorK/ContentGenerator/ShowMeAnother.pm index 1903b39c21..33d1e0adbc 100644 --- a/lib/WeBWorK/ContentGenerator/ShowMeAnother.pm +++ b/lib/WeBWorK/ContentGenerator/ShowMeAnother.pm @@ -23,9 +23,9 @@ WeBWorK::ContentGenerator::ShowMeAnother - Show students alternate versions of c =cut use WeBWorK::Debug; -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq); use WeBWorK::Utils::Rendering qw(getTranslatorDebuggingOptions renderPG); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::Sets qw(format_set_name_display); async sub pre_header_initialize ($c) { my $ce = $c->ce; diff --git a/lib/WeBWorK/DB.pm b/lib/WeBWorK/DB.pm index e8082916ef..c44e726896 100644 --- a/lib/WeBWorK/DB.pm +++ b/lib/WeBWorK/DB.pm @@ -97,9 +97,9 @@ use warnings; use Carp; use Data::Dumper; -use Scalar::Util qw/blessed/; +use Scalar::Util qw/blessed/; use HTML::Entities qw( encode_entities ); -use Mojo::JSON qw(encode_json decode_json); +use Mojo::JSON qw(encode_json decode_json); use WeBWorK::DB::Schema; use WeBWorK::DB::Utils qw/make_vsetID grok_vsetID grok_setID_from_vsetID_sql diff --git a/lib/WeBWorK/DB/Schema/NewSQL.pm b/lib/WeBWorK/DB/Schema/NewSQL.pm index 331f4b2819..2addc9e458 100644 --- a/lib/WeBWorK/DB/Schema/NewSQL.pm +++ b/lib/WeBWorK/DB/Schema/NewSQL.pm @@ -24,7 +24,7 @@ WeBWorK::DB::Schema::NewSQL - base class for SQL access. use strict; use warnings; -use Carp qw(croak); +use Carp qw(croak); use WeBWorK::Utils qw/undefstr/; use constant TABLES => qw(*); diff --git a/lib/WeBWorK/Debug.pm b/lib/WeBWorK/Debug.pm index c4a5c843c0..97fd02083a 100644 --- a/lib/WeBWorK/Debug.pm +++ b/lib/WeBWorK/Debug.pm @@ -20,7 +20,7 @@ use strict; use warnings; use Date::Format; -use Time::HiRes qw/gettimeofday/; +use Time::HiRes qw/gettimeofday/; use WeBWorK::Utils qw/undefstr/; our @EXPORT = qw(debug); diff --git a/lib/WeBWorK/File/SetDef.pm b/lib/WeBWorK/File/SetDef.pm index 99f9f42f9a..45475f1433 100644 --- a/lib/WeBWorK/File/SetDef.pm +++ b/lib/WeBWorK/File/SetDef.pm @@ -25,12 +25,12 @@ WeBWorK::File::SetDef - utilities for dealing with set definition files. use Carp; use WeBWorK::Debug; -use WeBWorK::Utils qw(x); -use WeBWorK::Utils::DateTime qw(formatDateTime getDefaultSetDueDate parseDateTime timeToSec); -use WeBWorK::Utils::Files qw(surePathToFile); +use WeBWorK::Utils qw(x); +use WeBWorK::Utils::DateTime qw(formatDateTime getDefaultSetDueDate parseDateTime timeToSec); +use WeBWorK::Utils::Files qw(surePathToFile); use WeBWorK::Utils::Instructor qw(assignSetToUser assignSetToAllUsers addProblemToSet); -use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); -use WeBWorK::Utils::Sets qw(format_set_name_display); +use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); +use WeBWorK::Utils::Sets qw(format_set_name_display); our @EXPORT_OK = qw(importSetsFromDef readSetDef exportSetsToDef); diff --git a/lib/WeBWorK/HTML/ScrollingRecordList.pm b/lib/WeBWorK/HTML/ScrollingRecordList.pm index da41cdc0a2..7e74cdd685 100644 --- a/lib/WeBWorK/HTML/ScrollingRecordList.pm +++ b/lib/WeBWorK/HTML/ScrollingRecordList.pm @@ -26,7 +26,7 @@ records. use Carp; use WeBWorK::Utils::FormatRecords qw(getFormatsForClass formatRecords); -use WeBWorK::Utils::SortRecords qw(getSortsForClass sortRecords); +use WeBWorK::Utils::SortRecords qw(getSortsForClass sortRecords); use WeBWorK::Utils::FilterRecords qw(getFiltersForClass filterRecords); our @EXPORT_OK = qw(scrollingRecordList); diff --git a/lib/WeBWorK/Upload.pm b/lib/WeBWorK/Upload.pm index 5619e76f9f..eacd660a37 100644 --- a/lib/WeBWorK/Upload.pm +++ b/lib/WeBWorK/Upload.pm @@ -61,7 +61,7 @@ use warnings; use Carp qw(croak); use Data::UUID; # this is probably overkill ;) use Digest::MD5 qw(md5_hex); -use File::Copy qw(copy move); +use File::Copy qw(copy move); =head1 STORING UPLOADS diff --git a/lib/WeBWorK/Utils.pm b/lib/WeBWorK/Utils.pm index 5065fe82d7..766904200f 100644 --- a/lib/WeBWorK/Utils.pm +++ b/lib/WeBWorK/Utils.pm @@ -19,7 +19,7 @@ use Mojo::Base 'Exporter', -signatures; use Email::Sender::Transport::SMTP; use Mojo::JSON qw(from_json to_json); use Mojo::Util qw(b64_encode b64_decode encode decode); -use Storable qw(nfreeze thaw); +use Storable qw(nfreeze thaw); our @EXPORT_OK = qw( runtime_use diff --git a/lib/WeBWorK/Utils/CourseManagement.pm b/lib/WeBWorK/Utils/CourseManagement.pm index a20f797e5f..206fc98120 100644 --- a/lib/WeBWorK/Utils/CourseManagement.pm +++ b/lib/WeBWorK/Utils/CourseManagement.pm @@ -28,8 +28,8 @@ use warnings; use Carp; use DBI; use String::ShellQuote; -use UUID::Tiny qw(create_uuid_as_string); -use Mojo::File qw(path); +use UUID::Tiny qw(create_uuid_as_string); +use Mojo::File qw(path); use File::Copy::Recursive qw(dircopy); use File::Spec; use Archive::Tar; @@ -37,8 +37,8 @@ use Archive::Tar; use WeBWorK::Debug; use WeBWorK::CourseEnvironment; use WeBWorK::DB; -use WeBWorK::Utils qw(runtime_use); -use WeBWorK::Utils::Files qw(surePathToFile); +use WeBWorK::Utils qw(runtime_use); +use WeBWorK::Utils::Files qw(surePathToFile); use WeBWorK::Utils::Instructor qw(assignSetsToUsers); our @EXPORT_OK = qw( diff --git a/lib/WeBWorK/Utils/FilterRecords.pm b/lib/WeBWorK/Utils/FilterRecords.pm index 5d0d16a544..af897f7be2 100644 --- a/lib/WeBWorK/Utils/FilterRecords.pm +++ b/lib/WeBWorK/Utils/FilterRecords.pm @@ -47,7 +47,7 @@ use warnings; use Carp; -use WeBWorK::Utils qw(sortByName); +use WeBWorK::Utils qw(sortByName); use WeBWorK::ContentGenerator::Instructor::ProblemSetDetail qw(FIELD_PROPERTIES); our @EXPORT_OK = qw( diff --git a/lib/WeBWorK/Utils/FormatRecords.pm b/lib/WeBWorK/Utils/FormatRecords.pm index 22da94e1e3..322543d8a3 100644 --- a/lib/WeBWorK/Utils/FormatRecords.pm +++ b/lib/WeBWorK/Utils/FormatRecords.pm @@ -55,7 +55,7 @@ use warnings; use Carp; -use WeBWorK::Utils::Sets qw/format_set_name_display/; +use WeBWorK::Utils::Sets qw/format_set_name_display/; use WeBWorK::ContentGenerator::Instructor::ProblemSetDetail qw/FIELD_PROPERTIES/; our @EXPORT_OK = qw( diff --git a/lib/WeBWorK/Utils/ProblemProcessing.pm b/lib/WeBWorK/Utils/ProblemProcessing.pm index c4d79b4247..2459169556 100644 --- a/lib/WeBWorK/Utils/ProblemProcessing.pm +++ b/lib/WeBWorK/Utils/ProblemProcessing.pm @@ -29,10 +29,10 @@ use Try::Tiny; use Mojo::JSON qw(encode_json decode_json); use WeBWorK::Debug; -use WeBWorK::Utils qw(encodeAnswers createEmailSenderTransportSMTP); -use WeBWorK::Utils::DateTime qw(before after); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); -use WeBWorK::Utils::Logs qw(writeLog writeCourseLog); +use WeBWorK::Utils qw(encodeAnswers createEmailSenderTransportSMTP); +use WeBWorK::Utils::DateTime qw(before after); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); +use WeBWorK::Utils::Logs qw(writeLog writeCourseLog); use WeBWorK::Authen::LTI::GradePassback qw(passbackGradeOnSubmit); use Caliper::Sensor; use Caliper::Entity; diff --git a/lib/WeBWorK/Utils/Rendering.pm b/lib/WeBWorK/Utils/Rendering.pm index c2c53d9f4f..110c3972ba 100644 --- a/lib/WeBWorK/Utils/Rendering.pm +++ b/lib/WeBWorK/Utils/Rendering.pm @@ -23,12 +23,12 @@ WeBWorK::Utils::Rendering - utilities for rendering problems. =cut use Mojo::IOLoop; -use Mojo::JSON qw(decode_json); +use Mojo::JSON qw(decode_json); use Data::Structure::Util qw(unbless); -use Digest::MD5 qw(md5_hex); -use Encode qw(encode_utf8); +use Digest::MD5 qw(md5_hex); +use Encode qw(encode_utf8); -use WeBWorK::Utils::DateTime qw(formatDateTime); +use WeBWorK::Utils::DateTime qw(formatDateTime); use WeBWorK::Utils::ProblemProcessing qw(compute_unreduced_score); use WeBWorK::PG; diff --git a/lib/WeBWorK/Utils/Routes.pm b/lib/WeBWorK/Utils/Routes.pm index 39deece4f6..9132730552 100644 --- a/lib/WeBWorK/Utils/Routes.pm +++ b/lib/WeBWorK/Utils/Routes.pm @@ -124,7 +124,7 @@ use strict; use warnings; use WeBWorK::Localize; -use WeBWorK::Utils qw(x); +use WeBWorK::Utils qw(x); use WeBWorK::Utils::Sets qw(format_set_name_display); our @EXPORT_OK = qw(setup_content_generator_routes route_title route_navigation_is_restricted); diff --git a/lib/WeBWorK/Utils/Sets.pm b/lib/WeBWorK/Utils/Sets.pm index 03d797a2f4..1afa8252cc 100644 --- a/lib/WeBWorK/Utils/Sets.pm +++ b/lib/WeBWorK/Utils/Sets.pm @@ -19,9 +19,9 @@ use Mojo::Base 'Exporter', -signatures; use Carp; use PGrandom; -use WeBWorK::Utils qw(wwRound); +use WeBWorK::Utils qw(wwRound); use WeBWorK::Utils::DateTime qw(after); -use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); +use WeBWorK::Utils::JITAR qw(jitar_id_to_seq jitar_problem_adjusted_status); our @EXPORT_OK = qw( format_set_name_internal diff --git a/lib/WeBWorK/Utils/TOTP.pm b/lib/WeBWorK/Utils/TOTP.pm index cb5cae6de7..39d9b0f8da 100644 --- a/lib/WeBWorK/Utils/TOTP.pm +++ b/lib/WeBWorK/Utils/TOTP.pm @@ -4,8 +4,8 @@ use strict; use warnings; use utf8; -use Digest::SHA qw(hmac_sha512_hex hmac_sha256_hex hmac_sha1_hex); -use MIME::Base32 qw(encode_base32); +use Digest::SHA qw(hmac_sha512_hex hmac_sha256_hex hmac_sha1_hex); +use MIME::Base32 qw(encode_base32); use Math::Random::Secure qw(irand); sub new { diff --git a/lib/WebworkWebservice/CourseActions.pm b/lib/WebworkWebservice/CourseActions.pm index 2fdfa3f430..cd12fcfe33 100644 --- a/lib/WebworkWebservice/CourseActions.pm +++ b/lib/WebworkWebservice/CourseActions.pm @@ -24,11 +24,11 @@ use Date::Format; use Data::Structure::Util qw(unbless); use WeBWorK::DB; -use WeBWorK::DB::Utils qw(initializeUserProblem); -use WeBWorK::Utils qw(cryptPassword); +use WeBWorK::DB::Utils qw(initializeUserProblem); +use WeBWorK::Utils qw(cryptPassword); use WeBWorK::Utils::CourseManagement qw(addCourse); -use WeBWorK::Utils::Files qw(surePathToFile path_is_subdir); -use WeBWorK::ConfigValues qw(getConfigValues); +use WeBWorK::Utils::Files qw(surePathToFile path_is_subdir); +use WeBWorK::ConfigValues qw(getConfigValues); use WeBWorK::Debug; sub createCourse { diff --git a/lib/WebworkWebservice/ProblemActions.pm b/lib/WebworkWebservice/ProblemActions.pm index 1f771013e8..7684872367 100644 --- a/lib/WebworkWebservice/ProblemActions.pm +++ b/lib/WebworkWebservice/ProblemActions.pm @@ -21,7 +21,7 @@ use warnings; use Data::Structure::Util qw(unbless); -use WeBWorK::PG::Tidy qw(pgtidy); +use WeBWorK::PG::Tidy qw(pgtidy); use WeBWorK::PG::ConvertToPGML qw(convertToPGML); sub getUserProblem { diff --git a/lib/WebworkWebservice/RenderProblem.pm b/lib/WebworkWebservice/RenderProblem.pm index 18f20061d3..31d15ed169 100644 --- a/lib/WebworkWebservice/RenderProblem.pm +++ b/lib/WebworkWebservice/RenderProblem.pm @@ -25,9 +25,9 @@ use Mojo::Util qw(url_unescape); use WeBWorK::Debug; use WeBWorK::CourseEnvironment; use WeBWorK::DB; -use WeBWorK::DB::Utils qw(global2user fake_set fake_problem); -use WeBWorK::Utils qw(decode_utf8_base64); -use WeBWorK::Utils::Files qw(readFile); +use WeBWorK::DB::Utils qw(global2user fake_set fake_problem); +use WeBWorK::Utils qw(decode_utf8_base64); +use WeBWorK::Utils::Files qw(readFile); use WeBWorK::Utils::Rendering qw(renderPG); our $UNIT_TESTS_ON = 0; diff --git a/lib/WebworkWebservice/SetActions.pm b/lib/WebworkWebservice/SetActions.pm index 7861c4f4de..8039b87f07 100644 --- a/lib/WebworkWebservice/SetActions.pm +++ b/lib/WebworkWebservice/SetActions.pm @@ -23,9 +23,9 @@ use Carp; use JSON; use Data::Structure::Util qw(unbless); -use WeBWorK::Utils qw(max); +use WeBWorK::Utils qw(max); use WeBWorK::Utils::Instructor qw(assignSetToGivenUsers assignMultipleProblemsToGivenUsers); -use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); +use WeBWorK::Utils::JITAR qw(seq_to_jitar_id jitar_id_to_seq); use WeBWorK::Debug; use WeBWorK::DB::Utils qw(initializeUserProblem);