From 28b2b923b8fffc074eb12cd4fdc9ffc2ec952165 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Thu, 18 Sep 2014 17:52:29 +1000 Subject: [PATCH] EQ-1607 Remove intercept files option --- ChangeLog | 61 +++++++++++++++++++++++++++++++++++++------------- db/upgrade.php | 10 +++++++++ settings.php | 6 ++++- version.php | 2 +- 4 files changed, 62 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ee943c..500e369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-09-18 Dongsheng Cai + + EQ-1607 Remove intercept files option + 2014-09-12 Dongsheng Cai EQ-1599 Fix find all usage web service @@ -10,11 +14,9 @@ EQ-1598 Fix webservice for moodle 2.5 - Fix EQUELLA delete instance webservice - 2014-09-10 Dongsheng Cai - Fix SQL + Fix EQUELLA delete instance webservice 2014-09-09 Dongsheng Cai @@ -44,23 +46,29 @@ EQ-1574 fix js error when conditional access enabled #28 -2014-08-28 Luke Rossiter +2014-08-21 Luke Rossiter Add EQUELLA views to moodle logs when using LTI When LTI authentication is enabled, viewing an EQUELLA resource set to open in a new window did not add an entry to the moodle logs. Log entry added just before the redirect (similar to view.php). -2014-08-11 Dongsheng Cai +2014-08-03 Dongsheng Cai EQ-1450 improve find_all_usage +2014-07-30 Dongsheng Cai + coding style fix +2014-07-29 Dongsheng Cai + Check if coursemodule exists EQ-1444 Improve list_courses_for_user() EQ-1450 find_usage_for_item performance improvements +2014-08-11 Dongsheng Cai + EQ-1052 Dynamic window size 2014-08-01 Larry Cook @@ -81,11 +89,6 @@ Fix coding style -2014-06-12 Dongsheng Cai - - Merge pull request #25 from equella/bugfix/EQ-1317 - Fixes EQ-1317 send username as lis_person_sourcedid - 2014-06-12 Holland, Aaron Fixes EQ-1317 send username as lis_person_sourcedid @@ -102,7 +105,9 @@ More checks on course category - Remove hardcoded category id in @agrowe's code +2014-06-05 Dongsheng Cai + + Add ChangeLog file & fix hard-coded category id 2014-06-04 Dongsheng Cai @@ -329,7 +334,7 @@ callbackmulti: The section passed to course_add_cm_to_section is the relative section number -2013-09-19 Dongsheng Cai +2013-09-13 Dongsheng Cai EQ-489 filename urls migrate to uuid urls @@ -345,7 +350,7 @@ common/soap.php: Removed blank line breaking some Moodle functionally. -2013-08-22 Dongsheng Cai +2013-08-19 Dongsheng Cai EQ-393 Fixed param value encoded issue @@ -353,16 +358,28 @@ EQ-392 Send course structure to EQUELLA +2013-08-15 Dongsheng Cai + Code improvement +2013-08-14 Dongsheng Cai + Refs EQ-106 Fixed url encoding +2013-08-13 Dongsheng Cai + EQ-392 Launch the selection session with LTI +2013-08-12 Dongsheng Cai + Check array index +2013-08-09 Dongsheng Cai + EQ-366 Launch EQUELLA resource in LTI +2013-08-22 Dongsheng Cai + EQ-102 Moodle course no longer targetable 2013-07-02 Dongsheng Cai @@ -527,10 +544,10 @@ Added sort field - Improve find_useage_for_item webservice - 2012-11-16 Dongsheng Cai + Improve find_useage_for_item webservice + Fixed hard coded log path Format php code @@ -557,20 +574,32 @@ Error checking rest api response +2012-10-29 Dongsheng Cai + Improved option texts +2012-10-16 Dongsheng Cai + Refs #7070 Tweak admin settings +2012-08-31 Dongsheng Cai + Refs #7070: Change help text Refs #7070: Improved exception message +2012-08-30 Dongsheng Cai + Refs #7070: Improved activity settings +2012-08-29 Dongsheng Cai + Refs #7070: Improved admin settings Issue #4: Use new window option when create new EQUELLA instance +2012-08-28 Dongsheng Cai + Refs #7070: Option to enable DnD hook Refs #7070: Removed dnd hook, fixed function call @@ -582,6 +611,8 @@ Refs #7070: Drag & drop into moodle course Files will be intecepted by EQUELLA +2012-10-15 Dongsheng Cai + Initialise PHP object before assign properties 2012-07-10 Nick Read diff --git a/db/upgrade.php b/db/upgrade.php index c18ca53..d18656c 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -15,6 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . defined('MOODLE_INTERNAL') || die(); + function xmldb_equella_upgrade($oldversion) { global $CFG, $DB, $OUTPUT; @@ -216,5 +217,14 @@ function xmldb_equella_upgrade($oldversion) { upgrade_mod_savepoint(true, 2014090902, 'equella'); } + if ($oldversion < 2014091800) { + require_once ($CFG->dirroot . '/mod/equella/lib.php'); + if ((int)$CFG->equella_intercept_files == EQUELLA_CONFIG_INTERCEPT_FULL) { + set_config('equella_intercept_files', EQUELLA_CONFIG_INTERCEPT_ASK); + } + + upgrade_mod_savepoint(true, 2014091800, 'equella'); + } + return true; } diff --git a/settings.php b/settings.php index 9574cf7..055ecb2 100644 --- a/settings.php +++ b/settings.php @@ -96,7 +96,11 @@ function ecs($configoption, $params = null) { // Drag and drop // $settings->add(new admin_setting_heading('equella_dnd_settings', ecs('dnd.heading'), ecs('dnd.help'))); - $choices = array(EQUELLA_CONFIG_INTERCEPT_NONE => get_string('interceptnone', 'equella'),EQUELLA_CONFIG_INTERCEPT_ASK => get_string('interceptask', 'equella'),EQUELLA_CONFIG_INTERCEPT_FULL => get_string('interceptauto', 'equella')); + $choices = array( + EQUELLA_CONFIG_INTERCEPT_NONE => get_string('interceptnone', 'equella'), + EQUELLA_CONFIG_INTERCEPT_ASK => get_string('interceptask', 'equella'), + //EQUELLA_CONFIG_INTERCEPT_FULL => get_string('interceptauto', 'equella') + ); $intercepttype = new admin_setting_configselect('equella_intercept_files', get_string('interceptfiles', 'equella'), get_string('interceptfilesintro', 'equella'), 0, $choices); $settings->add($intercepttype); diff --git a/version.php b/version.php index d89cad4..d780eaa 100644 --- a/version.php +++ b/version.php @@ -16,6 +16,6 @@ // along with Moodle. If not, see . defined('MOODLE_INTERNAL') || die(); -$module->version = 2014090902; +$module->version = 2014091800; $module->requires = 2012120300; // Requires this Moodle version $module->component = 'mod_equella'; // Full name of the plugin (used for diagnostics)