Skip to content

Commit

Permalink
Merge branch 'MDL-74287-311' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_311_STABLE
  • Loading branch information
andrewnicols committed Jun 30, 2022
2 parents ad5e6f0 + c8aa905 commit dd4702e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
11 changes: 1 addition & 10 deletions lib/form/amd/build/events.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 lib/form/amd/build/events.min.js.map

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

7 changes: 2 additions & 5 deletions lib/form/amd/src/events.js
Expand Up @@ -25,10 +25,6 @@
import {get_string as getString} from 'core/str';

let changesMadeString;
getString('changesmadereallygoaway', 'moodle').then(string => {
changesMadeString = string;
return string;
}).catch();

/**
* Prevent user navigate away when upload progress still running.
Expand All @@ -55,8 +51,9 @@ export const types = {
* @param {String} elementId
* @returns {CustomEvent<unknown>}
*/
export const triggerUploadStarted = elementId => {
export const triggerUploadStarted = async elementId => {
// Add an additional check for changes made.
changesMadeString = await getString('changesmadereallygoaway', 'moodle');
window.addEventListener('beforeunload', changesMadeCheck);
const customEvent = new CustomEvent(types.uploadStarted, {
bubbles: true,
Expand Down
3 changes: 3 additions & 0 deletions media/player/videojs/classes/plugin.php
Expand Up @@ -446,6 +446,9 @@ protected function get_regex_youtube() {
* @param moodle_page $page The page we are going to add requirements to.
*/
public function setup($page) {
if (during_initial_install() || is_major_upgrade_required()) {
return;
}

// Load dynamic loader. It will scan page for videojs media and load necessary modules.
// Loader will be loaded on absolutely every page, however the videojs will only be loaded
Expand Down

0 comments on commit dd4702e

Please sign in to comment.