-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRAFT: Mdl 72188 master seb js integration dev #1
base: master-seb
Are you sure you want to change the base?
Conversation
Add breadcrumbs to the calendar page.
Co-authored-by: Paul Holden <[email protected]>
Checks if a form element has attributes before trying to get the default value. This fixes an error when trying to get the default value for a frozen group which does not have the attributes array.
The new get_safe_orderby() and get_safe_orderby_multiple() methods provide a centralised safe way for user submitted sorting values to be incorporated into SQL ORDER BY. They do this by removing the need for user submitted data to pass in any SQL and not allowing arbitrary column values, instead using string keys which map to a predefined list of allowed sortable columns.
Also use the new {{#cleanstr}} helper where it was more appropriate than the {{#str} helper.
The format_string() function does half html escaping. It escapes < and > characters, but does not escape ". Therefore, it put us in a situation where neither {{}}, nor {{{}}} are suitable in templates. If we use {{}} for an attribute (like title or aria-label), then < and > characters will be double escaped. On the other hand, if we use {{{}}} there, a double quote character will break HTML when it is used in an attribute. Therefore, neither {{}}, nore {{{}}} are usable in html attributes. Moreover, The title attribute here was redundant because it had the same value as the link's text.
Adding comment as a reminder. We need to decide on minumum SEB versions for all platforms and update the internal message and plugin docs. |
bab9a64
to
f1829b7
Compare
if (window.SafeExamBrowser !== null) { | ||
await View.addLoadingAlert(); | ||
// If the SEB keys are already set, we can call our callback directly. | ||
if (window.SafeExamBrowser.security.configKey !== ":" || window.SafeExamBrowser.security.browserExamKey !== ":") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we check it like !==":"?
* | ||
* @return bool True if one or more keys are set in quiz settings. | ||
*/ | ||
public function valid_browser_exam_key_exists(): bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this method be public? Is it used anywhere outside of that class?
Also the name is a bit confusing for me as I would think it check key in a browser and not setting. Maybe rename to something like is_allowed_browser_examkeys_configured to stress that we are checking it in settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Changed name, made private, and removed related unit tests.
$valid = $this->check_browser_exam_keys($validbrowserexamkeys, $browserexamkey, $url); | ||
|
||
if (!$valid) { | ||
access_prevented::create_strict($this, $this->get_reason_text('invalid_browser_key'))->trigger(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those events shouldn't be in this class. They should be closer to where we actually prevent the access. That may require refactoring web service and get rid of validate_seb_keys method to make ws code looks like the original prevent_access method.
f1829b7
to
3afa052
Compare
* Replaces checking header for SEB config keys to assess quiz access. * Adds new web service accessible via Ajax * Forces the use of the new API where available * Stores access in Moodle SESSION for quiz instead of checking every page.
… config key is checked.
8025e8f
to
655d22d
Compare
Adds behat support for selecting a date from the date selector element. The passed values should represent a textual date description wrapped in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also, the value 'disabled' is valid and can be used to disable the date selector element.
Adds behat support for selecting date and time from a datetime selector element. The passed values should represent a textual date and time description wrapped in '##' (e.g. '##first day of January 2020 08:00##', '##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be used to disable the datetime selector element.
Adds behat support for selecting a date from the date selector element. The passed values should represent a textual date description wrapped in '##' (e.g. '##first day of January 2020##', '##1 Jan 2020##'). Also, the value 'disabled' is valid and can be used to disable the date selector element.
Adds behat support for selecting date and time from a datetime selector element. The passed values should represent a textual date and time description wrapped in '##' (e.g. '##first day of January 2020 08:00##', '##1 Jan 2020 10:30##'). Also, the value 'disabled' is valid and can be used to disable the datetime selector element.
We encountered errors on the plugin check page while upgrading from version 3.11 to 4.3. The plugins marked with the status "To be deleted" have a null value for the $component property, which results in the following error message: "Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in lib/classes/component.php on line 1056." To avoid this error, we need to set an empty string as the default value for the $component property.
*** PLEASE DO NOT OPEN PULL REQUESTS VIA GITHUB ***
The moodle.git repository at Github is just a mirror of the official repository. We do not accept pull requests at Github.
See CONTRIBUTING.txt guidelines for how to contribute patches for Moodle. Thank you.
--