Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
fix for formatted warnings in off- and on-campus signout forms
Browse files Browse the repository at this point in the history
  • Loading branch information
jrdegreeff committed Sep 2, 2019
1 parent b70c665 commit 7decd0b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion local/signout/amd/build/off_campus_form.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion local/signout/amd/build/on_campus_form.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions local/signout/amd/src/off_campus_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ define(
var passengerWarningDiv = permissionsFieldset.children().eq(1).children().eq(0);
if (data.passengerwarning && (data.type === 'passenger' || $('.mx-form select#id_type_select').val() == -1)) {
permissionsFieldset.next().hide();
passengerWarningDiv.children().eq(1).children().eq(0).text(data.passengerwarning);
passengerWarningDiv.children().eq(1).children().eq(0).html(data.passengerwarning);
passengerWarningDiv.show();
permissionsFieldset.show();
} else {
Expand All @@ -72,7 +72,7 @@ define(
var rideshareWarningDiv = permissionsFieldset.children().eq(1).children().eq(1);
if (data.ridesharewarning && (data.type === 'rideshare' || $('.mx-form select#id_type_select').val() == -1)) {
permissionsFieldset.next().hide();
rideshareWarningDiv.children().eq(1).children().eq(0).text(data.ridesharewarning);
rideshareWarningDiv.children().eq(1).children().eq(0).html(data.ridesharewarning);
rideshareWarningDiv.show();
permissionsFieldset.show();
} else {
Expand All @@ -81,7 +81,7 @@ define(
var typeWarningDiv = permissionsFieldset.children().eq(1).children().eq(2);
if (data.typewarning) {
permissionsFieldset.next().hide();
typeWarningDiv.children().eq(1).children().eq(0).text(data.typewarning);
typeWarningDiv.children().eq(1).children().eq(0).html(data.typewarning);
typeWarningDiv.show();
permissionsFieldset.show();
} else {
Expand Down
2 changes: 1 addition & 1 deletion local/signout/amd/src/on_campus_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ define(
var permissionsFieldset = $('.mx-form fieldset#id_permissions');
var warningText = permissionsFieldset.children().eq(1).children().eq(0).children().eq(1).children().eq(0);
if (data.warning) {
warningText.text(data.warning);
warningText.html(data.warning);
permissionsFieldset.next().hide();
permissionsFieldset.show();
} else {
Expand Down
8 changes: 4 additions & 4 deletions local/signout/externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static function get_on_campus_student_options_returns() {
'text' => new external_value(PARAM_TEXT, 'name of the location')
))
),
'warning' => new external_value(PARAM_TEXT, 'a warning for the student')
'warning' => new external_value(PARAM_RAW, 'a warning for the student')
));
}

Expand Down Expand Up @@ -189,9 +189,9 @@ public static function get_off_campus_student_options_returns() {
))
),
'maydrivepassengers' => new external_value(PARAM_BOOL, 'whether the student has permission to drive passengers'),
'passengerwarning' => new external_value(PARAM_TEXT, 'warning text regarding the student\'s passenger permissions'),
'ridesharewarning' => new external_value(PARAM_TEXT, 'warning text regarding the student\'s rideshare permissions'),
'typewarning' => new external_value(PARAM_TEXT, 'general warning text regarding the student\'s selected type')
'passengerwarning' => new external_value(PARAM_RAW, 'warning text regarding the student\'s passenger permissions'),
'ridesharewarning' => new external_value(PARAM_RAW, 'warning text regarding the student\'s rideshare permissions'),
'typewarning' => new external_value(PARAM_RAW, 'general warning text regarding the student\'s selected type')
));
}

Expand Down
2 changes: 1 addition & 1 deletion local/signout/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'local_signout';
$plugin->version = 2019081400;
$plugin->version = 2019090100;
$plugin->release = 'v3.1';
$plugin->requires = 2019052000; // Moodle 3.7.
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit 7decd0b

Please sign in to comment.