Commit 7caa8d79 authored by Dianne Tennent's avatar Dianne Tennent Committed by Robert Lyon
Browse files

Bug 1953095: 'Submitted host' info for LTI submission

Update event handler in the submit function in
view.php to include 'externalhost'
Adjust strings to be more generic to work with
both LTI1.1 and 1.3

Change-Id: I80ab755447e8441dc4a30dc3af871eee47575c40
(cherry picked from commit 119c101f)
parent 25d9a4c5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7207,7 +7207,8 @@ class View {
                                            'eventfor' => 'view',
                                            'name' => $this->title,
                                            'group' => ($group) ? $group->id : null,
                                            'groupname' => ($group) ? $group->name : null));
                                            'groupname' => ($group) ? $group->name : null,
                                            'externalhost' => ($submittedhost) ? $submittedhost : null));

        if ($group && $sendnotification) {
            activity_occurred(
+5 −5
Original line number Diff line number Diff line
@@ -2,11 +2,11 @@

defined('INTERNAL') || die();

$string["message"] = 'This is to confirm that you submitted the %s "%s" successfully to the group "%s" at %s.
$string["message1"] = 'This is to confirm that you submitted the %s "%s" successfully to \'%s\' at %s.

If you have any questions about this submission, please contact the group administrator.';
$string["messageexternal"] = 'This is to confirm that you submitted the %s "%s" successfully to the external host "%s" at %s.
If you have any questions about this submission, please contact your instructor.';
$string["messageexternal1"] = 'This is to confirm that you submitted the %s "%s" successfully to the external host "%s" at %s.

If you have any questions about this submission, please contact the group administrator.';
$string["subject"] = 'Your submission of your %s was successful';
If you have any questions about this submission, please contact your instructor.';
$string["subject"] = 'Submission of your %s was successful';
$string["page"] = "page";
+2 −2
Original line number Diff line number Diff line
@@ -126,10 +126,10 @@ class PluginModuleAssessmentreport extends PluginModule {
        }
        $subject = get_string('subject', 'module.assessmentreport', $type);
        if ($group) {
            $message = get_string('message', 'module.assessmentreport', $type, $data['name'], $host, format_date(strtotime("now"), 'strftimedatetimesuffix'));
            $message = get_string('message1', 'module.assessmentreport', $type, $data['name'], $host, format_date(strtotime("now"), 'strftimedatetimesuffix'));
        }
        else {
            $message = get_string('messageexternal', 'module.assessmentreport', $type, $data['name'], $host, format_date(strtotime("now"), 'strftimedatetimesuffix'));
            $message = get_string('messageexternal1', 'module.assessmentreport', $type, $data['name'], $host, format_date(strtotime("now"), 'strftimedatetimesuffix'));
        }

        activity_occurred(