MDL-30901 user Removing user->screenreader setting
authorDavid Monllao <davidm@moodle.com>
Mon, 17 Sep 2012 06:51:17 +0000 (14:51 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 21 Sep 2012 01:23:32 +0000 (09:23 +0800)
backup/moodle2/backup_stepslib.php
lang/en/moodle.php
lib/db/install.xml
lib/db/upgrade.php
user/editlib.php
version.php

index 3578063..2667e03 100644 (file)
@@ -1096,7 +1096,7 @@ class backup_users_structure_step extends backup_structure_step {
             'lastaccess', 'lastlogin', 'currentlogin',
             'mailformat', 'maildigest', 'maildisplay', 'htmleditor',
             'autosubscribe', 'trackforums', 'timecreated',
-            'timemodified', 'trustbitmask', 'screenreader');
+            'timemodified', 'trustbitmask');
 
         // Then, the fields potentially needing anonymization
         $anonfields = array(
index ba2def6..a9f4b3e 100644 (file)
@@ -1466,10 +1466,6 @@ $string['scalestandard_help'] = 'A standard scale is available site-wide, for al
 $string['scalestandard_link'] = 'grade/scale';
 $string['scalestip'] = 'To create custom scales, use the \'Scales...\' link in your course administration menu.';
 $string['scalestip2'] = 'To create custom scales, click the Grades link in the course administration menu, then choose Edit, Scales.';
-$string['screenreaderno'] = 'No';
-$string['screenreaderuse'] = 'Screen reader';
-$string['screenreaderyes'] = 'Yes';
-$string['screenreaderuse_help'] = 'If set to yes, a more accessible interface is provided in various places such as chat.';
 $string['screenshot'] = 'Screenshot';
 $string['search'] = 'Search'; // TODO MDL-34652 rename to searchforums and move to mod_forum
 $string['search_help'] = 'For basic searching of one or more words anywhere in the text, just type them separated by spaces. All words longer than two characters are used.
index bcd5920..a77dc98 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<XMLDB PATH="lib/db" VERSION="20120825" COMMENT="XMLDB file for core Moodle tables"
+<XMLDB PATH="lib/db" VERSION="20120917" COMMENT="XMLDB file for core Moodle tables"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
 >
         <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="trackforums" NEXT="timemodified"/>
         <FIELD NAME="timemodified" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timecreated" NEXT="trustbitmask"/>
         <FIELD NAME="trustbitmask" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="timemodified" NEXT="imagealt"/>
-        <FIELD NAME="imagealt" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="alt tag for user uploaded image" PREVIOUS="trustbitmask" NEXT="screenreader"/>
-        <FIELD NAME="screenreader" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="flag for determining whehter the user uses a screenreader." PREVIOUS="imagealt"/>
+        <FIELD NAME="imagealt" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="alt tag for user uploaded image" PREVIOUS="trustbitmask"/>
       </FIELDS>
       <KEYS>
         <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
index 4fc23fc..61ba44e 100644 (file)
@@ -1206,5 +1206,19 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2012090700.01);
     }
 
+    if ($oldversion < 2012091700.00) {
+
+        // Dropping screenreader field from user.
+        $table = new xmldb_table('user');
+        $field = new xmldb_field('screenreader');
+
+        if ($dbman->field_exists($table, $field)) {
+            $dbman->drop_field($table, $field);
+        }
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2012091700.00);
+    }
+
     return true;
 }
index d2250fb..afddd5c 100644 (file)
@@ -216,13 +216,6 @@ function useredit_shared_definition(&$mform, $editoroptions = null, $filemanager
         $mform->setType('htmleditor', PARAM_INT);
     }
 
-    $choices = array();
-    $choices['0'] = get_string('screenreaderno');
-    $choices['1'] = get_string('screenreaderyes');
-    $mform->addElement('select', 'screenreader', get_string('screenreaderuse'), $choices);
-    $mform->setDefault('screenreader', 0);
-    $mform->addHelpButton('screenreader', 'screenreaderuse');
-
     $mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
     $mform->setType('city', PARAM_TEXT);
     $mform->addRule('city', $strrequired, 'required', null, 'client');
index a795424..40fd7a4 100644 (file)
 defined('MOODLE_INTERNAL') || die();
 
 
-$version  = 2012092000.00;              // YYYYMMDD      = weekly release date of this DEV branch
+$version  = 2012092100.00;              // YYYYMMDD      = weekly release date of this DEV branch
                                         //         RR    = release increments - 00 in DEV branches
                                         //           .XX = incremental changes
 
-$release  = '2.4dev (Build: 20120920)'; // Human-friendly version name
+$release  = '2.4dev (Build: 20120921)'; // Human-friendly version name
 
 $branch   = '24';                       // this version's branch
 $maturity = MATURITY_ALPHA;             // this version's maturity level