From: Mike G. v. a. <we...@ma...> - 2009-09-01 23:59:40
|
Log Message: ----------- Added check so that warnings are not created when editing the course_info.txt file (which has no problem or version ID attached. Tags: ---- rel-2-4-patches 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.90.4.1.2.5 retrieving revision 1.90.4.1.2.6 diff -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -Llib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm -u -r1.90.4.1.2.5 -r1.90.4.1.2.6 --- lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm +++ lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm @@ -146,12 +146,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'); |