From: Mike G. v. a. <we...@ma...> - 2009-09-01 19:03:09
|
Log Message: ----------- Fixes a cosmetic bug reported in the forum. http://webwork.maa.org/moodle/mod/forum/discuss.php?d=6266#p8224 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.96 retrieving revision 1.97 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.96 -r1.97 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -148,13 +148,16 @@ $self->{problemID} = $r->urlpath->arg("problemID"); # parse setID, which may come in with version data + my $fullSetID = $self->{setID}; - if ( $fullSetID =~ /,v(\d+)$/ ) { - $self->{versionID} = $1; - $self->{setID} =~ s/,v\d+$//; + if (defined($fullSetID) ) { + + if ( $fullSetID =~ /,v(\d+)$/ ) { + $self->{versionID} = $1; + $self->{setID} =~ s/,v\d+$//; + } + $self->{fullSetID} = $fullSetID; } - $self->{fullSetID} = $fullSetID; - my $submit_button = $r->param('submit'); # obtain submit command from form my $actionID = $r->param('action'); my $file_type = $r->param("file_type") || ''; |