$string['overridesitedefaultgradedisplaytypehelp'] = 'Tick this checkbox to enable the overriding of the site defaults for the display of grades in the gradebook. This activates form elements allowing you to define the grade letters and boundaries of your choice.';
$string['overridden'] = 'Overridden';
$string['overriddenhelp'] = 'When on, the overridden flag prevents any future attempts to automatically adjust the value of the grade. This flag is often set internally by the gradebook, but can be switched on and off manually using this form element.';
+$string['overriddennotice'] = 'Your final grade from this activity was manually adjusted.';
$string['overallavg'] = 'Overall average';
$string['pctoftotalgrade'] = '%% of total grade';
$string['percent'] = 'Percent';
$string['subneterror'] = 'Sorry, this quiz has been locked so that it is only accessible from certain locations. Currently your computer is not one of those allowed to use this quiz.';
$string['subnetnotice'] = 'This quiz has been locked so that it is only accessible from certain locations. Your computer is not on an allowed subnet. As teacher you are allowed to preview anyway.';
$string['substitutedby'] = 'will be substituted by';
+$string['summaryofattempts'] = 'Summary of your previous attempts';
$string['temporaryblocked'] = 'You are temporarily not allowed to re-attempt the quiz.<br /> You will be able to take another attempt on:';
$string['time'] = 'Time';
$string['timecompleted'] = 'Completed';
+++ /dev/null
-body#mod-quiz-report table#itemanalysis {
- margin: 20px auto;
-}
-body#mod-quiz-report table#itemanalysis .header,
-body#mod-quiz-report table#itemanalysis .cell
-{
- padding: 4px;
-}
-body#mod-quiz-report table#itemanalysis .header .commands {
- display: inline;
-}
-body#mod-quiz-report table#itemanalysis td {
- border-width: 1px;
- border-style: solid;
-}
-body#mod-quiz-report table#itemanalysis .header {
- text-align: left;
-}
-body#mod-quiz-report table#itemanalysis .numcol {
- text-align: center;
- vertical-align : middle !important;
-}
-
-body#mod-quiz-report table#itemanalysis .uncorrect {
- color: red;
-}
-
-body#mod-quiz-report table#itemanalysis .correct {
- color: blue;
- font-weight : bold;
-}
-
-body#mod-quiz-report table#itemanalysis .partialcorrect {
- color: green !important;
-}
-
-body#mod-quiz-report table#itemanalysis .qname {
- color: green !important;
-}
-
-/* manual grading */
-body#mod-quiz-grading table#grading
-{
- width: 80%;
- margin: auto;
-}
-
-body#mod-quiz-grading table#grading
-{
- margin: 20px auto;
-}
-
-body#mod-quiz-grading table#grading .header,
-body#mod-quiz-grading table#grading .cell
-{
- padding: 4px;
-}
-
-body#mod-quiz-grading table#grading .header .commands
-{
- display: inline;
-}
-
-body#mod-quiz-grading table#grading .picture
-{
- width: 40px;
-}
-
-body#mod-quiz-grading table#grading td
-{
- border-left-width: 1px;
- border-right-width: 1px;
- border-left-style: solid;
- border-right-style: solid;
- vertical-align: bottom;
-}
-
-.mod-quiz .quiz-report-title {
- text-align: center;
- font-weight : bold;
-}
-
-.mod-quiz .gradingdetails {
- font-size: small;
-}
-
-#mod-quiz-attempt #page {
- text-align: center;
-}
-
-#mod-quiz-attempt #timer .generalbox {
- width:150px
-}
-
-#mod-quiz-attempt #timer {
- position:absolute;
- /*top:100px; is set by js*/
- left:10px
-}
-#question-preview .essay .answer textarea {
- width: 400px;
-}
// This page prints a particular instance of quiz
require_once("../../config.php");
- require_once("locallib.php");
require_once($CFG->libdir.'/blocklib.php');
- require_once('pagelib.php');
-
+ require_once($CFG->libdir.'/gradelib.php');
+ require_once($CFG->dirroot.'/mod/quiz/locallib.php');
+ require_once($CFG->dirroot.'/mod/quiz/pagelib.php');
+
if (!empty($THEME->customcorners)) {
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
}
}
$numattempts = count($attempts);
+ // Work out the final grade, checking whether it was overridden in the gradebook.
$mygrade = quiz_get_best_grade($quiz, $USER->id);
+ $mygradeoverridden = false;
+ $gradebookfeedback = '';
+
+ $grading_info = grade_get_grades($course->id, 'mod', 'quiz', $quiz->id, $USER->id);
+ $item = $grading_info->items[0];
+ $grade = $item->grades[$USER->id];
+ if ($grade->overridden) {
+ $mygrade = $grade->grade + 0; // Convert to number.
+ $mygradeoverridden = true;
+ }
+ if (!empty($grade->str_feedback)) {
+ $gradebookfeedback = $grade->str_feedback;
+ }
+
// Print table with existing attempts
if ($attempts) {
- print_heading('Summary of your previous attempts');
+ print_heading(get_string('summaryofattempts', 'quiz'));
// Get some strings.
$strattempt = get_string("attempt", "quiz");
}
if ($numattempts && $quiz->sumgrades && !is_null($mygrade)) {
+ $resultinfo = '';
+
if ($overallstats) {
if ($available && $moreattempts) {
$a = new stdClass;
$a->method = quiz_get_grading_option_name($quiz->grademethod);
$a->mygrade = $mygrade;
$a->quizgrade = $quiz->grade;
- print_heading(get_string('gradesofar', 'quiz', $a));
+ $resultinfo .= print_heading(get_string('gradesofar', 'quiz', $a), '', 2, 'main', true);
} else {
- print_heading(get_string('yourfinalgradeis', 'quiz', "$mygrade / $quiz->grade"));
+ $resultinfo .= print_heading(get_string('yourfinalgradeis', 'quiz', "$mygrade / $quiz->grade"), '', 2, 'main', true);
+ if ($mygradeoverridden) {
+ $resultinfo .= '<p class="overriddennotice">'.get_string('overriddennotice', 'grades').'</p>';
+ }
}
}
+ if ($gradebookfeedback) {
+ $resultinfo .= print_heading(get_string('comment', 'quiz'), '', 3, 'main', true);
+ $resultinfo .= '<p class="quizteacherfeedback">'.$gradebookfeedback.'</p>';
+ }
if ($overallfeedback) {
- echo '<p class="quizgradefeedback">'.quiz_feedback_for_grade($mygrade, $quiz->id).'</p>';
+ $resultinfo .= print_heading(get_string('overallfeedback', 'quiz'), '', 3, 'main', true);
+ $resultinfo .= '<p class="quizgradefeedback">'.quiz_feedback_for_grade($mygrade, $quiz->id).'</p>';
+ }
+
+ if ($resultinfo) {
+ print_box($resultinfo, 'generalbox', 'feedback');
}
}
+
+
// Print a button to start/continue an attempt, if appropriate.
if (!$quiz->questions) {
print_heading(get_string("noquestions", "quiz"));
{
text-align: center;
}
+#mod-quiz-view #page .quizattemptsummary td p {
+ margin-top: 0;
+}
+#mod-quiz-view .generalbox#feedback {
+ width:70%;
+ margin-left:auto;
+ margin-right:auto;
+ padding-bottom:15px;
+}
+#mod-quiz-view .generalbox#feedback h2 {
+ margin: 0 0;
+}
+body#mod-quiz-view .generalbox#feedback .overriddennotice {
+ text-align: center;
+ font-size: 0.7em;
+}
+#mod-quiz-view .generalbox#feedback h3 {
+ text-align: left;
+}
.generalbox#passwordbox { /* Should probably match .generalbox#intro above */
width:70%;
#mod-quiz-attempt .pagingbar {
margin: 1.5em auto;
}
+#mod-quiz-attempt #page {
+ text-align: center;
+}
+
+#mod-quiz-attempt #timer .generalbox {
+ width:150px
+}
+
+#mod-quiz-attempt #timer {
+ position:absolute;
+ /*top:100px; is set by js*/
+ left:10px
+}
body#question-preview .quemodname,
body#question-preview .controls
text-align: center;
}
-body#mod-quiz-report table#attempts,
-body#mod-quiz-report table#commands,
-body#mod-quiz-report table#itemanalysis
+#mod-quiz-report table#attempts,
+#mod-quiz-report table#commands,
+#mod-quiz-report table#itemanalysis
{
width: 80%;
margin: auto;
}
-body#mod-quiz-report table#attempts,
-body#mod-quiz-report h2.main {
+#mod-quiz-report table#attempts,
+#mod-quiz-report h2.main {
clear: both;
}
-body#mod-quiz-report table#attempts {
+#mod-quiz-report table#attempts {
margin: 20px auto;
}
-body#mod-quiz-report table#attempts .header,
-body#mod-quiz-report table#attempts .cell
+#mod-quiz-report table#attempts .header,
+#mod-quiz-report table#attempts .cell
{
padding: 4px;
}
-body#mod-quiz-report table#attempts .header .commands {
+#mod-quiz-report table#attempts .header .commands {
display: inline;
}
-body#mod-quiz-report table#attempts .picture {
+#mod-quiz-report table#attempts .picture {
width: 40px;
}
-body#mod-quiz-report table#attempts td {
+#mod-quiz-report table#attempts td {
border-left-width: 1px;
border-right-width: 1px;
border-left-style: solid;
border-right-style: solid;
vertical-align: middle;
}
-body#mod-quiz-report table#attempts .header {
+#mod-quiz-report table#attempts .header {
text-align: left;
}
-body#mod-quiz-report table#attempts .picture {
+#mod-quiz-report table#attempts .picture {
text-align: center !important;
}
-body#mod-quiz-report .controls {
+#mod-quiz-report .controls {
text-align: center;
}
+#mod-quiz-report table#itemanalysis {
+ margin: 20px auto;
+}
+#mod-quiz-report table#itemanalysis .header,
+#mod-quiz-report table#itemanalysis .cell
+{
+ padding: 4px;
+}
+#mod-quiz-report table#itemanalysis .header .commands {
+ display: inline;
+}
+#mod-quiz-report table#itemanalysis td {
+ border-width: 1px;
+ border-style: solid;
+}
+#mod-quiz-report table#itemanalysis .header {
+ text-align: left;
+}
+#mod-quiz-report table#itemanalysis .numcol {
+ text-align: center;
+ vertical-align : middle !important;
+}
+
+#mod-quiz-report table#itemanalysis .uncorrect {
+ color: red;
+}
+
+#mod-quiz-report table#itemanalysis .correct {
+ color: blue;
+ font-weight : bold;
+}
+
+#mod-quiz-report table#itemanalysis .partialcorrect {
+ color: green !important;
+}
+
+#mod-quiz-report table#itemanalysis .qname {
+ color: green !important;
+}
+
+/* manual grading */
+#mod-quiz-grading table#grading
+{
+ width: 80%;
+ margin: auto;
+}
+
+#mod-quiz-grading table#grading
+{
+ margin: 20px auto;
+}
+
+#mod-quiz-grading table#grading .header,
+#mod-quiz-grading table#grading .cell
+{
+ padding: 4px;
+}
+
+#mod-quiz-grading table#grading .header .commands
+{
+ display: inline;
+}
+
+#mod-quiz-grading table#grading .picture
+{
+ width: 40px;
+}
+
+#mod-quiz-grading table#grading td
+{
+ border-left-width: 1px;
+ border-right-width: 1px;
+ border-left-style: solid;
+ border-right-style: solid;
+ vertical-align: bottom;
+}
+
+.mod-quiz .gradingdetails {
+ font-size: small;
+}
/***
*** Modules: Resource
***/