'reviewquestion', $summary, 450, 650, get_string('reviewresponse', 'quiz'),
'none', true);
if (question_state_is_graded($stateforqinattempt)
- && ($question->maxgrade != 0)){
+ && ($question->maxgrade > 0)){
$grade = $stateforqinattempt->grade
/ $question->maxgrade;
$qclass = question_get_feedback_class($grade);
function col_feedbacktext($attempt){
if ($attempt->timefinish) {
if (!$this->is_downloading()) {
- return quiz_report_feedback_for_grade(quiz_rescale_grade($attempt->sumgrades, $this->quiz), $this->quiz->id);
+ return quiz_report_feedback_for_grade(quiz_rescale_grade($attempt->sumgrades, $this->quiz, false), $this->quiz->id);
} else {
- return strip_tags(quiz_report_feedback_for_grade(quiz_rescale_grade($attempt->sumgrades, $this->quiz), $this->quiz->id));
+ return strip_tags(quiz_report_feedback_for_grade(quiz_rescale_grade($attempt->sumgrades, $this->quiz, false), $this->quiz->id));
}
} else {
return '-';
// ULPGC ecastro
function get_fractional_grade(&$question, &$state) {
- $maxgrade = $question->maxgrade;
$grade = $state->grade;
- if ($maxgrade) {
- return (float)($grade/$maxgrade);
+ if ($question->maxgrade > 0) {
+ return (float)($grade / $question->maxgrade);
} else {
return (float)$grade;
}
}
$grade = '';
- if ($question->maxgrade and $options->scores) {
+ if ($question->maxgrade > 0 && $options->scores) {
if ($cmoptions->optionflags & QUESTION_ADAPTIVE) {
if ($isgraded) {
$grade = question_format_grade($cmoptions, $state->last_graded->grade).'/';
echo ' ';
print_string('duplicateresponse', 'quiz');
}
- if (!empty($question->maxgrade) && $options->scores) {
+ if ($question->maxgrade > 0 && $options->scores) {
if (question_state_is_graded($state->last_graded)) {
// Display the grading details from the last graded state
$grade = new stdClass;
echo ' ';
print_string('duplicateresponse', 'quiz');
}
- if (!empty($question->maxgrade) && $options->scores) {
+ if ($question->maxgrade > 0 && $options->scores) {
if (question_state_is_graded($state->last_graded)) {
// Display the grading details from the last graded state
$grade = new stdClass;