Skip to content

Commit

Permalink
Do not display video time instances that have deletion in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
moodledev committed Mar 27, 2020
1 parent 4c40f1d commit 41ae0bf
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions amd/build/player.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions amd/build/videotime.min.js.map

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

6 changes: 6 additions & 0 deletions amd/src/videotime.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ define(['jquery', 'mod_videotime/player', 'core/ajax', 'core/log', 'core/templat

log.debug('VIDEO_TIME embed options', embedOptions);

// Check if Vimeo video element exists.
if ($('#vimeo-embed-' + cmid).length == 0) {
log.debug("Vimeo video element not found: #vimeo-embed-" + cmid);
return;
}

var player = new Vimeo('vimeo-embed-' + cmid, embedOptions);

if (hasPro) {
Expand Down
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function videotime_cm_info_dynamic(cm_info $cm) {
return;
}

if (!videotime_has_pro()) {
if (!videotime_has_pro() || $cm->deletioninprogress || !$cm->visible) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@

$plugin->component = 'mod_videotime';
$plugin->release = '1.2';
$plugin->version = 2019111200;
$plugin->version = 2020032600;
$plugin->requires = 2015111610;
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 41ae0bf

Please sign in to comment.