diff --git a/admin/tool/uploaduser/index.php b/admin/tool/uploaduser/index.php index 9787ebb93af..ec692e227fa 100644 --- a/admin/tool/uploaduser/index.php +++ b/admin/tool/uploaduser/index.php @@ -86,7 +86,7 @@ $today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), // array of all valid fields for validation $STD_FIELDS = array('id', 'firstname', 'lastname', 'username', 'email', 'city', 'country', 'lang', 'timezone', 'mailformat', - 'maildisplay', 'maildigest', 'htmleditor', 'ajax', 'autosubscribe', + 'maildisplay', 'maildigest', 'htmleditor', 'autosubscribe', 'institution', 'department', 'idnumber', 'skype', 'msn', 'aim', 'yahoo', 'icq', 'phone1', 'phone2', 'address', 'url', 'description', 'descriptionformat', 'password', diff --git a/admin/tool/uploaduser/user_form.php b/admin/tool/uploaduser/user_form.php index 7fb74b0641b..7e7d790fd97 100644 --- a/admin/tool/uploaduser/user_form.php +++ b/admin/tool/uploaduser/user_form.php @@ -248,15 +248,6 @@ class admin_uploaduser_form2 extends moodleform { $mform->setType('htmleditor', PARAM_INT); } - if (empty($CFG->enableajax)) { - $mform->addElement('static', 'ajax', get_string('ajaxuse'), get_string('ajaxno')); - } else { - $choices = array( 0 => get_string('ajaxno'), 1 => get_string('ajaxyes')); - $mform->addElement('select', 'ajax', get_string('ajaxuse'), $choices); - $mform->setDefault('ajax', 1); - } - $mform->setAdvanced('ajax'); - $mform->addElement('text', 'city', get_string('city'), 'maxlength="100" size="25"'); $mform->setType('city', PARAM_MULTILANG); if (empty($CFG->defaultcity)) { diff --git a/backup/moodle2/backup_stepslib.php b/backup/moodle2/backup_stepslib.php index a2fa9488605..6b35dff82c5 100644 --- a/backup/moodle2/backup_stepslib.php +++ b/backup/moodle2/backup_stepslib.php @@ -1069,7 +1069,7 @@ class backup_users_structure_step extends backup_structure_step { 'lang', 'theme', 'timezone', 'firstaccess', 'lastaccess', 'lastlogin', 'currentlogin', 'mailformat', 'maildigest', 'maildisplay', 'htmleditor', - 'ajax', 'autosubscribe', 'trackforums', 'timecreated', + 'autosubscribe', 'trackforums', 'timecreated', 'timemodified', 'trustbitmask', 'screenreader'); // Then, the fields potentially needing anonymization diff --git a/lang/en/moodle.php b/lang/en/moodle.php index d0b5f9d0e70..4b2b34dba71 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -114,9 +114,7 @@ $string['advancedfilter'] = 'Advanced search'; $string['advancedsettings'] = 'Advanced settings'; $string['again'] = 'again'; $string['aimid'] = 'AIM ID'; -$string['ajaxno'] = 'No: use basic web features'; $string['ajaxuse'] = 'AJAX and Javascript'; -$string['ajaxyes'] = 'Yes: use advanced web features'; $string['all'] = 'All'; $string['allactions'] = 'All actions'; $string['allactivities'] = 'All activities'; diff --git a/lib/ajax/ajaxlib.php b/lib/ajax/ajaxlib.php index 098c4966f9f..72eba29539a 100644 --- a/lib/ajax/ajaxlib.php +++ b/lib/ajax/ajaxlib.php @@ -49,7 +49,7 @@ function user_preference_allow_ajax_update($name, $paramtype) { * @return bool */ function ajaxenabled(array $browsers = null) { - global $CFG, $USER; + global $CFG; if (!empty($browsers)) { $valid = false; @@ -77,9 +77,9 @@ function ajaxenabled(array $browsers = null) { return false; } - if (!empty($CFG->enableajax) && (!empty($USER->ajax) || !isloggedin())) { + if (!empty($CFG->enableajax)) { return true; } else { return false; } -} \ No newline at end of file +} diff --git a/lib/ajax/tests/ajaxlib_test.php b/lib/ajax/tests/ajaxlib_test.php index 844fc5df1bc..7bdb28d4737 100644 --- a/lib/ajax/tests/ajaxlib_test.php +++ b/lib/ajax/tests/ajaxlib_test.php @@ -65,12 +65,11 @@ class ajax_testcase extends advanced_testcase { * Uses the array of user agents to test ajax_lib::ajaxenabled */ function test_ajaxenabled() { - global $CFG, $USER; + global $CFG; $this->resetAfterTest(true); $CFG->enableajax = 1; - $USER->ajax = 1; // Should be true $_SERVER['HTTP_USER_AGENT'] = $this->user_agents['Firefox']['2.0']['Windows XP']; diff --git a/lib/db/install.xml b/lib/db/install.xml old mode 100644 new mode 100755 index 2cbd0e94b35..db749f374b9 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -754,9 +754,8 @@ - - - + + @@ -2874,4 +2873,4 @@ - + \ No newline at end of file diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index f0c8ba1bfef..09f3896bb2e 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -830,5 +830,21 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2012060600.04); } + if ($oldversion < 2012061800.01) { + + // Define field screenreader to be dropped from user + $table = new xmldb_table('user'); + $field = new xmldb_field('ajax'); + + // Conditionally launch drop field screenreader + if ($dbman->field_exists($table, $field)) { + $dbman->drop_field($table, $field); + } + + // Main savepoint reached + upgrade_main_savepoint(true, 2012061800.01); + } + + return true; } diff --git a/user/editlib.php b/user/editlib.php index 8110f61a898..0d542998770 100644 --- a/user/editlib.php +++ b/user/editlib.php @@ -196,16 +196,6 @@ function useredit_shared_definition(&$mform, $editoroptions = null) { $mform->setType('htmleditor', PARAM_INT); } - if (empty($CFG->enableajax)) { - $mform->addElement('static', 'ajaxdisabled', get_string('ajaxuse'), get_string('ajaxno')); - } else { - $choices = array(); - $choices['0'] = get_string('ajaxno'); - $choices['1'] = get_string('ajaxyes'); - $mform->addElement('select', 'ajax', get_string('ajaxuse'), $choices); - $mform->setDefault('ajax', 1); - } - $choices = array(); $choices['0'] = get_string('screenreaderno'); $choices['1'] = get_string('screenreaderyes'); diff --git a/version.php b/version.php index 2d8e83a16d2..864c4f63384 100644 --- a/version.php +++ b/version.php @@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012061800.00; // YYYYMMDD = weekly release date of this DEV branch +$version = 2012061800.01; // YYYYMMDD = weekly release date of this DEV branch // RR = release increments - 00 in DEV branches // .XX = incremental changes