You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(53) |
Feb
(56) |
Mar
|
Apr
|
May
(30) |
Jun
(78) |
Jul
(121) |
Aug
(155) |
Sep
(77) |
Oct
(61) |
Nov
(45) |
Dec
(94) |
2006 |
Jan
(116) |
Feb
(33) |
Mar
(11) |
Apr
(23) |
May
(60) |
Jun
(89) |
Jul
(130) |
Aug
(109) |
Sep
(124) |
Oct
(63) |
Nov
(82) |
Dec
(45) |
2007 |
Jan
(31) |
Feb
(35) |
Mar
(123) |
Apr
(36) |
May
(18) |
Jun
(134) |
Jul
(133) |
Aug
(241) |
Sep
(126) |
Oct
(31) |
Nov
(15) |
Dec
(5) |
2008 |
Jan
(11) |
Feb
(6) |
Mar
(16) |
Apr
(29) |
May
(43) |
Jun
(149) |
Jul
(27) |
Aug
(29) |
Sep
(37) |
Oct
(20) |
Nov
(4) |
Dec
(6) |
2009 |
Jan
(34) |
Feb
(30) |
Mar
(16) |
Apr
(6) |
May
(1) |
Jun
(32) |
Jul
(22) |
Aug
(7) |
Sep
(18) |
Oct
(50) |
Nov
(22) |
Dec
(8) |
2010 |
Jan
(17) |
Feb
(15) |
Mar
(10) |
Apr
(9) |
May
(67) |
Jun
(30) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
From: Arnie P. v. a. <we...@ma...> - 2010-05-20 13:12:08
|
Log Message: ----------- remoed path to HughesHallett macros (this was redundant --- they are also under Michigan) Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.225 retrieving revision 1.226 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.225 -r1.226 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -869,7 +869,6 @@ $courseDirs{macros}, $pg{directories}{macros}, "$courseDirs{templates}/Library/macros/Union", - "$courseDirs{templates}/Library/macros/HughesHallett", "$courseDirs{templates}/Library/macros/Michigan", "$courseDirs{templates}/Library/macros/CollegeOfIdaho", "$courseDirs{templates}/Library/macros/FortLewis", |
From: Mike G. v. a. <we...@ma...> - 2010-05-20 12:35:14
|
Log Message: ----------- Insure that error files can be read from the web even if the files are served using lighttpd and port 8080 instead of the main server. This adds group readable and executable permissions to the working directory for creating the tex files. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Hardcopy.pm Revision Data ------------- Index: Hardcopy.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Hardcopy.pm,v retrieving revision 1.102 retrieving revision 1.103 diff -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -Llib/WeBWorK/ContentGenerator/Hardcopy.pm -u -r1.102 -r1.103 --- lib/WeBWorK/ContentGenerator/Hardcopy.pm +++ lib/WeBWorK/ContentGenerator/Hardcopy.pm @@ -568,6 +568,9 @@ $self->add_errors("Couldn't create temporary working directory: ".CGI::code(CGI::escapeHTML($@))); return; } + # make sure the directory can be read by other daemons e.g. lighttpd + chmod 0755, $temp_dir_path; + # do some error checking unless (-e $temp_dir_path) { |
From: Arnie P. v. a. <we...@ma...> - 2010-05-19 15:15:10
|
Log Message: ----------- Add in a default timezone (America/New_York) as in the head version Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.189.2.7.2.14 retrieving revision 1.189.2.7.2.15 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.189.2.7.2.14 -r1.189.2.7.2.15 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -559,12 +559,13 @@ # # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' # -# If left blank, the system timezone will be used. This is usually what you -# want. You might want to set this if your server is NOT in the same timezone as +# If left blank, the system timezone is supposed to be used. This is usually what you +# want. However, people have had trouble with this so it's best to set your timezone here. +# You might want to set this if your server is NOT in the same timezone as # your school. If just a few courses are in a different timezone, set this in # course.conf for the affected courses instead. # -$siteDefaults{timezone} = ""; +$siteDefaults{timezone} = "America/New_York"; # The default_templates_course is used by default to create a new course. # The contents of the templates directory are copied from this course |
From: Mike G. v. a. <we...@ma...> - 2010-05-19 02:07:53
|
Log Message: ----------- added definition of sub check_user_id Modified Files: -------------- webwork2/lib/WeBWorK: DB.pm webwork2/lib/WeBWorK/ContentGenerator/Instructor: UserList.pm Revision Data ------------- Index: DB.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/DB.pm,v retrieving revision 1.110 retrieving revision 1.111 diff -Llib/WeBWorK/DB.pm -Llib/WeBWorK/DB.pm -u -r1.110 -r1.111 --- lib/WeBWorK/DB.pm +++ lib/WeBWorK/DB.pm @@ -1915,6 +1915,15 @@ # utilities ################################################################################ +sub check_user_id { # (valid characters are [-a-zA-Z0-9_.,]) + my $value = shift; + if ($value =~ m/^[-a-zA-Z0-9_.]*,?(set_id:)?[-a-zA-Z0-9_.]*(,g)?$/ ) { + return 1; + } else { + croak "invalid characters in user_id field: '$value' (valid characters are [-a-zA-Z0-9_.,])"; + return 0; + } +} # the (optional) second argument to checkKeyfields is to support versioned # (gateway) sets, which may include commas in certain fields (in particular, # set names (e.g., setDerivativeGateway,v1) and user names (e.g., @@ -1937,13 +1946,10 @@ croak "invalid characters in '$keyfield' field: '$value' (valid characters are [-a-zA-Z0-9_.,])" unless $value =~ m/^[-a-zA-Z0-9_.,]*$/; } elsif ($versioned and $keyfield eq "user_id") { - croak "invalid characters in '$keyfield' field: '$value' (valid characters are [-a-zA-Z0-9_.,])" - unless ( $value =~ m/^[-a-zA-Z0-9_.]*,?(set_id:)?[-a-zA-Z0-9_.]*(,g)?$/ ); + check_user_id($value); # (valid characters are [-a-zA-Z0-9_.,]) see above. } elsif ($keyfield eq "ip_mask") { croak "invalid characters in '$keyfield' field: '$value' (valid characters are [-a-fA-F0-9_.:/])" unless $value =~ m/^[-a-fA-F0-9_.:\/]*$/; - } elsif ($keyfield eq "user_id") { - } else { croak "invalid characters in '$keyfield' field: '$value' (valid characters are [-a-zA-Z0-9_.])" @@ -1952,6 +1958,7 @@ } } + # checkArgs spec syntax: # # spec = list_item | item* Index: UserList.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList.pm,v retrieving revision 1.96 retrieving revision 1.97 diff -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -Llib/WeBWorK/ContentGenerator/Instructor/UserList.pm -u -r1.96 -r1.97 --- lib/WeBWorK/ContentGenerator/Instructor/UserList.pm +++ lib/WeBWorK/ContentGenerator/Instructor/UserList.pm @@ -69,7 +69,7 @@ #use CGI qw(-nosticky ); use WeBWorK::CGI; use WeBWorK::File::Classlist; -use WeBWorK::DB; +use WeBWorK::DB qw(check_user_id); use WeBWorK::Utils qw(readFile readDirectory cryptPassword); use constant HIDE_USERS_THRESHHOLD => 200; use constant EDIT_FORMS => [qw(cancelEdit saveEdit)]; |
From: Mike G. v. a. <we...@ma...> - 2010-05-18 23:49:47
|
Log Message: ----------- Fixed a misplaced period in a flag name Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.99 retrieving revision 1.100 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.99 -r1.100 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -1662,7 +1662,7 @@ my $rh_new_problem_options = { -type => 'radio', -name => "action.save_as.saveMode", - -value => "new_independent_problem.", + -value => "new_independent_problem", -onfocus => $onChange, }; $rh_new_problem_options->{checked}=1 unless $can_add_problem_to_set; |
From: Arnie P. v. a. <we...@ma...> - 2010-05-18 19:03:23
|
Log Message: ----------- Replace hard coded URL by $ce->{webworkURLs}{bugReporter} Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.98 retrieving revision 1.99 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.98 -r1.99 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -478,7 +478,7 @@ $libraryName = 'rochester'; # make sure there is some default component defined. } - my $BUGZILLA = "http://bugs.webwork.rochester.edu/enter_bug.cgi?product=Problem%20libraries". + my $BUGZILLA = "$ce->{webworkURLs}{bugReporter}?product=Problem%20libraries". "&component=$libraryName&bug_file_loc=${editFilePath}_with_problemSeed=".$self->{problemSeed}; #FIXME # The construction of this URL is somewhat fragile. A separate module could be devoted to intelligent reporting of bugs. |
From: Arnie P. v. a. <we...@ma...> - 2010-05-18 18:27:15
|
Log Message: ----------- Set $webworkURLs{bugReporter} = "http://wwrk.maa.org/bugzilla3/enter_bug.cgi"; Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.224 retrieving revision 1.225 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.224 -r1.225 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -259,7 +259,7 @@ $webworkURLs{docs} = "http://webwork.maa.org"; # URL of WeBWorK Bugzilla database. -$webworkURLs{bugReporter} = "http://bugs.webwork.rochester.edu/"; +$webworkURLs{bugReporter} = "http://wwrk.maa.org/bugzilla3/enter_bug.cgi"; # Location of CSS # $webworkURLs{stylesheet} = "$webworkURLs{htdocs}/css/${defaultTheme}.css"; |
From: Arnie P. v. a. <we...@ma...> - 2010-05-17 17:17:37
|
Log Message: ----------- 1. Make the default locations of CAPA resources match the set up instructions 2. Add paths to library macros so that various collections of problems work OK Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.189.2.7.2.13 retrieving revision 1.189.2.7.2.14 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.189.2.7.2.13 -r1.189.2.7.2.14 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -857,10 +857,14 @@ ".", # search the problem file's directory $courseDirs{macros}, $pg{directories}{macros}, - "$courseDirs{templates}/Library/macros/Dartmouth", "$courseDirs{templates}/Library/macros/Union", - "$courseDirs{templates}/Library/macros/NAU", + "$courseDirs{templates}/Library/macros/HughesHallett", "$courseDirs{templates}/Library/macros/Michigan", + "$courseDirs{templates}/Library/macros/CollegeOfIdaho", + "$courseDirs{templates}/Library/macros/FortLewis", + "$courseDirs{templates}/Library/macros/TCNJ", + "$courseDirs{templates}/Library/macros/NAU", + "$courseDirs{templates}/Library/macros/Dartmouth", ]; # The applet search path. If a full URL is given, it is used unmodified. If an @@ -886,10 +890,10 @@ # Locations of CAPA resources. (Only necessary if you need to use converted CAPA # problems.) -$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", -$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", -$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", -$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", +$pg{specialPGEnvironmentVars}{CAPA_Tools} = "/opt/webwork/CAPA/CAPA_Tools/", +$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "/opt/webwork/CAPA/CAPA_MCTools/", +$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$webworkDirs{htdocs}/CAPA_Graphics/", +$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$webworkURLs{htdocs}/CAPA_Graphics/", # Size in pixels of dynamically-generated images, i.e. graphs. $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
From: Arnie P. v. a. <we...@ma...> - 2010-05-17 17:07:46
|
Log Message: ----------- Make the default locations of CAPA resources match the set up instructions. This was changed previously but was lost on an update. Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.223 retrieving revision 1.224 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.223 -r1.224 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -901,10 +901,10 @@ # Locations of CAPA resources. (Only necessary if you need to use converted CAPA # problems.) -$pg{specialPGEnvironmentVars}{CAPA_Tools} = "$courseDirs{macros}/CAPA_Tools/", -$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "$courseDirs{macros}/CAPA_MCTools/", -$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$courseDirs{html}/CAPA_Graphics/", -$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$courseURLs{html}/CAPA_Graphics/", +$pg{specialPGEnvironmentVars}{CAPA_Tools} = "/opt/webwork/CAPA/CAPA_Tools/", +$pg{specialPGEnvironmentVars}{CAPA_MCTools} = "/opt/webwork/CAPA/CAPA_MCTools/", +$pg{specialPGEnvironmentVars}{CAPA_GraphicsDirectory} = "$webworkDirs{htdocs}/CAPA_Graphics/", +$pg{specialPGEnvironmentVars}{CAPA_Graphics_URL} = "$webworkURLs{htdocs}/CAPA_Graphics/", # Size in pixels of dynamically-generated images, i.e. graphs. $pg{specialPGEnvironmentVars}{onTheFlyImageSize} = 400, |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 20:02:25
|
Log Message: ----------- commented out a warning about using RCORD_FORM_LABELS until I can fix it properly -- it's used by ProblemRandomize for example. Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.44 retrieving revision 1.45 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.44 -r1.45 --- macros/PG.pl +++ macros/PG.pl @@ -155,7 +155,8 @@ sub RECORD_FORM_LABEL { # this stores form data (such as sticky answers), but does nothing more # it's a bit of hack since we are storing these in the # KEPT_EXTRA_ANSWERS queue even if they aren't answers per se. - warn "Using RECORD_FORM_LABEL -- deprecated?"; + #FIXME + # warn "Using RECORD_FORM_LABEL -- deprecated? use $PG->store_persistent_data instead."; RECORD_EXTRA_ANSWERS(@_); } |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 19:08:03
|
Log Message: ----------- toned down the warning to avoid clogging the log file Modified Files: -------------- webwork2/lib: WeBWorK.pm Revision Data ------------- Index: WeBWorK.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK.pm,v retrieving revision 1.103 retrieving revision 1.104 diff -Llib/WeBWorK.pm -Llib/WeBWorK.pm -u -r1.103 -r1.104 --- lib/WeBWorK.pm +++ lib/WeBWorK.pm @@ -359,7 +359,10 @@ writeTimingLogEntry($ce, "[".$r->uri."]", sprintf("runTime = %.3f sec", $cg_duration)." ".$ce->{dbLayoutName}, ""); debug("returning result: " . (defined $result ? $result : "UNDEF") . "\n"); - warn "this warning is needed to zero out \@LimitedPolynomial::BOP::ISA @LimitedPolynomial::BOP::ISA no-one knows why"; + @LimitedPolynomial::BOP::ISA; #FIXME this is needed to zero out + #\@LimitedPolynomial::BOP::ISA and prevent error messages of the form + #[Sat May 15 14:23:08 2010] [warn] [client 127.0.0.1] [/webwork2/gage_course/test_set/6/] + #Can't locate package LimitedPolynomial::BOP for @LimitedPolynomial::BOP::add::ISA at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 115., referer: http://localhost/webwork2/gage_course/test_set/6/ no one knows why return $result; } |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 19:06:47
|
Log Message: ----------- format change only. Modified Files: -------------- pg/macros: contextLimitedPolynomial.pl Revision Data ------------- Index: contextLimitedPolynomial.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextLimitedPolynomial.pl,v retrieving revision 1.24 retrieving revision 1.25 diff -Lmacros/contextLimitedPolynomial.pl -Lmacros/contextLimitedPolynomial.pl -u -r1.24 -r1.25 --- macros/contextLimitedPolynomial.pl +++ macros/contextLimitedPolynomial.pl @@ -50,6 +50,9 @@ sub _contextLimitedPolynomial_init {LimitedPolynomial::Init()}; # don't load it again ################################################## +# +# Handle common checking for BOPs +# package LimitedPolynomial; @@ -103,6 +106,8 @@ # # Handle common checking for BOPs # + + package LimitedPolynomial::BOP; # @@ -110,6 +115,7 @@ # Otherwise, do an operator-specific check for if the polynomial is OK. # Otherwise report an error. # + sub _check { my $self = shift; my $super = ref($self); $super =~ s/^.*?::/Parser::/; |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 19:05:01
|
Log Message: ----------- added fixes to PGalias.pm and PGcore.pm related to using $self-> in contexts where the binding was not as expected (e.g. in 'blah'. $self->{foobar} .'blah' ) Other minor fixes and improvements. Modified Files: -------------- pg/lib: PGalias.pm PGcore.pm PGloadfiles.pm pg/lib/WeBWorK/PG: IO.pm Revision Data ------------- Index: PGcore.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGcore.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/PGcore.pm -Llib/PGcore.pm -u -r1.3 -r1.4 --- lib/PGcore.pm +++ lib/PGcore.pm @@ -27,7 +27,7 @@ use PGrandom; use PGalias; use PGloadfiles; -use WeBWorK::PG::IO; +use WeBWorK::PG::IO(); # don't important any command directly use Tie::IxHash; ################################## @@ -668,22 +668,25 @@ my $path = shift; my $delim = "/"; my $tmpDirectory = $self->tempDirectory(); +#warn "\nTMP tmpDirectory $tmpDirectory"; unless ( -e $tmpDirectory) { # if by some unlucky chance the tmpDirectory hasn't been created, create it. my $parentDirectory = $tmpDirectory; $parentDirectory =~s|/$||; # remove a trailing / $parentDirectory =~s|/\w*$||; # remove last node my ($perms, $groupID) = (stat $parentDirectory)[2,5]; - createDirectory($tmpDirectory, $perms, $groupID) - or warn "Failed to create directory at $path"; + #FIXME where is the parentDirectory defined?? +#warn "Creating tmp directory at $tmpDirectory, perms $perms groupID $groupID"; + $self->createDirectory($tmpDirectory, $perms, $groupID) + or warn "Failed to create parent tmp directory at $path"; } # use the permissions/group on the temp directory itself as a template my ($perms, $groupID) = (stat $tmpDirectory)[2,5]; - #warn "&urePathToTmpFile: perms=$perms groupID=$groupID\n"; +#warn "&urePathToTmpFile: directory=$tmpDirectory, perms=$perms, groupID=$groupID\n"; # if the path starts with $tmpDirectory (which is permitted but optional) remove this initial segment $path =~ s|^$tmpDirectory|| if $path =~ m|^$tmpDirectory|; - #$path = convertPath($path); + #$path = $self->convertPath($path); # find the nodes on the given path my @nodes = split("$delim",$path); @@ -693,11 +696,13 @@ while (@nodes>1) { $path = $path . shift (@nodes) . "/"; #convertPath($path . shift (@nodes) . "/"); +#warn "\PATH is now $path"; unless (-e $path) { #system("mkdir $path"); #createDirectory($path,$Global::tmp_directory_permission, $Global::numericalGroupID) - createDirectory($path, $perms, $groupID) - or warn "Failed to create directory at $path"; +#warn "PATH $path perms $perms groupID $groupID"; + $self->createDirectory($path, $perms, $groupID) + or warn "Failed to create directory at $path with permissions $perms and groupID $groupID"; } } Index: PGalias.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGalias.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -Llib/PGalias.pm -Llib/PGalias.pm -u -r1.5 -r1.6 --- lib/PGalias.pm +++ lib/PGalias.pm @@ -160,7 +160,6 @@ my $aux_file_path = shift @_; my $resource_alias = new PGresource($aux_file_path); # just call it alias? FIXME -- not in use yet. - # warn "make alias for $aux_file_path"; warn "Empty string used as input into the function alias" unless $aux_file_path; my $displayMode = $self->{displayMode}; @@ -460,17 +459,18 @@ $gifFilePath = "$aux_file_path.gif"; } else { # we assume the file is in the same directory as the problem source file - $gifFilePath = $templateDirectory . ($self->directoryFromPath($fileName)) . "$aux_file_path.gif"; + my $dir = $self->directoryFromPath($fileName); + $gifFilePath = "$templateDirectory${dir}$aux_file_path.gif"; } my $gifFileName = $self->fileFromPath($gifFilePath); - $gifFileName =~ /^(.*)\.gif$/; - my $pngFilePath = $self->surePathToTmpFile("${tempDirectory}png/$setNumber-$probNum-$1.png"); - my $returnCode = system "cat $gifFilePath | ${$envir->{externalGif2PngPath}} > $pngFilePath"; - + my $pngFilePath = $self->surePathToTmpFile("${tempDirectory}png/$setNumber-$probNum-$1.png"); + my $command = $envir->{externalGif2PngPath}; + my $returnCode = system "cat $gifFilePath | $command > $pngFilePath"; + #warn "FILE path $pngFilePath exists =", -e $pngFilePath; if ($returnCode or not -e $pngFilePath) { - die "failed to convert $gifFilePath to $pngFilePath using gif->png with ${$envir->{externalGif2PngPath}}: $!\n"; + warn "returnCode $returnCode: failed to convert $gifFilePath to $pngFilePath using gif->png with $command: $!"; } $adr_output = $pngFilePath; @@ -575,7 +575,8 @@ # $fileName is obtained from environment for PGeval # it gives the full path to the current problem my $pngSourceFile = $self->convertPath("$templateDirectory${filePath}$aux_file_path.png"); - my $link = "gif/".$self->{uniqIDstub}."-$aux_file_path.$ext"; + my $uniqIDstub = $self->{uniqIDstub}; + my $link = "gif/${uniqIDstub}-$aux_file_path.$ext"; my $linkPath = $self->surePathToTmpFile($link); $adr_output = "${tempURL}$link"; #warn "linkPath is $linkPath"; @@ -635,7 +636,8 @@ $pngFilePath = "$aux_file_path.png"; } else { # we assume the file is in the same directory as the problem source file - $pngFilePath = $templateDirectory . ($self->directoryFromPath($fileName)) . "$aux_file_path.png"; + my $dir = $self->directoryFromPath($fileName); + $pngFilePath = "$templateDirectory${dir}$aux_file_path.png"; } $adr_output = $pngFilePath; Index: PGloadfiles.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGloadfiles.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -Llib/PGloadfiles.pm -Llib/PGloadfiles.pm -u -r1.1 -r1.2 --- lib/PGloadfiles.pm +++ lib/PGloadfiles.pm @@ -155,7 +155,7 @@ use WeBWorK::PG::Translator; use WeBWorK::PG::IO; -our @ISA = ( qw ( PGcore ) ); # look up features in PGcore -- in this case we want the environment. +our @ISA = qw ( PGcore ) ; # look up features in PGcore -- in this case we want the environment. Index: IO.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/WeBWorK/PG/IO.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -Llib/WeBWorK/PG/IO.pm -Llib/WeBWorK/PG/IO.pm -u -r1.5 -r1.6 --- lib/WeBWorK/PG/IO.pm +++ lib/WeBWorK/PG/IO.pm @@ -194,15 +194,21 @@ sub createDirectory { my ($dirName, $permission, $numgid) = @_; $permission = (defined($permission)) ? $permission : '0770'; - # FIXME -- find out where the permission is supposed to be defined. - #warn "dirName is $dirName and permission is $permission"; + # FIXME -- find out where the permission is supposed to be defined + my $errors = ''; mkdir($dirName, $permission) - or warn "Can't do mkdir($dirName, $permission): $!"; + or $errors .= "Can't do mkdir($dirName, $permission): $!\n".caller(3); chmod($permission, $dirName) - or warn "Can't do chmod($permission, $dirName): $!"; + or $errors .= "Can't do chmod($permission, $dirName): $!\n".caller(3); unless ($numgid == -1) { chown(-1,$numgid,$dirName) - or warn "Can't do chown(-1,$numgid,$dirName): $!"; + or $errors .= "Can't do chown(-1,$numgid,$dirName): $!\n".caller(3); + } + if ($errors) { + warn $errors; + return 0; + } else { + return 1; } } |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 18:46:15
|
Log Message: ----------- added useless reference to @LimitedPolynomial::BOP::ISA to the end of the dispatcher in WeBWorK.pm to stop warning messages such as these: [Sat May 15 14:33:35 2010] [warn] [client 127.0.0.1] [/webwork2/gage_course/test_set/6/] Can't locate package LimitedPolynomial::BOP for @LimitedPolynomial::BOP::power::ISA at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 115., referer: http://localhost/webwork2/gage_course/test_set/6/ No explanation for the warning messages nor as to why this stops them. contextLimitedVector.pl is similar and does not create similar warning messages. Modified Files: -------------- webwork2/lib: WeBWorK.pm webwork2/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: WeBWorK.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK.pm,v retrieving revision 1.102 retrieving revision 1.103 diff -Llib/WeBWorK.pm -Llib/WeBWorK.pm -u -r1.102 -r1.103 --- lib/WeBWorK.pm +++ lib/WeBWorK.pm @@ -359,7 +359,7 @@ writeTimingLogEntry($ce, "[".$r->uri."]", sprintf("runTime = %.3f sec", $cg_duration)." ".$ce->{dbLayoutName}, ""); debug("returning result: " . (defined $result ? $result : "UNDEF") . "\n"); - + warn "this warning is needed to zero out \@LimitedPolynomial::BOP::ISA @LimitedPolynomial::BOP::ISA no-one knows why"; return $result; } Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.221 retrieving revision 1.222 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.221 -r1.222 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -1204,7 +1204,7 @@ CGI::h3("PG object"), ref2string($pg, {'WeBWorK::PG::Translator' => 1}); } - + debug("leaving body of Problem.pm"); return ""; } |
From: Mike G. v. a. <we...@ma...> - 2010-05-15 02:17:33
|
Log Message: ----------- Fixed a bug that interferec with constructing the correct path to a gif file Modified Files: -------------- pg/lib: PGalias.pm Revision Data ------------- Index: PGalias.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGalias.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -Llib/PGalias.pm -Llib/PGalias.pm -u -r1.4 -r1.5 --- lib/PGalias.pm +++ lib/PGalias.pm @@ -57,9 +57,9 @@ use strict; use Exporter; use PGcore; -use WeBWorK::PG::IO; +#use WeBWorK::PG::IO; -our @ISA = ( qw ( PGcore ) ); # look up features in PGcore -- in this case we want the environment. +our @ISA = qw ( PGcore ); # look up features in PGcore -- in this case we want the environment. # new # Create one alias object per question (and per PGcore object) @@ -266,7 +266,8 @@ my $self = shift; my $aux_file_path = shift; # warn "aux_file for html $aux_file_path"; - my $envir = $self->{envir}; my $fileName = $envir->{fileName}; + my $envir = $self->{envir}; + my $fileName = $self->{fileName}; my $htmlDirectory = $envir->{htmlDirectory}; my $htmlURL = $envir->{htmlURL}; my $tempDirectory = $envir->{tempDirectory}; @@ -311,7 +312,7 @@ # $fileName is obtained from environment for PGeval # it gives the full path to the current problem my $filePath = $self->directoryFromPath($fileName); - my $htmlFileSource = convertPath("$templateDirectory${filePath}$aux_file_path.html"); + my $htmlFileSource = $self->convertPath("$templateDirectory${filePath}$aux_file_path.html"); my $link = "html/".$self->{uniqIDstub}."-$aux_file_path.$ext"; my $linkPath = $self->surePathToTmpFile($link); $adr_output = "${tempURL}$link"; @@ -335,7 +336,8 @@ my $aux_file_path = shift; # warn "entering alias_for_gif_in_html_mode $aux_file_path"; - my $envir = $self->{envir}; my $fileName = $envir->{fileName}; + my $envir = $self->{envir}; + my $fileName = $self->{fileName}; my $htmlDirectory = $envir->{htmlDirectory}; my $htmlURL = $envir->{htmlURL}; my $tempDirectory = $envir->{tempDirectory}; @@ -380,12 +382,14 @@ # For a gif file the alias macro creates an alias under the html/images directory # which points to the gif file in the problem directory. # All of the subdirectories of html/tmp/gif which are needed are also created. - my $filePath = $self->directoryFromPath($fileName); - + #warn "fileName is $fileName $self"; + my $filePath = ( $self->directoryFromPath($fileName) ); + #warn "filePath is $filePath"; # $fileName is obtained from environment for PGeval # it gives the full path to the current problem - my $gifSourceFile = convertPath("$templateDirectory${filePath}$aux_file_path.gif"); + my $gifSourceFile = $self->convertPath("$templateDirectory${filePath}$aux_file_path.gif"); #my $link = "gif/$studentLogin-$psvnNumber-set$setNumber-prob$probNum-$aux_file_path.$ext"; + #warn "fileName is $fileName filePath is $filePath gifSourceFile is $gifSourceFile"; # Make file names work in Library Browser when the images in several # files have the same names. @@ -462,7 +466,6 @@ my $gifFileName = $self->fileFromPath($gifFilePath); $gifFileName =~ /^(.*)\.gif$/; -# my $pngFilePath = $self->surePathToTmpFile("${tempDirectory}png/$probNum-$1.png"); my $pngFilePath = $self->surePathToTmpFile("${tempDirectory}png/$setNumber-$probNum-$1.png"); my $returnCode = system "cat $gifFilePath | ${$envir->{externalGif2PngPath}} > $pngFilePath"; |
From: Arnie P. v. a. <we...@ma...> - 2010-05-14 21:54:03
|
Log Message: ----------- Add FortLewis macros to macrosPath. Explain setting a specific timezone Modified Files: -------------- webwork2/conf: global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork2/conf/global.conf.dist,v retrieving revision 1.222 retrieving revision 1.223 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.222 -r1.223 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -559,8 +559,9 @@ # # perl -MDateTime::TimeZone -e 'print join "\n", DateTime::TimeZone::links' # -# If left blank, the system timezone will be used. This is usually what you -# want. You might want to set this if your server is NOT in the same timezone as +# If left blank, the system timezone is supposed to be used. This is usually what you +# want. However, people have had trouble with this so it's best to set your timezone here. +# You might want to set this if your server is NOT in the same timezone as # your school. If just a few courses are in a different timezone, set this in # course.conf for the affected courses instead. # @@ -871,6 +872,7 @@ "$courseDirs{templates}/Library/macros/HughesHallett", "$courseDirs{templates}/Library/macros/Michigan", "$courseDirs{templates}/Library/macros/CollegeOfIdaho", + "$courseDirs{templates}/Library/macros/FortLewis", "$courseDirs{templates}/Library/macros/TCNJ", "$courseDirs{templates}/Library/macros/NAU", "$courseDirs{templates}/Library/macros/Dartmouth", |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 17:17:03
|
Log Message: ----------- correct initialiazation problem for showPartialCorrectAnswers Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.43 retrieving revision 1.44 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.43 -r1.44 --- macros/PG.pl +++ macros/PG.pl @@ -263,18 +263,14 @@ # check that answers match # gather up PG_FLAGS elements - - my @elements = qw(showPartialCorrectAnswers - recordSubmittedAnswers refreshCachedImages - hintExists solutionExists - ); - while (@elements) { - my $var= shift @elements; - $PG->{flags}->{$var} = ${$var}; - } - $PG->{flags}->{comment} = $pgComment; #KLUDGE #FIXME - $PG->{flags}->{showHintLimit} = $showHint; #KLUDGE #FIXME - + $PG->{flags}->{showPartialCorrectAnswers} = defined($showPartialCorrectAnswers)? $showPartialCorrectAnswers : 1 ; + $PG->{flags}->{recordSubmittedAnswers} = defined($recordSubmittedAnswers)? $recordSubmittedAnswers : 1 ; + $PG->{flags}->{refreshCachedImages} = defined($refreshCachedImages)? $refreshCachedImages : 0 ; + $PG->{flags}->{hintExists} = defined($hintExists)? $hintExists : 0 ; + $PG->{flags}->{solutionExists} = defined($solutionExists)? $solutionExists : 0 ; + $PG->{flags}->{comment} = defined($pgComment)? $pgComment :'' ; + $PG->{flags}->{showHintLimit} = defined($showHint)? $showHint : 0 ; + # install problem grader if (defined($PG->{flags}->{PROBLEM_GRADER_TO_USE}) ) { |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 17:12:20
|
Log Message: ----------- Changed the name of {PG_FLAGS} to {flags} for confomity Modified Files: -------------- pg/macros: PG.pl Revision Data ------------- Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.42 retrieving revision 1.43 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.42 -r1.43 --- macros/PG.pl +++ macros/PG.pl @@ -34,10 +34,10 @@ $ANSWER_PREFIX = $PG->{ANSWER_PREFIX}; $QUIZ_PREFIX = $PG->{QUIZ_PREFIX}; - $showPartialCorrectAnswers = $PG->{PG_FLAGS}->{showPartialCorrectAnswers}; - $showHint = $PG->{PG_FLAGS}->{showHint}; - $solutionExists = $PG->{PG_FLAGS}->{solutionExists}; - $hintExists = $PG->{PG_FLAGS}->{hintExists}; + $showPartialCorrectAnswers = $PG->{flags}->{showPartialCorrectAnswers}; + $showHint = $PG->{flags}->{showHint}; + $solutionExists = $PG->{flags}->{solutionExists}; + $hintExists = $PG->{flags}->{hintExists}; $pgComment = ''; %gifs_created = %{ $PG->{gifs_created}}; %external_refs = %{ $PG->{external_refs}}; @@ -270,31 +270,31 @@ ); while (@elements) { my $var= shift @elements; - $PG->{PG_FLAGS}->{$var} = ${$var}; + $PG->{flags}->{$var} = ${$var}; } - $PG->{PG_FLAGS}->{comment} = $pgComment; #KLUDGE #FIXME - $PG->{PG_FLAGS}->{showHintLimit} = $showHint; #KLUDGE #FIXME + $PG->{flags}->{comment} = $pgComment; #KLUDGE #FIXME + $PG->{flags}->{showHintLimit} = $showHint; #KLUDGE #FIXME # install problem grader - if (defined($PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE}) ) { + if (defined($PG->{flags}->{PROBLEM_GRADER_TO_USE}) ) { # problem grader defined within problem -- no further action needed } elsif ( defined( $rh_envir->{PROBLEM_GRADER_TO_USE} ) ) { if (ref($rh_envir->{PROBLEM_GRADER_TO_USE}) eq 'CODE' ) { # user defined grader - $PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE} = $rh_envir->{PROBLEM_GRADER_TO_USE}; + $PG->{flags}->{PROBLEM_GRADER_TO_USE} = $rh_envir->{PROBLEM_GRADER_TO_USE}; } elsif ($rh_envir->{PROBLEM_GRADER_TO_USE} eq 'std_problem_grader' ) { if (defined(&std_problem_grader) ){ - $PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE} = \&std_problem_grader; # defined in PGanswermacros.pl + $PG->{flags}->{PROBLEM_GRADER_TO_USE} = \&std_problem_grader; # defined in PGanswermacros.pl } # std_problem_grader is the default in any case so don't give a warning. } elsif ($rh_envir->{PROBLEM_GRADER_TO_USE} eq 'avg_problem_grader' ) { if (defined(&avg_problem_grader) ){ - $PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE} = \&avg_problem_grader; # defined in PGanswermacros.pl + $PG->{flags}->{PROBLEM_GRADER_TO_USE} = \&avg_problem_grader; # defined in PGanswermacros.pl } } else { - warn "Error: ". $PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE} . "is not a known program grader."; + warn "Error: ". $PG->{flags}->{PROBLEM_GRADER_TO_USE} . "is not a known program grader."; } } elsif (defined(&std_problem_grader)) { - $PG->{PG_FLAGS}->{PROBLEM_GRADER_TO_USE} = \&std_problem_grader; # defined in PGanswermacros.pl + $PG->{flags}->{PROBLEM_GRADER_TO_USE} = \&std_problem_grader; # defined in PGanswermacros.pl } else { # PGtranslator will install its default problem grader } @@ -351,8 +351,8 @@ } push @KEPT_EXTRA_ANSWERS, keys %{$PG->{PERSISTENCE_HASH}}; my %PG_ANSWERS_HASH = @PG_ANSWERS; - $PG->{PG_FLAGS}->{KEPT_EXTRA_ANSWERS} = \@KEPT_EXTRA_ANSWERS; - $PG->{PG_FLAGS}->{ANSWER_ENTRY_ORDER} = \@PG_ANSWER_ENTRY_ORDER; + $PG->{flags}->{KEPT_EXTRA_ANSWERS} = \@KEPT_EXTRA_ANSWERS; + $PG->{flags}->{ANSWER_ENTRY_ORDER} = \@PG_ANSWER_ENTRY_ORDER; warn "KEPT_EXTRA_ANSWERS", join(" ", @KEPT_EXTRA_ANSWERS), $BR if $ans_debug==1; warn "PG_ANSWER_ENTRY_ORDER",join(" ",@PG_ANSWER_ENTRY_ORDER), $BR if $ans_debug==1; warn "DEBUG messages", join( "$BR",@{$PG->get_debug_messages} ) if $ans_debug==1; @@ -365,7 +365,7 @@ # warn pretty_print($PG->{PG_ANSWERS_HASH}); #warn "printing another warning"; - (\$STRINGforOUTPUT, \$STRINGforHEADER_TEXT,\%PG_ANSWERS_HASH, $PG->{PG_FLAGS} , $PG ); + (\$STRINGforOUTPUT, \$STRINGforHEADER_TEXT,\%PG_ANSWERS_HASH, $PG->{flags} , $PG ); } ################################################################################ # |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 17:11:57
|
Log Message: ----------- Changed the name of {PG_FLAGS} to {flags} for confomity Modified Files: -------------- pg/lib: PGcore.pm Revision Data ------------- Index: PGcore.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGcore.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -Llib/PGcore.pm -Llib/PGcore.pm -u -r1.2 -r1.3 --- lib/PGcore.pm +++ lib/PGcore.pm @@ -119,7 +119,7 @@ $self->{PG_problem_grader} = $self->{envir}->{PROBLEM_GRADER_TO_USE}; $self->{PG_alias} = new PGalias($self->{envir}); $self->{PG_loadMacros} = new PGloadfiles($self->{envir}); - $self->{PG_FLAGS} = { + $self->{flags} = { showpartialCorrectAnswers => 1, showHint => 1, hintExists => 0, |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 16:08:31
|
Log Message: ----------- inserted $self-> before directoryFromPath and surePathToTmpFile calls Modified Files: -------------- pg/lib: PGalias.pm Revision Data ------------- Index: PGalias.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGalias.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/PGalias.pm -Llib/PGalias.pm -u -r1.3 -r1.4 --- lib/PGalias.pm +++ lib/PGalias.pm @@ -310,7 +310,7 @@ # $fileName is obtained from environment for PGeval # it gives the full path to the current problem - my $filePath = directoryFromPath($fileName); + my $filePath = $self->directoryFromPath($fileName); my $htmlFileSource = convertPath("$templateDirectory${filePath}$aux_file_path.html"); my $link = "html/".$self->{uniqIDstub}."-$aux_file_path.$ext"; my $linkPath = $self->surePathToTmpFile($link); @@ -380,7 +380,7 @@ # For a gif file the alias macro creates an alias under the html/images directory # which points to the gif file in the problem directory. # All of the subdirectories of html/tmp/gif which are needed are also created. - my $filePath = directoryFromPath($fileName); + my $filePath = $self->directoryFromPath($fileName); # $fileName is obtained from environment for PGeval # it gives the full path to the current problem @@ -456,10 +456,10 @@ $gifFilePath = "$aux_file_path.gif"; } else { # we assume the file is in the same directory as the problem source file - $gifFilePath = $templateDirectory . directoryFromPath($fileName) . "$aux_file_path.gif"; + $gifFilePath = $templateDirectory . ($self->directoryFromPath($fileName)) . "$aux_file_path.gif"; } - my $gifFileName = fileFromPath($gifFilePath); + my $gifFileName = $self->fileFromPath($gifFilePath); $gifFileName =~ /^(.*)\.gif$/; # my $pngFilePath = $self->surePathToTmpFile("${tempDirectory}png/$probNum-$1.png"); @@ -483,10 +483,10 @@ ################################################################################ if ($aux_file_path =~ m|^$htmlDirectory| or $aux_file_path =~ m|^$tempDirectory|) { # To serve an eps file copy an eps version of the gif file to the subdirectory of eps/ - my $linkPath = directoryFromPath($fileName); + my $linkPath = $self->directoryFromPath($fileName); my $gifSourceFile = "$aux_file_path.gif"; - my $gifFileName = fileFromPath($gifSourceFile); + my $gifFileName = $self->fileFromPath($gifSourceFile); $adr_output = surePathToTmpFile("$tempDirectory/eps/$studentLogin-$psvnNumber-$gifFileName.eps") ; if (-e $gifSourceFile) { @@ -499,7 +499,7 @@ } } else { # To serve an eps file copy an eps version of the gif file to a subdirectory of eps/ - my $filePath = directoryFromPath($fileName); + my $filePath = $self->directoryFromPath($fileName); my $gifSourceFile = "${templateDirectory}${filePath}$aux_file_path.gif"; #print "content-type: text/plain \n\nfileName = $fileName and aux_file_path =$aux_file_path<BR>"; $adr_output = surePathToTmpFile("eps/$studentLogin-$psvnNumber-set$setNumber-prob$probNum-$aux_file_path.eps"); @@ -567,7 +567,7 @@ # For a png file the alias macro creates an alias under the html/images directory # which points to the png file in the problem directory. # All of the subdirectories of html/tmp/gif which are needed are also created. - my $filePath = directoryFromPath($fileName); + my $filePath = $self->directoryFromPath($fileName); # $fileName is obtained from environment for PGeval # it gives the full path to the current problem @@ -632,7 +632,7 @@ $pngFilePath = "$aux_file_path.png"; } else { # we assume the file is in the same directory as the problem source file - $pngFilePath = $templateDirectory . directoryFromPath($fileName) . "$aux_file_path.png"; + $pngFilePath = $templateDirectory . ($self->directoryFromPath($fileName)) . "$aux_file_path.png"; } $adr_output = $pngFilePath; @@ -649,11 +649,11 @@ if ($aux_file_path =~ m|^$htmlDirectory| or $aux_file_path =~ m|^$tempDirectory|) { # To serve an eps file copy an eps version of the png file to the subdirectory of eps/ - my $linkPath = directoryFromPath($fileName); + my $linkPath = $self->directoryFromPath($fileName); my $pngSourceFile = "$aux_file_path.png"; my $pngFileName = fileFromPath($pngSourceFile); - $adr_output = surePathToTmpFile("$tempDirectory/eps/$studentLogin-$psvnNumber-$pngFileName.eps") ; + $adr_output = $self->surePathToTmpFile("$tempDirectory/eps/$studentLogin-$psvnNumber-$pngFileName.eps") ; if (-e $pngSourceFile) { #system("cat $pngSourceFile | /usr/math/bin/pngtopnm | /usr/math/bin/pnmdepth 1 | /usr/math/bin/pnmtops -noturn>$adr_output") @@ -665,10 +665,10 @@ } } else { # To serve an eps file copy an eps version of the png file to a subdirectory of eps/ - my $filePath = directoryFromPath($fileName); + my $filePath = $self->directoryFromPath($fileName); my $pngSourceFile = "${templateDirectory}${filePath}$aux_file_path.png"; #print "content-type: text/plain \n\nfileName = $fileName and aux_file_path =$aux_file_path<BR>"; - $adr_output = surePathToTmpFile("eps/$studentLogin-$psvnNumber-set$setNumber-prob$probNum-$aux_file_path.eps") ; + $adr_output = $self->surePathToTmpFile("eps/$studentLogin-$psvnNumber-set$setNumber-prob$probNum-$aux_file_path.eps") ; if (-e $pngSourceFile) { #system("cat $pngSourceFile | /usr/math/bin/pngtopnm | /usr/math/bin/pnmdepth 1 | /usr/math/bin/pnmtops -noturn>$adr_output") && #warn "Unable to create eps file: |$adr_output|\n from file\n |$pngSourceFile|\n in problem $probNum"; |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 14:38:26
|
Log Message: ----------- fixed an error in which surePathToTmp file wasn't prefixed by $self-> Modified Files: -------------- pg/lib: PGalias.pm Revision Data ------------- Index: PGalias.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGalias.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -Llib/PGalias.pm -Llib/PGalias.pm -u -r1.2 -r1.3 --- lib/PGalias.pm +++ lib/PGalias.pm @@ -571,9 +571,9 @@ # $fileName is obtained from environment for PGeval # it gives the full path to the current problem - my $pngSourceFile = convertPath("$templateDirectory${filePath}$aux_file_path.png"); + my $pngSourceFile = $self->convertPath("$templateDirectory${filePath}$aux_file_path.png"); my $link = "gif/".$self->{uniqIDstub}."-$aux_file_path.$ext"; - my $linkPath = surePathToTmpFile($link); + my $linkPath = $self->surePathToTmpFile($link); $adr_output = "${tempURL}$link"; #warn "linkPath is $linkPath"; #warn "adr_output is $adr_output"; |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 13:00:19
|
Log Message: ----------- remove warning Modified Files: -------------- pg/lib: PGalias.pm Revision Data ------------- Index: PGalias.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGalias.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -Llib/PGalias.pm -Llib/PGalias.pm -u -r1.1 -r1.2 --- lib/PGalias.pm +++ lib/PGalias.pm @@ -265,7 +265,7 @@ sub alias_for_html { my $self = shift; my $aux_file_path = shift; - warn "aux_file for html $aux_file_path"; + # warn "aux_file for html $aux_file_path"; my $envir = $self->{envir}; my $fileName = $envir->{fileName}; my $htmlDirectory = $envir->{htmlDirectory}; my $htmlURL = $envir->{htmlURL}; |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 12:54:55
|
Log Message: ----------- remove extraneous warning signs. Modified Files: -------------- pg/lib: PGcore.pm pg/macros: PG.pl Revision Data ------------- Index: PGcore.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/PGcore.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -Llib/PGcore.pm -Llib/PGcore.pm -u -r1.1 -r1.2 --- lib/PGcore.pm +++ lib/PGcore.pm @@ -34,6 +34,16 @@ # Utility macro ################################## +=head2 Utility Macros + + not_null(item) returns 1 or 0 + + empty arrays, empty hashes, strings containing only whitespace are all NULL and return 0 + all undefined quantities are null and return 0 + + +=cut + sub not_null { # empty arrays, empty hashes and strings containing only whitespace are all NULL my $item = shift; return 0 unless defined($item); Index: PG.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PG.pl,v retrieving revision 1.41 retrieving revision 1.42 diff -Lmacros/PG.pl -Lmacros/PG.pl -u -r1.41 -r1.42 --- macros/PG.pl +++ macros/PG.pl @@ -255,7 +255,7 @@ if (defined ($PG->{PG_ANSWERS_HASH}->{$ans_label}) ) { my $responsegroup = $PG->{PG_ANSWERS_HASH}->{$ans_label}->{response}; $responsegroup->extend_response($response_label, $ans_value,$selected); - warn "\n$responsegroup responses are now ", pretty_print($response_group); + #warn "\n$responsegroup responses are now ", pretty_print($response_group); } ''; } |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 12:39:10
|
Log Message: ----------- removed duplicate definition of not_null Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.66 retrieving revision 1.67 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.66 -r1.67 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -192,27 +192,27 @@ $r_ans_rule_count = PG_restricted_eval(q!\$ans_rule_count!); } -=head2 Utility Macros - - not_null(item) returns 1 or 0 - - empty arrays, empty hashes, strings containing only whitespace are all NULL and return 0 - all undefined quantities are null and return 0 - - -=cut - -sub not_null { # empty arrays, empty hashes and strings containing only whitespace are all NULL - my $item = shift; - return 0 unless defined($item); - if (ref($item)=~/ARRAY/) { - return scalar(@{$item}); # return the length - } elsif (ref($item)=~/HASH/) { - return scalar( keys %{$item}); - } else { # string case return 1 if none empty - return ($item =~ /\S/)? 1:0; - } -} +# =head2 Utility Macros +# +# not_null(item) returns 1 or 0 +# +# empty arrays, empty hashes, strings containing only whitespace are all NULL and return 0 +# all undefined quantities are null and return 0 +# +# +# =cut +# +# sub not_null { # empty arrays, empty hashes and strings containing only whitespace are all NULL +# my $item = shift; +# return 0 unless defined($item); +# if (ref($item)=~/ARRAY/) { +# return scalar(@{$item}); # return the length +# } elsif (ref($item)=~/HASH/) { +# return scalar( keys %{$item}); +# } else { # string case return 1 if none empty +# return ($item =~ /\S/)? 1:0; +# } +# } =head2 Answer blank macros: |
From: Mike G. v. a. <we...@ma...> - 2010-05-14 12:04:20
|
Log Message: ----------- Fixed a typo in num_cmp Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.65 retrieving revision 1.66 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.65 -r1.66 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -2099,7 +2099,7 @@ PGsort( sub {$_[0] lt $_[1]}, @_); } sub num_sort { - PGsort( sub {$_[0] < $_[1]}. @_); + PGsort( sub {$_[0] < $_[1]}, @_); } |