All grades are hidden now when zero grade is chosen ... even the marks.
This mode is only really useful when feedback is turned on.
This commit is contained in:
@@ -133,8 +133,8 @@
|
||||
$strgrade = get_string("grade");
|
||||
$strscore = get_string("score", "quiz");
|
||||
|
||||
print_heading("$strscore: $result->sumgrades/$quiz->sumgrades ($result->percentage %)");
|
||||
if ($quiz->grade) {
|
||||
print_heading("$strscore: $result->sumgrades/$quiz->sumgrades ($result->percentage %)");
|
||||
print_heading("$strgrade: $result->grade/$quiz->grade");
|
||||
}
|
||||
|
||||
|
||||
+8
-6
@@ -444,7 +444,7 @@ function quiz_print_question_icon($question, $editlink=true) {
|
||||
|
||||
function quiz_print_question($number, $question, $grade, $courseid,
|
||||
$feedback=NULL, $response=NULL, $actualgrade=NULL, $correct=NULL,
|
||||
$realquestion=NULL, $shuffleanswers=false) {
|
||||
$realquestion=NULL, $shuffleanswers=false, $showgrades=true) {
|
||||
|
||||
/// Prints a quiz question, any format
|
||||
/// $question is provided as an object
|
||||
@@ -477,10 +477,12 @@ function quiz_print_question($number, $question, $grade, $courseid,
|
||||
echo "<table width=100% cellspacing=10>";
|
||||
echo "<tr><td nowrap width=100 valign=top>";
|
||||
echo "<p align=center><b>$number</b></p>";
|
||||
if ($feedback or $response) {
|
||||
echo "<p align=center><font size=1>$strmarks: $actualgrade/$grade</font></p>";
|
||||
} else {
|
||||
echo "<p align=center><font size=1>$grade $strmarks</font></p>";
|
||||
if ($showgrades) {
|
||||
if ($feedback or $response) {
|
||||
echo "<p align=center><font size=1>$strmarks: $actualgrade/$grade</font></p>";
|
||||
} else {
|
||||
echo "<p align=center><font size=1>$grade $strmarks</font></p>";
|
||||
}
|
||||
}
|
||||
print_spacer(1,100);
|
||||
|
||||
@@ -991,7 +993,7 @@ function quiz_print_quiz_questions($quiz, $results=NULL, $questions=NULL, $shuff
|
||||
print_simple_box_start("CENTER", "90%");
|
||||
quiz_print_question($count, $question, $grades[$question->id]->grade, $quiz->course,
|
||||
$feedback, $response, $actualgrades, $correct,
|
||||
$randomquestion, $quiz->shuffleanswers);
|
||||
$randomquestion, $quiz->shuffleanswers, $quiz->grade);
|
||||
print_simple_box_end();
|
||||
echo "<br \>";
|
||||
}
|
||||
|
||||
+3
-1
@@ -202,9 +202,11 @@
|
||||
<td align=right><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
|
||||
<td>
|
||||
<?php
|
||||
for ($i=100; $i>=0; $i--) {
|
||||
for ($i=100; $i>=1; $i--) {
|
||||
$grades[$i] = $i;
|
||||
}
|
||||
$grades[0] = get_string("nograde");
|
||||
|
||||
choose_from_menu($grades, "grade", "$form->grade", "");
|
||||
helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
|
||||
?>
|
||||
|
||||
+1
-1
@@ -102,8 +102,8 @@
|
||||
$table->align = array("right", "left");
|
||||
$table->data[] = array("$strtimetaken:", $timetaken);
|
||||
$table->data[] = array("$strtimecompleted:", userdate($attempt->timefinish));
|
||||
$table->data[] = array("$strscore:", "$result->sumgrades/$quiz->sumgrades ($result->percentage %)");
|
||||
if ($quiz->grade) {
|
||||
$table->data[] = array("$strscore:", "$result->sumgrades/$quiz->sumgrades ($result->percentage %)");
|
||||
$table->data[] = array("$strgrade:", "$result->grade/$quiz->grade");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user