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: Mike G. v. a. <we...@ma...> - 2009-12-22 03:49:21
|
Log Message: ----------- updates to make multiple selections work when repairs need to be made. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: CourseAdmin.pm Revision Data ------------- Index: CourseAdmin.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v retrieving revision 1.87 retrieving revision 1.88 diff -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -u -r1.87 -r1.88 --- lib/WeBWorK/ContentGenerator/CourseAdmin.pm +++ lib/WeBWorK/ContentGenerator/CourseAdmin.pm @@ -1821,13 +1821,12 @@ print CGI::h2("archive Course"); - #my $archive_courseID = $r->param("archive_courseID") || ""; my $delete_course_flag = $r->param("delete_course") || ""; my @archive_courseIDs = $r->param("archive_courseIDs"); @archive_courseIDs = () unless @archive_courseIDs; - - my $archive_courseID = shift @archive_courseIDs; + my $archive_courseID = $r->param("archive_courseID"); + $archive_courseID = $archive_courseIDs[0] unless $archive_courseID; my $ce2 = new WeBWorK::CourseEnvironment({ @@ -2097,6 +2096,7 @@ } + shift @archive_courseIDs; # remove the course which has just been archived. if (@archive_courseIDs) { print CGI::start_form(-method=>"POST", -action=>$r->uri); print $self->hidden_authen_fields; |
From: Mike G. v. a. <we...@ma...> - 2009-12-22 03:06:33
|
Log Message: ----------- Added code which allows you to select multiple courses to archive. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: CourseAdmin.pm Revision Data ------------- Index: CourseAdmin.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v retrieving revision 1.86 retrieving revision 1.87 diff -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -Llib/WeBWorK/ContentGenerator/CourseAdmin.pm -u -r1.86 -r1.87 --- lib/WeBWorK/ContentGenerator/CourseAdmin.pm +++ lib/WeBWorK/ContentGenerator/CourseAdmin.pm @@ -1756,11 +1756,11 @@ CGI::th({class=>"LeftHeader"}, "Course Name:"), CGI::td( CGI::scrolling_list( - -name => "archive_courseID", + -name => "archive_courseIDs", -values => \@courseIDs, -default => $archive_courseID, -size => 10, - -multiple => 0, + -multiple => 1, -labels => \%courseLabels, ), ), @@ -1792,14 +1792,15 @@ #my $authz = $r->authz; my $urlpath = $r->urlpath; - my $archive_courseID = $r->param("archive_courseID") || ""; - + my @archive_courseIDs = $r->param("archive_courseIDs"); + @archive_courseIDs = () unless @archive_courseIDs; my @errors; - - if ($archive_courseID eq "") { - push @errors, "You must specify a course name."; - } elsif ($archive_courseID eq $urlpath->arg("courseID")) { - push @errors, "You cannot archive the course you are currently using."; + foreach my $archive_courseID (@archive_courseIDs) { + if ($archive_courseID eq "") { + push @errors, "You must specify a course name."; + } elsif ($archive_courseID eq $urlpath->arg("courseID")) { + push @errors, "You cannot archive the course you are currently using."; + } } #my $ce2 = new WeBWorK::CourseEnvironment({ @@ -1820,9 +1821,15 @@ print CGI::h2("archive Course"); - my $archive_courseID = $r->param("archive_courseID") || ""; + #my $archive_courseID = $r->param("archive_courseID") || ""; my $delete_course_flag = $r->param("delete_course") || ""; + my @archive_courseIDs = $r->param("archive_courseIDs"); + @archive_courseIDs = () unless @archive_courseIDs; + + my $archive_courseID = shift @archive_courseIDs; + + my $ce2 = new WeBWorK::CourseEnvironment({ %WeBWorK::SeedCE, courseName => $archive_courseID, @@ -1956,7 +1963,9 @@ print CGI::start_form(-method=>"POST", -action=>$r->uri); print $self->hidden_authen_fields; print $self->hidden_fields("subDisplay"); - print $self->hidden_fields(qw/archive_courseID delete_course/); + print $self->hidden_fields(qw/delete_course/); + print CGI::hidden('archive_courseID', $archive_courseID); + print CGI::hidden('archive_courseIDs',@archive_courseIDs); # grab some values we'll need my $course_dir = $ce2->{courseDirs}{root}; my $archive_path = $ce2->{webworkDirs}{courses} . "/$archive_courseID.tar.gz"; @@ -1973,8 +1982,9 @@ } # archive execute button print CGI::p({style=>"text-align: center"}, - CGI::submit(-name=>"decline_archive_course", -value=>"Don't archive"), + CGI::submit(-name=>"decline_archive_course", -value=>"Stop archiving"), " ", + (@archive_courseIDs)? CGI::submit(-name=>"archive_course", -value=>"Skip archiving this course")." ":'', CGI::submit(-name=>"confirm_archive_course", -value=>"archive") , ); } elsif( $directories_ok) { @@ -2006,9 +2016,12 @@ #my $authz = $r->authz; #my $urlpath = $r->urlpath; + my $archive_courseID = $r->param("archive_courseID") || ""; my $delete_course_flag = $r->param("delete_course") || ""; - + my @archive_courseIDs = $r->param("archive_courseIDs"); + @archive_courseIDs = () unless @archive_courseIDs; + my $ce2 = new WeBWorK::CourseEnvironment({ %WeBWorK::SeedCE, courseName => $archive_courseID, @@ -2084,14 +2097,25 @@ } - -# print CGI::start_form(-method=>"POST", -action=>$r->uri); -# print $self->hidden_authen_fields; -# print $self->hidden_fields("subDisplay"); -# -# print CGI::p({style=>"text-align: center"}, CGI::submit("decline_archive_course", "OK"),); -# -# print CGI::end_form(); + if (@archive_courseIDs) { + print CGI::start_form(-method=>"POST", -action=>$r->uri); + print $self->hidden_authen_fields; + print $self->hidden_fields("subDisplay"); + print $self->hidden_fields(qw/delete_course/); + + print CGI::hidden('archive_courseIDs',@archive_courseIDs); + print CGI::p({style=>"text-align: center"}, CGI::submit("decline_archive_course", "Stop archiving courses"), + CGI::submit("archive_course", "archive next course") + ); + print CGI::end_form(); + } else { + print CGI::start_form(-method=>"POST", -action=>$r->uri); + print $self->hidden_authen_fields; + print $self->hidden_fields("subDisplay"); + print CGI::hidden("archive_courseID",$archive_courseID); + print CGI::p( CGI::submit("decline_archive_course", "OK") ); + print CGI::end_form(); + } } } @@ -2273,6 +2297,14 @@ print CGI::div({style=>"text-align: center"}, CGI::a({href=>$newCourseURL}, "Log into $new_courseID"), ); + + print CGI::start_form(-method=>"POST", -action=>$r->uri); + print $self->hidden_authen_fields; + print $self->hidden_fields("subDisplay"); + print CGI::hidden("unarchive_courseID",$unarchive_courseID); + print CGI::p( CGI::submit("decline_unarchive_course", "unarchive next course") ); + print CGI::end_form(); + } } |
From: Mike G. v. a. <we...@ma...> - 2009-12-17 04:20:56
|
Log Message: ----------- Major bug fix for ProblemSetDetail (but 1725) Enforces all files assigned in ProblemSetDetail module to be accessible through the course temp directory. Fix is one line change near, line 1576 Tags: ---- rel-2-4-patches Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: ProblemSetDetail.pm Revision Data ------------- Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.64.2.4.2.1 retrieving revision 1.64.2.4.2.2 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.64.2.4.2.1 -r1.64.2.4.2.2 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1563,7 +1563,8 @@ return "No source file specified" unless $file; return "Problem source is drawn from a grouping set" if $file =~ /^group/; - $file = $ce->{courseDirs}->{templates} . '/' . $file unless $file =~ m|^/|; +# $file = $ce->{courseDirs}->{templates} . '/' . $file unless $file =~ m|^/|; # bug: 1725 allows access to all files e.g. /etc/passwd + $file = $ce->{courseDirs}->{templates} . '/' . $file ; # only files in template directory can be accessed my $text = "This source file "; my $fileError; |
From: Mike G. v. a. <we...@ma...> - 2009-12-17 04:14:04
|
Log Message: ----------- Minor change to PGProblemEditor.pm to define DEFAULT_SEED Major bug fix for ProblemSetDetail (but 1725) Enforces all files assigned in ProblemSetDetail module to be accessible through the course temp directory. Fix is one line change near, line 1576 Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator/Instructor: PGProblemEditor.pm ProblemSetDetail.pm Revision Data ------------- Index: PGProblemEditor.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v retrieving revision 1.97 retrieving revision 1.98 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.97 -r1.98 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -17,7 +17,7 @@ package WeBWorK::ContentGenerator::Instructor::PGProblemEditor; use base qw(WeBWorK::ContentGenerator::Instructor); - +use constant DEFAULT_SEED => 123456; =head1 NAME @@ -191,7 +191,7 @@ # inside saveFileChanges $self->{problemSeed} = $r->param('problemSeed') if (defined $r->param('problemSeed')); # Make sure that the problem seed has some value - $self->{problemSeed} = '123456' unless not_blank($self->{problemSeed}); + $self->{problemSeed} = DEFAULT_SEED() unless not_blank($self->{problemSeed}); ############################################################################## ############################################################################# @@ -331,7 +331,7 @@ # inside saveFileChanges $self->{problemSeed} = $r->param('problemSeed') if (defined $r->param('problemSeed')); # Make sure that the problem seed has some value - $self->{problemSeed} = '123456' unless not_blank( $self->{problemSeed}); + $self->{problemSeed} = DEFAULT_SEED() unless not_blank( $self->{problemSeed}); ############################################################################## # Return @@ -925,7 +925,7 @@ } # bail if no source path for the problem is found ; die "Cannot find a file path to save to" unless( not_blank($forcedSourceFile) ); - $self->{problemSeed} = 1234; + $self->{problemSeed} = DEFAULT_SEED(); $editFilePath .= '/' . $forcedSourceFile; last CASE; }; # end 'source_path_for_problem_file' case @@ -1180,7 +1180,7 @@ my $problemNumber = $self->{problemID}; my $problemSeed = ($actionParams->{'action.view.seed'}) ? $actionParams->{'action.view.seed'}->[0] - : 1234; + : DEFAULT_SEED(); my $displayMode = ($actionParams->{'action.view.displayMode'}) ? $actionParams->{'action.view.displayMode'}->[0] : $self->r->ce->{pg}->{options}->{displayMode}; Index: ProblemSetDetail.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm,v retrieving revision 1.76 retrieving revision 1.77 diff -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -Llib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm -u -r1.76 -r1.77 --- lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm +++ lib/WeBWorK/ContentGenerator/Instructor/ProblemSetDetail.pm @@ -1573,7 +1573,8 @@ return "No source file specified" unless $file; return "Problem source is drawn from a grouping set" if $file =~ /^group/; - $file = $ce->{courseDirs}->{templates} . '/' . $file unless $file =~ m|^/|; +# $file = $ce->{courseDirs}->{templates} . '/' . $file unless $file =~ m|^/|; # bug: 1725 allows access to all files e.g. /etc/passwd + $file = $ce->{courseDirs}->{templates} . '/' . $file ; # only files in template directory can be accessed my $text = "This source file "; my $fileError; |
From: dpvc v. a. <we...@ma...> - 2009-12-14 00:11:14
|
Log Message: ----------- Added back in accidentally removed log() function Modified Files: -------------- pg/macros: PGcommonFunctions.pl Revision Data ------------- Index: PGcommonFunctions.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGcommonFunctions.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -Lmacros/PGcommonFunctions.pl -Lmacros/PGcommonFunctions.pl -u -r1.10 -r1.11 --- macros/PGcommonFunctions.pl +++ macros/PGcommonFunctions.pl @@ -40,6 +40,7 @@ return $self->$fn(@_); } +sub log {CORE::log($_[1])} sub ln {CORE::log($_[1])} sub logten {CORE::log($_[1])/CORE::log(10)} |
From: dpvc v. a. <we...@ma...> - 2009-12-05 19:55:55
|
Log Message: ----------- Added missing comma Modified Files: -------------- pg/lib/Parser/Context: Default.pm Revision Data ------------- Index: Default.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Context/Default.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -Llib/Parser/Context/Default.pm -Llib/Parser/Context/Default.pm -u -r1.44 -r1.45 --- lib/Parser/Context/Default.pm +++ lib/Parser/Context/Default.pm @@ -328,7 +328,7 @@ j => Value::Vector->new(0,1)->with(ijk=>1), ); $context->constants->set( - i => {TeX=>'\boldsymbol{i}', perl=>'i'} + i => {TeX=>'\boldsymbol{i}', perl=>'i'}, j => {TeX=>'\boldsymbol{j}', perl=>'j'} ); $context->constants->remove("k"); |
From: dpvc v. a. <we...@ma...> - 2009-12-05 19:52:39
|
Log Message: ----------- Correct output for j vector in Vector2D context (obsolete) Modified Files: -------------- pg/lib/Parser/Context: Default.pm Revision Data ------------- Index: Default.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/Parser/Context/Default.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -Llib/Parser/Context/Default.pm -Llib/Parser/Context/Default.pm -u -r1.43 -r1.44 --- lib/Parser/Context/Default.pm +++ lib/Parser/Context/Default.pm @@ -327,7 +327,10 @@ i => Value::Vector->new(1,0)->with(ijk=>1), j => Value::Vector->new(0,1)->with(ijk=>1), ); -$context->constants->set(i => {TeX=>'\boldsymbol{i}', perl=>'i'}); +$context->constants->set( + i => {TeX=>'\boldsymbol{i}', perl=>'i'} + j => {TeX=>'\boldsymbol{j}', perl=>'j'} +); $context->constants->remove("k"); $context->{name} = "Vector2D"; |
From: jj v. a. <we...@ma...> - 2009-12-04 18:53:08
|
Log Message: ----------- Fixed problem when reading tags so that it will do a better job at skipping extraneous tags, like HHSection. Modified Files: -------------- webwork2/bin: NPL-update Revision Data ------------- Index: NPL-update =================================================================== RCS file: /webwork/cvs/system/webwork2/bin/NPL-update,v retrieving revision 1.7 retrieving revision 1.8 diff -Lbin/NPL-update -Lbin/NPL-update -u -r1.7 -r1.8 --- bin/NPL-update +++ bin/NPL-update @@ -368,42 +368,42 @@ $tagged = 0; while (<IN>) { SWITCH: { - if (/KEYWORDS\((.*)\)/i) { + if (/\bKEYWORDS\((.*)\)/i) { @keyword = keywordcleaner($1); last SWITCH; } - if (/DBsubject\(\s*'(.*?)'\s*\)/) { + if (/\bDBsubject\(\s*'(.*?)'\s*\)/) { $subject = $1; $subject =~ s/'/\'/g; last SWITCH; } - if (/DBchapter\(\s*'(.*?)'\s*\)/) { + if (/\bDBchapter\(\s*'(.*?)'\s*\)/) { $chapter = $1; $chapter =~ s/'/\'/g; $tagged = 1; last SWITCH; } - if (/DBsection\(\s*'(.*?)'\s*\)/) { + if (/\bDBsection\(\s*'(.*?)'\s*\)/) { $section = $1; $section =~ s/'/\'/g; last SWITCH; } - if (/Date\(\s*'(.*?)'\s*\)/) { + if (/\bDate\(\s*'(.*?)'\s*\)/) { $date = $1; $date =~ s/'/\'/g; last SWITCH; } - if (/Institution\(\s*'(.*?)'\s*\)/) { + if (/\bInstitution\(\s*'(.*?)'\s*\)/) { $institution = $1; $institution =~ s/'/\'/g; last SWITCH; } - if (/Author\(\s*'(.*?)'\s*\)/) { + if (/\bAuthor\(\s*'(.*?)'\s*\)/) { $author = $1; $author =~ s/'/\'/g; last SWITCH; } - if (/TitleText(\d+)\(\s*'(.*?)'\s*\)/) { + if (/\bTitleText(\d+)\(\s*'(.*?)'\s*\)/) { $textno = $1; $text = $2; $text =~ s/'/\'/g; @@ -413,7 +413,7 @@ } last SWITCH; } - if (/EditionText(\d+)\(\s*'(.*?)'\s*\)/) { + if (/\bEditionText(\d+)\(\s*'(.*?)'\s*\)/) { $textno = $1; $edition = $2; $edition =~ s/'/\'/g; @@ -423,7 +423,7 @@ } last SWITCH; } - if (/AuthorText(\d+)\(\s*'(.*?)'\s*\)/) { + if (/\bAuthorText(\d+)\(\s*'(.*?)'\s*\)/) { $textno = $1; $textauthor = $2; $textauthor =~ s/'/\'/g; @@ -433,7 +433,7 @@ } last SWITCH; } - if (/Section(\d+)\(\s*'(.*?)'\s*\)/) { + if (/\bSection(\d+)\(\s*'(.*?)'\s*\)/) { $textno = $1; $textsection = $2; $textsection =~ s/'/\'/g; @@ -450,7 +450,7 @@ } last SWITCH; } - if (/Problem(\d+)\(\s*(.*?)\s*\)/) { + if (/\bProblem(\d+)\(\s*(.*?)\s*\)/) { $textno = $1; $textproblem = $2; $textproblem =~ s/\D/ /g; |
From: dpvc v. a. <we...@ma...> - 2009-11-14 22:14:11
|
Log Message: ----------- Fixed PopUp to handle entries with arbitrary strings Modified Files: -------------- pg/macros: parserPopUp.pl Revision Data ------------- Index: parserPopUp.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/parserPopUp.pl,v retrieving revision 1.10 retrieving revision 1.11 diff -Lmacros/parserPopUp.pl -Lmacros/parserPopUp.pl -u -r1.10 -r1.11 --- macros/parserPopUp.pl +++ macros/parserPopUp.pl @@ -51,24 +51,36 @@ loadMacros('MathObjects.pl'); -sub _parserPopUp_init {parserPopUp::Init()}; # don't reload this file +sub _parserPopUp_init {parser::PopUp::Init()}; # don't reload this file # # The package that implements pop-up menus # -package parserPopUp; +package parser::PopUp; our @ISA = qw(Value::String); +my $context; # -# Setup the main:: namespace +# Setup the context and the PopUp() command # sub Init { - ### Hack to get around context change in contextString.pl - ### FIXME: when context definitions don't set context, put loadMacros with MathObject.pl above again - my $context = main::Context(); - main::loadMacros('contextString.pl'); - main::Context($context); - main::PG_restricted_eval('sub PopUp {parserPopUp->new(@_)}'); + # + # make a context in which arbitrary strings can be entered + # + $context = Parser::Context->getCopy("Numeric"); + $context->{name} = "PopUp"; + $context->parens->clear(); + $context->variables->clear(); + $context->constants->clear(); + $context->operators->clear(); + $context->functions->clear(); + $context->strings->clear(); + $context->{pattern}{number} = "^\$"; + $context->variables->{patterns} = {}; + $context->strings->{patterns}{".*"} = [-20,'str']; + $context->{parser}{String} = "parser::PopUp::String"; + $context->update; + main::PG_restricted_eval('sub PopUp {parser::PopUp->new(@_)}'); } # @@ -82,9 +94,10 @@ unless ref($choices) eq 'ARRAY'; Value::Error("A PopUp's second argument should be the correct menu choice") unless defined($value) && $value ne ""; - my $context = Parser::Context->getCopy("String"); - $context->strings->add(map {$_=>{}} @{$choices}); - my $self = bless $context->Package("String")->new($context,$value)->with(choices => $choices), $class; + my %choice; map {$choice{$_} = 1} @$choices; + Value::Error("The correct choice must be one of the PopUp menu items") + unless $choice{$value}; + my $self = bless {data => [$value], context => $context, choices => $choices}, $class; return $self; } @@ -101,4 +114,21 @@ # sub ans_rule {shift->menu(@_)} +################################################## +# +# Replacement for Parser::String that takes the +# complete parse string as its value +# +package parser::PopUp::String; +our @ISA = ('Parser::String'); + +sub new { + my $self = shift; + my ($equation,$value,$ref) = @_; + $value = $equation->{string}; + $self->SUPER::new($equation,$value,$ref); +} + +################################################## + 1; |
From: Arnie P. v. a. <we...@ma...> - 2009-11-07 21:31:44
|
Log Message: ----------- Use http://webwork.maa.org/wiki/Mathematical_notation_recognized_by_WeBWorK for list of functions rather than the broken link to webwork.math.rocgester.edu Modified Files: -------------- webwork2/courses.dist/modelCourse/templates/set0: prob1.pg Revision Data ------------- Index: prob1.pg =================================================================== RCS file: /webwork/cvs/system/webwork2/courses.dist/modelCourse/templates/set0/prob1.pg,v retrieving revision 1.1 retrieving revision 1.2 diff -Lcourses.dist/modelCourse/templates/set0/prob1.pg -Lcourses.dist/modelCourse/templates/set0/prob1.pg -u -r1.1 -r1.2 --- courses.dist/modelCourse/templates/set0/prob1.pg +++ courses.dist/modelCourse/templates/set0/prob1.pg @@ -68,7 +68,7 @@ can be indicated by either a "caret" or **). Try it.$BR \( \sin(\pi/4) = \) \{ ans_rule(20) \}$PAR Here's the -\{ htmlLink(qq!http://webwork.math.rochester.edu/webwork_system_html/docs/docs/pglanguage/availablefunctions.html!,"list of the functions") \} +\{ htmlLink(qq!http://webwork.maa.org/wiki/Mathematical_notation_recognized_by_WeBWorK!,"list of the functions") \} which WeBWorK understands. WeBWorK ALWAYS uses radian mode for trig functions. $PAR |
From: Arnie P. v. a. <we...@ma...> - 2009-11-05 21:40:30
|
Log Message: ----------- In MySQL like state only find tables of the form coursename_* with the underscore Modified Files: -------------- webwork2/lib/WeBWorK/Utils: CourseIntegrityCheck.pm Revision Data ------------- Index: CourseIntegrityCheck.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -Llib/WeBWorK/Utils/CourseIntegrityCheck.pm -Llib/WeBWorK/Utils/CourseIntegrityCheck.pm -u -r1.6 -r1.7 --- lib/WeBWorK/Utils/CourseIntegrityCheck.pm +++ lib/WeBWorK/Utils/CourseIntegrityCheck.pm @@ -127,9 +127,10 @@ # fetch fetch corresponding tables in the database and # search for corresponding schema entries. ########################################################## - - my $dbh = $self->dbh; - my $stmt = "show tables like '${courseName}%'"; # mysql request + + my $dbh = $self->dbh; + my $tablePrefix = "${courseName}\\_"; # _ represents any single character in the MySQL like statement so we escape it + my $stmt = "show tables like '${tablePrefix}%'"; # mysql request my $result = $dbh->selectall_arrayref($stmt) ; my @tableNames = map {@$_} @$result; # drill down in the result to the table name level |
From: Mike G. v. a. <we...@ma...> - 2009-11-05 13:59:19
|
Log Message: ----------- removed string of dots in reducedScoringValue specification Modified Files: -------------- webwork-modperl/conf: devel.apache-config.dist global.conf.dist Revision Data ------------- Index: global.conf.dist =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/conf/global.conf.dist,v retrieving revision 1.219 retrieving revision 1.220 diff -Lconf/global.conf.dist -Lconf/global.conf.dist -u -r1.219 -r1.220 --- conf/global.conf.dist +++ conf/global.conf.dist @@ -564,7 +564,7 @@ # 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 @@ -588,6 +588,7 @@ # $authen{user_module} = { sql_moodle => "WeBWorK::Authen::Moodle", + # sql_ldap => "WeBWorK::Authen::LDAP", "*" => "WeBWorK::Authen", }; @@ -599,13 +600,13 @@ # Options for particular authentication modules -$authen{moodle_options} = { - dsn => $moodle_dsn, - username => $moodle_username, - password => $moodle_password, - table_prefix => $moodle_table_prefix, - moodle17 => $moodle17, -}; +# $authen{moodle_options} = { +# dsn => $moodle_dsn, +# username => $moodle_username, +# password => $moodle_password, +# table_prefix => $moodle_table_prefix, +# moodle17 => $moodle17, +# }; $authen{ldap_options} = { # hosts to attempt to connect to, in order. For example: @@ -997,7 +998,7 @@ useBaseTenLog => 0, defaultDisplayMatrixStyle => "[s]", reducedScoringPeriod => 0, # Length of Reduced Scoring Period in minutes - reducedScoringValue...........=> 1, # A number in [0,1]. Students will be informed of the value as a percentage + reducedScoringValue => 1, # A number in [0,1]. Students will be informed of the value as a percentage }; ################################################################################ Index: devel.apache-config.dist =================================================================== RCS file: /webwork/cvs/system/webwork-modperl/conf/devel.apache-config.dist,v retrieving revision 1.12 retrieving revision 1.13 diff -Lconf/devel.apache-config.dist -Lconf/devel.apache-config.dist -u -r1.12 -r1.13 --- conf/devel.apache-config.dist +++ conf/devel.apache-config.dist @@ -74,7 +74,7 @@ $StartServers = 2; $MinSpareServers = 2; $MaxSpareServers = 2; -$MaxClients = 150; +$MaxClients = 5; $MaxRequestsPerChild = 100; # The document root doesn't really matter, but it has to be set, so we set it to |
From: Mike G. v. a. <we...@ma...> - 2009-11-05 13:18:21
|
Log Message: ----------- Added BEGIN_PGML and END_PGML Modified Files: -------------- pg/lib/WeBWorK/PG: Translator.pm Revision Data ------------- Index: Translator.pm =================================================================== RCS file: /webwork/cvs/system/pg/lib/WeBWorK/PG/Translator.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -Llib/WeBWorK/PG/Translator.pm -Llib/WeBWorK/PG/Translator.pm -u -r1.24 -r1.25 --- lib/WeBWorK/PG/Translator.pm +++ lib/WeBWorK/PG/Translator.pm @@ -1620,17 +1620,28 @@ } - - +# sub original_preprocess_code { +# my $evalString = shift; +# # BEGIN_TEXT and END_TEXT must occur on a line by themselves. +# $evalString =~ s/\n\s*END_TEXT[\s;]*\n/\nEND_TEXT\n/g; +# $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3\(<<'END_TEXT'\)\);\n/g; +# $evalString =~ s/ENDDOCUMENT.*/ENDDOCUMENT();/s; # remove text after ENDDOCUMENT +# +# $evalString =~ s/\\/\\\\/g; # \ can't be used for escapes because of TeX conflict +# $evalString =~ s/~~/\\/g; # use ~~ as escape instead, use # for comments +# $evalString; +# } sub default_preprocess_code { my $evalString = shift; # BEGIN_TEXT and END_TEXT must occur on a line by themselves. - $evalString =~ s/^[ \t]*END_TEXT[ \t;]*$/END_TEXT/gm; - $evalString =~ s/^[ \t]*END_SOLUTION[ \t;]*$/END_SOLUTION/mg; - $evalString =~ s/^[ \t]*END_HINT[ \t;]*$/END_HINT/mg; - $evalString =~ s/^[ \t]*BEGIN_TEXT[ \t;]*$/TEXT\(EV3P\(<<'END_TEXT'\)\);/mg; - $evalString =~ s/^[ \t]*BEGIN_SOLUTION[ \t;]*$/SOLUTION\(EV3P\(<<'END_SOLUTION'\)\);/mg; - $evalString =~ s/^[ \t]*BEGIN_HINT[ \t;]*$/HINT\(EV3P\(<<'END_HINT'\)\);/mg; + $evalString =~ s/\n\s*END_TEXT[\s;]*\n/\nEND_TEXT\n/g; + $evalString =~ s/\n\s*END_PGML[\s;]*\n/\nEND_PGML\n/g; + $evalString =~ s/\n\s*END_SOLUTION[\s;]*\n/\nEND_SOLUTION\n/g; + $evalString =~ s/\n\s*END_HINT[\s;]*\n/\nEND_HINT\n/g; + $evalString =~ s/\n\s*BEGIN_TEXT[\s;]*\n/\nTEXT\(EV3P\(<<'END_TEXT'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_PGML[\s;]*\n/\nTEXT\(PGML::Format2\(<<'END_PGML'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_SOLUTION[\s;]*\n/\nSOLUTION\(EV3P\(<<'END_SOLUTION'\)\);\n/g; + $evalString =~ s/\n\s*BEGIN_HINT[\s;]*\n/\nHINT\(EV3P\(<<'END_HINT'\)\);\n/g; $evalString =~ s/ENDDOCUMENT.*/ENDDOCUMENT();/s; # remove text after ENDDOCUMENT $evalString =~ s/\\/\\\\/g; # \ can't be used for escapes because of TeX conflict |
From: Mike G. v. a. <we...@ma...> - 2009-11-05 13:16:26
|
Log Message: ----------- default PGcourse.pl file added init_PGcourse subroutine to keep it from being loaded twice Modified Files: -------------- pg/macros: PGcourse.pl Revision Data ------------- Index: PGcourse.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGcourse.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -Lmacros/PGcourse.pl -Lmacros/PGcourse.pl -u -r1.1 -r1.2 --- macros/PGcourse.pl +++ macros/PGcourse.pl @@ -8,5 +8,7 @@ # =cut +sub _PGcourse_init {}; +#loadMacros("source.pl"); 1; |
From: dpvc v. a. <we...@ma...> - 2009-11-04 21:06:37
|
Log Message: ----------- Fixed some incorrect spellings, and added round() and truncate() methods to allow currency objects to remove extra decimal places. Modified Files: -------------- pg/macros: contextCurrency.pl Revision Data ------------- Index: contextCurrency.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextCurrency.pl,v retrieving revision 1.17 retrieving revision 1.18 diff -Lmacros/contextCurrency.pl -Lmacros/contextCurrency.pl -u -r1.17 -r1.18 --- macros/contextCurrency.pl +++ macros/contextCurrency.pl @@ -76,12 +76,12 @@ $m = Compute("$10.99"); will most likely set $m to the Real value .99 rather than the -monitary value of $10.99, since perl thinks $10 is the name of +monetary value of $10.99, since perl thinks $10 is the name of a variable, and will substitute that into the string before processing it. Since that variable is most likely empty, the result will be the same as $m = Compute(".99"); -You can use monitary values within computations, as in +You can use monetary values within computations, as in $m1 = Compute('$10.00'); $m2 = 3*$m1; $m3 = $m2 + .5; @@ -92,7 +92,7 @@ answers unless you disable the operators and functions as well. The tolerance for this context is set initially to .005 and the -tolType to 'absolute' so that monitary values will have to match +tolType to 'absolute' so that monetary values will have to match to the nearest penny. You can change that on a global basis using @@ -103,6 +103,25 @@ $m = Compute('$1,250,000.00')->with(tolerance=>.0001,tolType=>'relative'); +which would require students to be correct to three significant digits. + +The default tolerance of .005 works properly only if your original +monetary values have no more than 2 decimal places. If you were to do + + $m = Currency(34.125); + +for example, then $m would print as $34.12, but neither a student +answer of $34.12 nor of $34.13 would be marked correct. That is +because neither of these are less than .5 away from the correct answer +of $34.125. If you create currency values that have more decimal +places than the usual two, you may want to round or truncate them. +Currency objects have two methods for accomplishing this: round() and +truncate(), which produce rounded or truncated copies of the original +Currency object: + + $m = Currency(34.127)->round; # produces $34.13 + $m = Currency(34.127)->truncate; # produces $34.12 + By default, the answer checker for Currency values requires the student to enter the currency symbol, not just a real number. You can relax that condition by including the promoteReals=>1 @@ -124,7 +143,7 @@ ANS(Compute('$10.95')->cmp(forceDecimals=>1)); -By default, if the monitary value includes decimals digits, it +By default, if the monetary value includes decimals digits, it must have exactly two. You can weaken this requirement to allow any number of decimals by using noExtraDecimals=>0. @@ -424,7 +443,7 @@ if $context->flag("forceCommas") && $value =~ m/\d\d\d\d/; $self->Error("Monetary values must have exactly two decimal places") if $value && $value =~ m/$decimal\d/ && $value !~ m/$decimal\d\d$/ && $context->flag('noExtraDecimals'); - $self->Error("Monitary values require two decimal places",shift) + $self->Error("Monetary values require two decimal places",shift) if $context->flag("forceDecimals") && $value !~ m/$decimal\d\d$/; $self->{type} = {%{$op->typeRef}}; $self->{isCurrency} = 1; @@ -461,7 +480,7 @@ my $self = shift; my $class = ref($self) || $self; my $context = (Value::isContext($_[0]) ? shift : $self->context); my $x = shift; - Value::Error("Can't convert %s to a monitary value",lc(Value::showClass($x))) + Value::Error("Can't convert %s to a monetary value",lc(Value::showClass($x))) if !$self->getFlag("promoteReals",1) && Value::isRealNumber($x) && !Value::classMatch($x,"Currency"); $self = bless $self->SUPER::new($context,$x,@_), $class; $self->{isReal} = $self->{isValue} = $self->{isCurrency} = 1; @@ -475,6 +494,18 @@ return $self; } +sub round { + my $self = shift; + my $s = ($self->value >= 0 ? "" : "-"); + return $self->make(($s.main::prfmt(CORE::abs($self->value),"%.2f")) + 0); +} + +sub truncate { + my $self = shift; + my $n = $self->value; $n =~ s/(\.\d\d).*/\1/; + return $self->make($n+0); +} + # # Look up the currency symbols either from the object of the context # and format the output as a currency value (use 2 decimals and @@ -488,13 +519,14 @@ my ($symbol,$comma,$decimal) = ($currency->{symbol},$currency->{comma},$currency->{decimal}); $symbol = $self->context->operators->get($symbol)->{$type} || $symbol; $comma = "{$comma}" if $type eq 'TeX'; - my $s = main::prfmt($self->value,"%.2f"); - $s =~ s/\.00// if $self->getFlag('trimTrailingZeros'); - $s =~ s/\./$decimal/; - while ($s =~ s/(\d)(\d\d\d(:\D|$))/$1$comma$2/) {} - $s = ($currency->{associativity} eq "right" ? $s.$symbol : $symbol.$s); - $s =~ s/^\s+|\s+$//g; - return $s; + my $s = ($self->value >= 0 ? "" : "-"); + my $c = main::prfmt(CORE::abs($self->value),"%.2f"); + $c =~ s/\.00// if $self->getFlag('trimTrailingZeros'); + $c =~ s/\./$decimal/; + while ($c =~ s/(\d)(\d\d\d(:\D|$))/$1$comma$2/) {} + $c = ($currency->{associativity} eq "right" ? $s.$c.$symbol : $s.$symbol.$c); + $c =~ s/^\s+|\s+$//g; + return $c; } sub string {(shift)->format("string")} |
From: dpvc v. a. <we...@ma...> - 2009-11-04 18:12:27
|
Log Message: ----------- Avoid unwanted error message in log file about redefining log() function Modified Files: -------------- pg/macros: PGcommonFunctions.pl dangerousMacros.pl Revision Data ------------- Index: dangerousMacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/dangerousMacros.pl,v retrieving revision 1.57 retrieving revision 1.58 diff -Lmacros/dangerousMacros.pl -Lmacros/dangerousMacros.pl -u -r1.57 -r1.58 --- macros/dangerousMacros.pl +++ macros/dangerousMacros.pl @@ -1379,4 +1379,5 @@ sub cos($) {return CORE::cos($_[0])}; sub atan2($$) {return CORE::atan2($_[0],$_[1])}; +sub Parser::defineLog {eval {sub log($) {CommonFunction->Call("log",@_)}}}; 1; Index: PGcommonFunctions.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGcommonFunctions.pl,v retrieving revision 1.9 retrieving revision 1.10 diff -Lmacros/PGcommonFunctions.pl -Lmacros/PGcommonFunctions.pl -u -r1.9 -r1.10 --- macros/PGcommonFunctions.pl +++ macros/PGcommonFunctions.pl @@ -40,7 +40,6 @@ return $self->$fn(@_); } -sub log {CORE::log($_[1])} sub ln {CORE::log($_[1])} sub logten {CORE::log($_[1])/CORE::log(10)} @@ -98,7 +97,8 @@ # which package-specific version to call # -sub log {CommonFunction->Call('log',@_)} +Parser::defineLog(); ## defined in dangerousMacros so warning about redefining log() can be avoided + sub ln {CommonFunction->Call('ln',@_)} sub logten {CommonFunction->Call('logten',@_)} |
From: dpvc v. a. <we...@ma...> - 2009-11-04 17:32:25
|
Log Message: ----------- Fix problem with useBaseTenLog in perl code Modified Files: -------------- pg/macros: PGcommonFunctions.pl dangerousMacros.pl Revision Data ------------- Index: dangerousMacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/dangerousMacros.pl,v retrieving revision 1.56 retrieving revision 1.57 diff -Lmacros/dangerousMacros.pl -Lmacros/dangerousMacros.pl -u -r1.56 -r1.57 --- macros/dangerousMacros.pl +++ macros/dangerousMacros.pl @@ -1358,4 +1358,25 @@ # ^uses &Value::Package sub Infinity () {Value->Package("Infinity")->new()} + +# ^function abs +# ^function sqrt +# ^function exp +# ^function log +# ^function sin +# ^function cos +# ^function atan2 +# +# Allow these functions to be overridden +# (needed for log() to implement $useBaseTenLog) +# +use subs 'abs', 'sqrt', 'exp', 'log', 'sin', 'cos', 'atan2'; +sub abs($) {return CORE::abs($_[0])}; +sub sqrt($) {return CORE::sqrt($_[0])}; +sub exp($) {return CORE::exp($_[0])}; +sub log($) {return CORE::log($_[0])}; +sub sin($) {return CORE::sin($_[0])}; +sub cos($) {return CORE::cos($_[0])}; +sub atan2($$) {return CORE::atan2($_[0],$_[1])}; + 1; Index: PGcommonFunctions.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGcommonFunctions.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -Lmacros/PGcommonFunctions.pl -Lmacros/PGcommonFunctions.pl -u -r1.8 -r1.9 --- macros/PGcommonFunctions.pl +++ macros/PGcommonFunctions.pl @@ -41,7 +41,7 @@ } sub log {CORE::log($_[1])} -sub ln {CORE::log($_[1])} +sub ln {CORE::log($_[1])} sub logten {CORE::log($_[1])/CORE::log(10)} sub tan {CORE::sin($_[1])/CORE::cos($_[1])} @@ -98,7 +98,8 @@ # which package-specific version to call # -sub ln {CommonFunction->Call('log',@_)} +sub log {CommonFunction->Call('log',@_)} +sub ln {CommonFunction->Call('ln',@_)} sub logten {CommonFunction->Call('logten',@_)} sub tan {CommonFunction->Call('tan',@_)} |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 22:37:40
|
Log Message: ----------- Update Reduced Scoring documentation Modified Files: -------------- webwork2/lib/WeBWorK: Constants.pm Revision Data ------------- Index: Constants.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/Constants.pm,v retrieving revision 1.60 retrieving revision 1.61 diff -Llib/WeBWorK/Constants.pm -Llib/WeBWorK/Constants.pm -u -r1.60 -r1.61 --- lib/WeBWorK/Constants.pm +++ lib/WeBWorK/Constants.pm @@ -259,6 +259,8 @@ message like "This assignment has a Reduced Scoring Period that begins 11/08/2009 at 06:17pm EST and ends on the due date, 11/10/2009 at 06:17pm EST. During this period all additional work done counts 50% of the original." will be displayed.<p> + To use this, you also have to enable Reduced Scoring for individual assignments by + editing the set data using the Hmwk Sets Editor.<p> This works with the avg_problem_grader (which is the the default grader) and the std_problem_grader (the all or nothing grader). It will work with custom graders if they are written appropriately.' , @@ -271,6 +273,8 @@ reduction. For example if this value is .5 and a student views a problem during the Reduced Scoring Period, they will see the message "You are in the Reduced Scoring Period: All additional work done counts 50% of the original." <p> + To use this, you also have to enable Reduced Scoring for individual assignments by + editing the set data using the Hmwk Sets Editor.<p> This works with the avg_problem_grader (which is the the default grader) and the std_problem_grader (the all or nothing grader). It will work with custom graders if they are written appropriately.' , |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:16:17
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WebworkSOAP/Classes: GlobalSet.pm Revision Data ------------- Index: GlobalSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WebworkSOAP/Classes/GlobalSet.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/WebworkSOAP/Classes/GlobalSet.pm -Llib/WebworkSOAP/Classes/GlobalSet.pm -u -r1.3 -r1.4 --- lib/WebworkSOAP/Classes/GlobalSet.pm +++ lib/WebworkSOAP/Classes/GlobalSet.pm @@ -8,6 +8,7 @@ _ATTR due_date $string due_date _ATTR answer_date $string answer_date _ATTR published $string published + _ATTR enable_reduced_scoring $string enable_reduced_scoring _ATTR assignment_type $string assignment_type _ATTR attempts_per_version $string attempts_per_version _ATTR time_interval $string time_interval @@ -29,6 +30,7 @@ $self->{due_date} = SOAP::Data->type( 'string', $data->due_date ); $self->{answer_date} = SOAP::Data->type( 'string', $data->answer_date ); $self->{published} = SOAP::Data->type( 'string', $data->published ); + $self->{enable_reduced_scoring} = SOAP::Data->type( 'string', $data->enable_reduced_scoring ); $self->{assignment_type} = SOAP::Data->type( 'string', $data->assignment_type ); $self->{attempts_per_version} = SOAP::Data->type( 'string', $data->attempts_per_version ); $self->{time_interval} = SOAP::Data->type( 'string', $data->time_interval ); |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:15:45
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WebworkSOAP/Classes: UserSet.pm Revision Data ------------- Index: UserSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WebworkSOAP/Classes/UserSet.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -Llib/WebworkSOAP/Classes/UserSet.pm -Llib/WebworkSOAP/Classes/UserSet.pm -u -r1.3 -r1.4 --- lib/WebworkSOAP/Classes/UserSet.pm +++ lib/WebworkSOAP/Classes/UserSet.pm @@ -11,6 +11,7 @@ _ATTR due_date $string due_date _ATTR answer_date $string answer_date _ATTR published $string published + _ATTR enable_reduced_scoring $string enable_reduced_scoring _ATTR assignment_type $string assignment_type _ATTR attempts_per_version $string attempts_per_version _ATTR time_interval $string time_interval @@ -34,6 +35,7 @@ $self->{due_date} = SOAP::Data->type( 'string', $data->due_date ); $self->{answer_date} = SOAP::Data->type( 'string', $data->answer_date ); $self->{published} = SOAP::Data->type( 'string', $data->published ); + $self->{enable_reduced_scoring} = SOAP::Data->type( 'string', $data->enable_reduced_scoring ); $self->{assignment_type} = SOAP::Data->type( 'string', $data->assignment_type ); $self->{attempts_per_version} = SOAP::Data->type( 'string', $data->attempts_per_version ); $self->{time_interval} = SOAP::Data->type( 'string', $data->time_interval ); |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:14:19
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WeBWorK: PG.pm Revision Data ------------- Index: PG.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/PG.pm,v retrieving revision 1.76 retrieving revision 1.77 diff -Llib/WeBWorK/PG.pm -Llib/WeBWorK/PG.pm -u -r1.76 -r1.77 --- lib/WeBWorK/PG.pm +++ lib/WeBWorK/PG.pm @@ -93,7 +93,7 @@ $envir{texDisposition} = "pdf"; # in webwork2, we use pdflatex # Problem Information - # ADDED: courseName, formatedDueDate + # ADDED: courseName, formatedDueDate, enable_reduced_scoring $envir{openDate} = $set->open_date; $envir{formattedOpenDate} = formatDateTime($envir{openDate}, $ce->{siteDefaults}{timezone}); @@ -106,6 +106,7 @@ $envir{problemValue} = $problem->value; $envir{sessionKey} = $key; $envir{courseName} = $ce->{courseName}; + $envir{enable_reduced_scoring} = $set->enable_reduced_scoring; # Student Information # ADDED: studentID |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:13:24
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- pg/macros: PGanswermacros.pl Revision Data ------------- Index: PGanswermacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGanswermacros.pl,v retrieving revision 1.70 retrieving revision 1.71 diff -Lmacros/PGanswermacros.pl -Lmacros/PGanswermacros.pl -u -r1.70 -r1.71 --- macros/PGanswermacros.pl +++ macros/PGanswermacros.pl @@ -152,6 +152,8 @@ my $reducedScoringPeriod; # ^variable my $reducedScoringValue my $reducedScoringValue; +# ^variable my $enable_reduced_scoring +my $enable_reduced_scoring; # ^variable my $dueDate my $dueDate; @@ -165,6 +167,7 @@ # ^uses $envir{useBaseTenLog} # ^uses $envir{reducedScoringPeriod} # ^uses $envir{reducedScoringValue} +# ^uses $envir{enable_reduced_scoring} # ^uses $envir{dueDate} sub _PGanswermacros_init { @@ -180,11 +183,10 @@ $useBaseTenLog = PG_restricted_eval(q/$envir{useBaseTenLog}/); $reducedScoringPeriod= PG_restricted_eval(q/$envir{reducedScoringPeriod}/); $reducedScoringValue= PG_restricted_eval(q/$envir{reducedScoringValue}/); + $enable_reduced_scoring= PG_restricted_eval(q/$envir{enable_reduced_scoring}/); $dueDate = PG_restricted_eval(q/$envir{dueDate}/); } - - =head1 MACROS =head2 Answer evaluator macros @@ -1635,7 +1637,7 @@ # Determine if we are in the reduced scoring period and act accordingly my $reducedScoringPeriodSec = $reducedScoringPeriod*60; # $reducedScoringPeriod is in minutes - if (time() < ($dueDate - $reducedScoringPeriodSec)) { # it is before the reduced scoring period + if (!$enable_reduced_scoring or time() < ($dueDate - $reducedScoringPeriodSec)) { # the reduced scoring period is disabled or it is before the reduced scoring period # increase recorded score if the current score is greater. $problem_state{recorded_score} = $problem_result{score} if $problem_result{score} > $problem_state{recorded_score}; # the sub_recored_score holds the recored_score before entering the reduced scoring period @@ -1738,7 +1740,7 @@ # Determine if we are in the reduced scoring period and act accordingly my $reducedScoringPeriodSec = $reducedScoringPeriod*60; # $reducedScoringPeriod is in minutes - if (time() < ($dueDate - $reducedScoringPeriodSec)) { # it is before the reduced scoring period + if (!$enable_reduced_scoring or time() < ($dueDate - $reducedScoringPeriodSec)) { # the reduced scoring period is disabled or it is before the reduced scoring period # increase recorded score if the current score is greater. $problem_state{recorded_score} = $problem_result{score} if $problem_result{score} > $problem_state{recorded_score}; # the sub_recored_score holds the recored_score before entering the reduced scoring period @@ -1829,10 +1831,11 @@ $problem_state{num_of_correct_ans}++ if $total == $count; $problem_state{num_of_incorrect_ans}++ if $total < $count; - # Determine if we are in the reduced scoring period and act accordingly - + # Determine if we are in the reduced scoring period and if the reduced scoring period is enabled and act accordingly +#warn("enable_reduced_scoring is $enable_reduced_scoring"); +# warn("dueDate is $dueDate"); my $reducedScoringPeriodSec = $reducedScoringPeriod*60; # $reducedScoringPeriod is in minutes - if (time() < ($dueDate - $reducedScoringPeriodSec)) { # it is before the reduced scoring period + if (!$enable_reduced_scoring or time() < ($dueDate - $reducedScoringPeriodSec)) { # the reduced scoring period is disabled or it is before the reduced scoring period # increase recorded score if the current score is greater. $problem_state{recorded_score} = $problem_result{score} if $problem_result{score} > $problem_state{recorded_score}; # the sub_recored_score holds the recored_score before entering the reduced scoring period |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:12:07
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSets.pm Revision Data ------------- Index: ProblemSets.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm,v retrieving revision 1.92 retrieving revision 1.93 diff -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -Llib/WeBWorK/ContentGenerator/ProblemSets.pm -u -r1.92 -r1.93 --- lib/WeBWorK/ContentGenerator/ProblemSets.pm +++ lib/WeBWorK/ContentGenerator/ProblemSets.pm @@ -158,6 +158,18 @@ } } + foreach my $set (@sets) { + # make sure enable_reduced_scoring is set to 0 or 1 + if ( $set and $set->enable_reduced_scoring ne "0" and $set->enable_reduced_scoring ne "1") { + my $globalSet = $db->getGlobalSet($set->set_id); + $globalSet->enable_reduced_scoring("0"); # defaults to disabled + $db->putGlobalSet($globalSet); + $set = $db->getMergedSet($effectiveUser, $set->set_id); + } else { + die "set $set not defined" unless $set; + } + } + # gateways/versioned sets require dealing with output data slightly # differently, so check for those here debug("Begin set-type check"); |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:11:52
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: ProblemSet.pm Revision Data ------------- Index: ProblemSet.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/ProblemSet.pm,v retrieving revision 1.93 retrieving revision 1.94 diff -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -Llib/WeBWorK/ContentGenerator/ProblemSet.pm -u -r1.93 -r1.94 --- lib/WeBWorK/ContentGenerator/ProblemSet.pm +++ lib/WeBWorK/ContentGenerator/ProblemSet.pm @@ -73,7 +73,14 @@ $db->putGlobalSet($globalSet); $set = $db->getMergedSet($effectiveUserName, $set->set_id); } - + + # When a set is created enable_reduced_scoring is null, so we have to set it + if ($set->enable_reduced_scoring ne "0" and $set->enable_reduced_scoring ne "1") { + my $globalSet = $db->getGlobalSet($set->set_id); + $globalSet->enable_reduced_scoring("0"); # defaults to disabled + $db->putGlobalSet($globalSet); + $set = $db->getMergedSet($effectiveUserName, $set->set_id); + } my $publishedText = ($set->published) ? "visible to students." : "hidden from students."; my $publishedClass = ($set->published) ? "Published" : "Unpublished"; @@ -310,8 +317,9 @@ print CGI::p(CGI::a({href=>$hardcopyURL}, "Download a hardcopy of this homework set.")); + my $enable_reduced_scoring = $set->enable_reduced_scoring; my $reducedScoringPeriod = $ce->{pg}->{ansEvalDefaults}->{reducedScoringPeriod}; - if ($reducedScoringPeriod > 0) { + if ($reducedScoringPeriod > 0 and $enable_reduced_scoring) { my $dueDate = $self->formatDateTime($set->due_date()); my $reducedScoringPeriodSec = $reducedScoringPeriod*60; # $reducedScoringPeriod is in minutes my $reducedScoringValue = $ce->{pg}->{ansEvalDefaults}->{reducedScoringValue}; |
From: Arnie P. v. a. <we...@ma...> - 2009-11-02 17:11:28
|
Log Message: ----------- Allow reduced scoring to be enabled or disabled for individual assignments. Default is disabled. Modified Files: -------------- webwork2/lib/WeBWorK/ContentGenerator: Problem.pm Revision Data ------------- Index: Problem.pm =================================================================== RCS file: /webwork/cvs/system/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v retrieving revision 1.219 retrieving revision 1.220 diff -Llib/WeBWorK/ContentGenerator/Problem.pm -Llib/WeBWorK/ContentGenerator/Problem.pm -u -r1.219 -r1.220 --- lib/WeBWorK/ContentGenerator/Problem.pm +++ lib/WeBWorK/ContentGenerator/Problem.pm @@ -415,6 +415,14 @@ # don't do anything just yet, maybe we're a professor and we're # fabricating a set or haven't assigned it to ourselves just yet } + # When a set is created enable_reduced_scoring is null, so we have to set it + if ( $set and $set->enable_reduced_scoring ne "0" and $set->enable_reduced_scoring ne "1") { + my $globalSet = $db->getGlobalSet($set->set_id); + $globalSet->enable_reduced_scoring("0"); # defaults to disabled + $db->putGlobalSet($globalSet); + $set = $db->getMergedSet($effectiveUserName, $setName); + } + # obtain the merged problem for $effectiveUser my $problem = $db->getMergedProblem($effectiveUserName, $setName, $problemNumber); # checked |