[system] / branches / rel-2-2-dev / webwork-modperl / lib / WeBWorK / ContentGenerator / Problem.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-2-dev/webwork-modperl/lib/WeBWorK/ContentGenerator/Problem.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4340 Revision 4341
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/Problem.pm,v 1.191.2.7 2006/04/17 21:18:58 sh002i Exp $ 4# $CVSHeader$
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
280# . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent."; 280# . scalar @answerNames . " $numIncorrectNoun correct, for a score of $scorePercent.";
281 my $summary = ""; 281 my $summary = "";
282 unless (defined($problemResult->{summary}) and $problemResult->{summary} =~ /\S/) { 282 unless (defined($problemResult->{summary}) and $problemResult->{summary} =~ /\S/) {
283 if (scalar @answerNames == 1) { #default messages 283 if (scalar @answerNames == 1) { #default messages
284 if ($numCorrect == scalar @answerNames) { 284 if ($numCorrect == scalar @answerNames) {
285 $summary .= CGI::div({class=>"ResultsWithoutError"},"The above answer is correct."); 285 $summary .= CGI::div({class=>"ResultsWithoutError"},"The answer above is correct.");
286 } else { 286 } else {
287 $summary .= CGI::div({class=>"ResultsWithError"},"The above answer is NOT ${fully}correct."); 287 $summary .= CGI::div({class=>"ResultsWithError"},"The answer above is NOT ${fully}correct.");
288 } 288 }
289 } else { 289 } else {
290 if ($numCorrect == scalar @answerNames) { 290 if ($numCorrect == scalar @answerNames) {
291 $summary .= CGI::div({class=>"ResultsWithoutError"},"All of the above answers are correct."); 291 $summary .= CGI::div({class=>"ResultsWithoutError"},"All of the answers above are correct.");
292 } 292 }
293 unless ($numCorrect + $numBlanks == scalar( @answerNames)) { 293 unless ($numCorrect + $numBlanks == scalar( @answerNames)) {
294 $summary .= CGI::div({class=>"ResultsWithError"},"At least one of the above answers is NOT ${fully}correct."); 294 $summary .= CGI::div({class=>"ResultsWithError"},"At least one of the answers above is NOT ${fully}correct.");
295 } 295 }
296 if ($numBlanks) { 296 if ($numBlanks) {
297 my $s = ($numBlanks>1)?'':'s'; 297 my $s = ($numBlanks>1)?'':'s';
298 $summary .= CGI::div({class=>"ResultsAlert"},"$numBlanks of the questions remain$s unanswered."); 298 $summary .= CGI::div({class=>"ResultsAlert"},"$numBlanks of the questions remain$s unanswered.");
299 } 299 }
826 826
827 # FIXME: move editor link to top, next to problem number. 827 # FIXME: move editor link to top, next to problem number.
828 # format as "[edit]" like we're doing with course info file, etc. 828 # format as "[edit]" like we're doing with course info file, etc.
829 # add edit link for set as well. 829 # add edit link for set as well.
830 my $editorLink = ""; 830 my $editorLink = "";
831 # if we are here without a real problem set, carry that through 831 # if we are here without a real homework set, carry that through
832 my $forced_field = []; 832 my $forced_field = [];
833 $forced_field = ['sourceFilePath' => $r->param("sourceFilePath")] if 833 $forced_field = ['sourceFilePath' => $r->param("sourceFilePath")] if
834 ($set->set_id eq 'Undefined_Set'); 834 ($set->set_id eq 'Undefined_Set');
835 if ($authz->hasPermissions($user, "modify_problem_sets")) { 835 if ($authz->hasPermissions($user, "modify_problem_sets")) {
836 my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor", 836 my $editorPage = $urlpath->newFromModule("WeBWorK::ContentGenerator::Instructor::PGProblemEditor",

Legend:
Removed from v.4340  
changed lines
  Added in v.4341

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9