Skip to content

Commit

Permalink
VID-727: Add server error warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Thies committed Feb 12, 2024
1 parent 46c4c7a commit 3f44761
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion amd/build/videotime.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 amd/build/videotime.min.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion amd/src/videotime.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,13 @@ define([
VideoTime.prototype.setCurrentTime = function(sessionId, currentTime) {
return Ajax.call([{
methodname: 'videotimeplugin_pro_set_session_current_time',
args: {"session_id": sessionId, "current_time": currentTime}
args: {"session_id": sessionId, "current_time": currentTime},
fail: function(e) {
Log.debug(e);
document.querySelectorAll('.videotime-server-error').forEach(warning => {
warning.classList.remove('hidden');
});
}
}])[0];
};

Expand Down
1 change: 1 addition & 0 deletions lang/en/videotime.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@
$string['search:texttrack'] = 'VideoTime - text track information';
$string['search_help'] = 'Search name, description, albums, tags...';
$string['seconds'] = 'Seconds';
$string['servererror'] = 'There is a server connection problem. Time may not be tracked properly.';
$string['session_not_found'] = 'User session not found.';
$string['set_client_id_and_secret'] = 'Set Client ID and Secret';
$string['settings'] = 'Video Time settings';
Expand Down
3 changes: 3 additions & 0 deletions templates/videotime_instance.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<div id="next-activity-button">
{{{next_activity_button_html}}}
</div>
<div class="videotime-server-error alert alert-warning alert-block fade in alert-dismissible hidden">
{{# str }} servererror, videotime {{/ str }}
</div>

{{^tabshtml}}
{{> mod_videotime/vimeo_embed }}
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->component = 'mod_videotime';
$plugin->release = '1.5.5';
$plugin->version = 2022091405;
$plugin->release = '1.5.7';
$plugin->version = 2022091406;
$plugin->requires = 2015111610;
$plugin->maturity = MATURITY_STABLE;

0 comments on commit 3f44761

Please sign in to comment.