Skip to content

Commit

Permalink
Forum: Option to disable Save check (wiki and blog also) #757290
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason.Platts authored and sammarshallou committed Feb 13, 2024
1 parent 0b97188 commit 8f14d1e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion editpost.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@

// Check the network connection on exiting the update page.
$PAGE->requires->strings_for_js(array('savefailtitle', 'savefailnetwork', 'savefailsession', 'savefailtext'), 'oublog');
$PAGE->requires->yui_module('moodle-mod_oublog-savecheck', 'M.mod_oublog.savecheck.init', array($context->id));
if (get_config('mod_oublog', 'savecheck')) {
$PAGE->requires->yui_module('moodle-mod_oublog-savecheck', 'M.mod_oublog.savecheck.init', array($context->id));
}

echo $OUTPUT->footer();

Expand Down
3 changes: 3 additions & 0 deletions lang/en/oublog.php
Original file line number Diff line number Diff line change
Expand Up @@ -745,3 +745,6 @@
$string['export:header_author'] = 'Author';
$string['tagshowmore'] = 'Show more ...';
$string['tagshowless'] = 'Show less ...';

$string['savecheck'] = 'Enable save check';
$string['savecheck_desc'] = 'Enable checking of session etc on submitting the post form.';
4 changes: 4 additions & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@
$settings->add(new admin_setting_configtext('mod_oublog/remotetoken',
get_string('remotetoken', 'oublog'),
get_string('configremotetoken', 'oublog'), '', PARAM_ALPHANUM));

$settings->add(new admin_setting_configcheckbox('mod_oublog/savecheck',
get_string('savecheck', 'oublog'),
get_string('savecheck_desc', 'oublog'), 1));
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @package oublog
**/

$plugin->version = 2022092301;
$plugin->version = 2024020100;
$plugin->requires = 2022041900;
$plugin->component = 'mod_oublog';// Full name of the plugin (used for diagnostics)
$plugin->maturity = MATURITY_STABLE;
Expand Down

0 comments on commit 8f14d1e

Please sign in to comment.