Skip to content

Commit 59a0478

Browse files
committed
Add changes suggested in review by @drdrew42.
1 parent 1cfd7e6 commit 59a0478

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

lib/PGalias.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ sub initialize {
9696
$self->{problemUUID} = $envir->{problemUUID} // 0;
9797

9898
# Find auxiliary files even when the main file is in templates/tmpEdit
99-
# FIXME: This shouldn't be done her. Instead the front end should pass in the problem source with the file name.
99+
# FIXME: This shouldn't be done here. Instead the front end should pass in the problem source with the file name.
100100
# The other instance of this in PGloadfiles.pm needs to be removed.
101101
$self->{pgFileName} =~ s!(^|/)tmpEdit/!$1!;
102102

lib/WeBWorK/PG/Environment.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ sub new ($invocant, $courseName = '___') {
100100

101101
# Note that placeholders used in $pg_envir->{URLs}{html}, $pg_envir->{directories}{OPL}, and
102102
# $pg_envir->{directories}{Contrib} are set on the first iteration, and those carry over to anywhere those
103-
# placehoders are are used in other settings on the second iteration.
103+
# placeholders are are used in other settings on the second iteration.
104104
for (1 .. 2) {
105105
$pg_envir = replacePlaceholders(
106106
$pg_envir,

lib/WeBWorK/PG/IO.pm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ contents of the file.
101101

102102
sub read_whole_problem_file {
103103
my $filePath = shift;
104-
$filePath =~ s/^\s*//; # get rid of initial spaces
105-
$filePath =~ s/\s*$//; # get rid of final spaces
104+
$filePath =~ s/^\s*|\s$//g; # get rid of leading and trailing spaces
106105
$filePath = "$filePath.pg" unless $filePath =~ /\.pg$/;
107106
read_whole_file($filePath);
108107
}

lib/WeBWorK/PG/ImageGenerator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ sub render ($self, %options) {
388388
$dvipngout = readFile("$wd/dvipng.out") if (-r "$wd/dvipng.out");
389389
my @dvipngdepths = ($dvipngout =~ /depth=(\d+)/g);
390390

391-
# Kill them all if something goes wrnog
391+
# Kill them all if something goes wrong
392392
@dvipngdepths = () if (scalar(@dvipngdepths) != scalar(@newNames));
393393

394394
# move/rename images

lib/WeBWorK/PG/Translator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ sub std_problem_grader {
11191119
} else {
11201120
warn "Error: Answer $ans_name is not a hash";
11211121
warn "$evaluated_answers{$ans_name}";
1122-
warn 'This probably means that the answer evaluator is for this answer is not working correctly.';
1122+
warn 'This probably means that the answer evaluator for this answer is not working correctly.';
11231123
$problem_result{error} = "Error: Answer $ans_name is not a hash: $evaluated_answers{$ans_name}";
11241124
}
11251125
}

0 commit comments

Comments
 (0)