Permalink
Browse files

Merge branch 'MDL-26445' of git://github.com/timhunt/moodle

  • Loading branch information...
2 parents 7d75414 + 8f63ab1 commit 34e30d9bce48a305db3906285e6dc0d214d01c63 @stronk7 stronk7 committed Mar 7, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 question/type/numerical/questiontype.php
  2. +1 −1 question/type/shortanswer/questiontype.php
@@ -608,7 +608,7 @@ function print_question_formulation_and_controls(&$question, &$state, $cmoptions
if($question->options->unitgradingtype == 1){
$raw_unitpenalty = $question->options->unitpenalty * $rawgrade ;
}else {
- $raw_unitpenalty = $question->options->unitpenalty * $question->maxgrade;
+ $raw_unitpenalty = $question->options->unitpenalty ;
}
$state->options->raw_unitpenalty = $raw_unitpenalty ;
}
@@ -818,7 +818,7 @@ function grade_responses(&$question, &$state, $cmoptions) {
if($question->options->unitgradingtype == 1){
$raw_unitpenalty = $question->options->unitpenalty * $state->raw_grade ;
}else {
- $raw_unitpenalty = $question->options->unitpenalty * $question->maxgrade;
+ $raw_unitpenalty = $question->options->unitpenalty ;
}
$state->raw_grade -= $raw_unitpenalty ;
}
@@ -318,7 +318,7 @@ function print_question_grading_details(&$question, &$state, $cmoptions, $option
// waiting for the new question engine code for a permanent one
if(isset($state->options->raw_unitpenalty) && $state->options->raw_unitpenalty > 0.0 ){
echo ' ';
- print_string('unitappliedpenalty','qtype_numerical',question_format_grade($cmoptions, $state->options->raw_unitpenalty ));
+ print_string('unitappliedpenalty','qtype_numerical',question_format_grade($cmoptions, $state->options->raw_unitpenalty * $question->maxgrade ));
}
if ($cmoptions->penaltyscheme) {
// print details of grade adjustment due to penalties

0 comments on commit 34e30d9

Please sign in to comment.