Browse Source

CO-11 reports: fix wrong url variable, refactor message variable name

master
Jan Koppe 1 year ago
parent
commit
eed3e680cb
Signed by: j <post@jankoppe.de> GPG Key ID: BE935B0735A2129B
3 changed files with 5 additions and 5 deletions
  1. +2
    -2
      controller.php
  2. +2
    -2
      lang/en/pdfannotator.php
  3. +1
    -1
      reportform.php

+ 2
- 2
controller.php View File

@@ -275,7 +275,7 @@ if ($action === 'report') {
$recipients = get_enrolled_users($context, 'mod/pdfannotator:administrateuserinput');
$name = 'newreport';
$report->reportinguser = fullname($USER);
$report->url = $CFG->wwwroot . '/mod/pdfannotator/view.php?id=' . $cm->id . '&action=overview';
$report->urltoreport = $CFG->wwwroot . '/mod/pdfannotator/view.php?id=' . $cm->id . '&action=overview';
$messagetext = new stdClass();
$messagetext->text = pdfannotator_format_notification_message_text($course, $cm, $context,
get_string('modulename', 'pdfannotator'), $cm->name, $report, 'reportadded');
@@ -298,7 +298,7 @@ if ($action === 'report') {
$record->commentid = $report->commentid;
$record->courseid = $cm->course;
$record->pdfannotatorid = $cm->instance;
$record->message = $report->introduction;
$record->message = $report->message;
$record->userid = $USER->id;
$record->timecreated = time();
$record->seen = 0;


+ 2
- 2
lang/en/pdfannotator.php View File

@@ -298,12 +298,12 @@ $string['decision:overlappingAnnotation'] = 'You clicked an area, in which is mo

$string['eventreport_added'] = 'A comment was reported';

$string['reportaddedhtml'] = '{$a->reportinguser} has reportet a comment with the message: <br /><br /> "{$a->introduction}"<br /><br />
$string['reportaddedhtml'] = '{$a->reportinguser} has reportet a comment with the message: <br /><br /> "{$a->message}"<br /><br />
It is <a href="{$a->urltoreport}">available on the web site</a>.';

$string['reportaddedtext'] = '{$a->reportinguser} has reportet a comment with the message:

"{$a->introduction}"
"{$a->message}"

It is available under: {$a->urltoreport}';



+ 1
- 1
reportform.php View File

@@ -58,7 +58,7 @@ class pdfannotator_reportform extends moodleform {
$mform->addElement('header', 'bookwithmessagetitle', get_string('subtitleforreportcommentform', 'pdfannotator'));

// Add a textarea for explaining the reason of complaint.
$mform->addElement('textarea', 'introduction', get_string('reason', 'pdfannotator'), 'wrap="virtual" rows="5'
$mform->addElement('textarea', 'message', get_string('reason', 'pdfannotator'), 'wrap="virtual" rows="5'
. '" cols="109"');

// Add submit and cancel buttons.


Loading…
Cancel
Save