Skip to content

Commit

Permalink
Enquiring show editing person's name.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaboesch committed Apr 21, 2024
1 parent 262e101 commit 0be3aee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 10 additions & 2 deletions archive_options.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,16 @@ public function setup_from_form_data($fromform) {
* Set the fields of this object from the URL parameters.
*/
public function setup_from_params() {
$this->showright = optional_param('right', $this->showright, PARAM_BOOL);
$this->showhistory = optional_param('history', $this->showhistory, PARAM_BOOL);
if (optional_param('right', $this->showright, PARAM_BOOL)) {
$this->showright = 1;
} else {
$this->showright = 0;
}
if (optional_param('history', $this->showhistory, PARAM_BOOL)) {
$this->showhistory = 1;
} else {
$this->showhistory = 0;
}
}

/**
Expand Down
4 changes: 3 additions & 1 deletion report.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,15 @@ protected function quiz_report_get_student_attempt($attemptid, $userid) {
$displayoptions = $attemptobj->get_display_options_with_edit_link(true, $slot, "");
$displayoptions->marks = 2;
$displayoptions->manualcomment = 1;
$displayoptions->manualcommentlink = new moodle_url('/mod/quiz/comment.php', ['attempt' => $attempt->id]);
$displayoptions->feedback = 1;
$displayoptions->history = $this->options->showhistory;
$displayoptions->rightanswer = $this->options->showright;
$displayoptions->correctness = 1;
$displayoptions->numpartscorrect = 1;
$displayoptions->flags = 1;
$displayoptions->manualcommentlink = 0;
$displayoptions->editquestionparams['cmid'] = $this->cm->id;
$displayoptions->editquestionparams['returnurl'] = new moodle_url('/mod/quiz/edit.php', ['cmid' => $this->cm->id]);

if ($slot != $originalslot) {
$attemptobj->get_question_attempt($slot)->set_max_mark(
Expand Down

0 comments on commit 0be3aee

Please sign in to comment.