Skip to content
Snippets Groups Projects
Commit 2521b5bd authored by Friederike Schwager's avatar Friederike Schwager
Browse files

redirect to document or overviewtab after forwarding a question

parent f8babd85
Branches
No related tags found
No related merge requests found
......@@ -101,6 +101,7 @@ if ($action === 'forwardquestion') {
$data->commentid = $commentid;
$data->id = $cm->id; // Course module id.
$data->action = 'forwardquestion';
$data->fromoverview = $fromoverview;
// Initialise mform and pass on $data-object to it.
$mform = new pdfannotator_forward_form(null, ['comment' => $comment, 'recipients' => $recipientslist]);
......@@ -108,7 +109,6 @@ if ($action === 'forwardquestion') {
if ($mform->is_cancelled()) { // Form was cancelled.
// Go back to overview or document.
$fromoverview = optional_param('fromoverview', 0, PARAM_INT);
if ($fromoverview) {
$action = 'overviewquestions';
} else {
......
......@@ -54,6 +54,8 @@ class pdfannotator_forward_form extends moodleform {
// Action = 'forwardquestion'.
$mform->addElement('hidden', 'action');
$mform->setType('action', PARAM_ALPHA);
$mform->addElement('hidden', 'fromoverview');
$mform->setType('fromoverview', PARAM_INT);
// Display question.
$comment = $this->_customdata['comment'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment