MDL-13481 Strings fullname and shortname are now deprecated
authorDavid Mudrak <david@moodle.com>
Tue, 22 Feb 2011 09:12:10 +0000 (10:12 +0100)
committerDavid Mudrak <david@moodle.com>
Mon, 28 Feb 2011 08:42:50 +0000 (09:42 +0100)
This is a final cleanup commit of fullname and shortname issue. All
places where these strings were detected yet have been replaced with
proper fullnamecourse or fullnameuser or some other context specific
string.

AMOS BEGIN
 CPY [fullname,core],[outcomefullname,core_grades]
 CPY [shortname,core],[outcomeshortname,core_grades]
 CPY [name,core],[rolefullname,core_role]
 CPY [shortname,core],[roleshortname,core_role]
AMOS END

17 files changed:
admin/roles/lib.php
admin/roles/manage.php
backup/util/ui/renderer.php
course/edit_form.php
course/lib.php
course/pending.php
course/request_form.php
grade/edit/outcome/edit_form.php
grade/edit/outcome/index.php
grade/report/outcomes/index.php
lang/en/grades.php
lang/en/moodle.php
lang/en/role.php
mod/assignment/lib.php
mod/data/preset_form.php
mod/feedback/analysis_to_excel.php
user/addnote.php

index cd55ecf..e211340 100644 (file)
@@ -780,8 +780,8 @@ class define_role_table_advanced extends capability_table_with_risks {
         global $OUTPUT;
         // Extra fields at the top of the page.
         echo '<div class="topfields clearfix">';
-        $this->print_field('name', get_string('name'), $this->get_name_field('name'));
-        $this->print_field('shortname', get_string('shortname'), $this->get_shortname_field('shortname'));
+        $this->print_field('name', get_string('rolefullname', 'role'), $this->get_name_field('name'));
+        $this->print_field('shortname', get_string('roleshortname', 'role'), $this->get_shortname_field('shortname'));
         $this->print_field('edit-description', get_string('description'), $this->get_description_field('description'));
         $this->print_field('menuarchetype', get_string('archetype', 'role').'&nbsp;'.$OUTPUT->help_icon('archetype', 'role'), $this->get_archetype_field('archetype'));
         $this->print_field('', get_string('maybeassignedin', 'role'), $this->get_assignable_levels_control());
index 0473b83..411abc8 100755 (executable)
     $table->head = array(
         get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'),
         get_string('description'),
-        get_string('shortname'),
+        get_string('roleshortname', 'role'),
         get_string('edit')
     );
 
index ed358f6..f8ab57b 100644 (file)
@@ -461,7 +461,7 @@ class core_backup_renderer extends plugin_renderer_base {
         $output .= html_writer::start_tag('div', array('class' => 'rcs-results'));
 
         $table = new html_table();
-        $table->head = array('', get_string('shortname'), get_string('fullname'));
+        $table->head = array('', get_string('shortnamecourse'), get_string('fullnamecourse'));
         $table->data = array();
         if ($component->get_count() !== 0) {
             foreach ($component->get_results() as $course) {
@@ -526,7 +526,7 @@ class core_backup_renderer extends plugin_renderer_base {
         $output .= html_writer::start_tag('div', array('class' => 'ics-results'));
 
         $table = new html_table();
-        $table->head = array('', get_string('shortname'), get_string('fullname'));
+        $table->head = array('', get_string('shortnamecourse'), get_string('fullnamecourse'));
         $table->data = array();
         foreach ($component->get_results() as $course) {
             $row = new html_table_row();
index 2adf59e..43271c4 100644 (file)
@@ -85,7 +85,7 @@ class course_edit_form extends moodleform {
             $mform->setConstant('fullname', $course->fullname);
         }
 
-        $mform->addElement('text','shortname', get_string('shortnamecourse'),'maxlength="100" size="20"');
+        $mform->addElement('text', 'shortname', get_string('shortnamecourse'), 'maxlength="100" size="20"');
         $mform->addHelpButton('shortname', 'shortnamecourse');
         $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
         $mform->setType('shortname', PARAM_MULTILANG);
index aad31ff..3fd1438 100644 (file)
@@ -347,7 +347,7 @@ function print_log($course, $user=0, $date=0, $order="l.time ASC", $page=0, $per
     $table->head = array(
         get_string('time'),
         get_string('ip_address'),
-        get_string('fullname'),
+        get_string('fullnamecourse'),
         get_string('action'),
         get_string('info')
     );
index 3c167ca..74c05b3 100644 (file)
@@ -101,7 +101,7 @@ if (empty($pending)) {
     $table = new html_table();
     $table->attributes['class'] = 'pendingcourserequests generaltable';
     $table->align = array('center', 'center', 'center', 'center', 'center', 'center');
-    $table->head = array(get_string('shortname'), get_string('fullname'),
+    $table->head = array(get_string('shortnamecourse'), get_string('fullnamecourse'),
             get_string('requestedby'), get_string('summary'), get_string('requestreason'), get_string('action'));
 
     foreach ($pending as $course) {
index d7657b7..80e60f0 100644 (file)
@@ -63,7 +63,7 @@ class course_request_form extends moodleform {
         $mform->addRule('fullname', get_string('missingfullname'), 'required', null, 'client');
         $mform->setType('fullname', PARAM_MULTILANG);
 
-        $mform->addElement('text', 'shortname', get_string('shortname'), 'maxlength="100" size="20"');
+        $mform->addElement('text', 'shortname', get_string('shortnamecourse'), 'maxlength="100" size="20"');
         $mform->addHelpButton('shortname', 'shortnamecourse');
         $mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
         $mform->setType('shortname', PARAM_MULTILANG);
index 702f240..6c1893e 100644 (file)
@@ -29,11 +29,11 @@ class edit_outcome_form extends moodleform {
         // visible elements
         $mform->addElement('header', 'general', get_string('outcomes', 'grades'));
 
-        $mform->addElement('text', 'fullname', get_string('fullname'), 'size="40"');
+        $mform->addElement('text', 'fullname', get_string('outcomefullname', 'grades'), 'size="40"');
         $mform->addRule('fullname', get_string('required'), 'required');
         $mform->setType('fullname', PARAM_TEXT);
 
-        $mform->addElement('text', 'shortname', get_string('shortname'), 'size="20"');
+        $mform->addElement('text', 'shortname', get_string('outcomeshortname', 'grades'), 'size="20"');
         $mform->addRule('shortname', get_string('required'), 'required');
         $mform->setType('shortname', PARAM_NOTAGS);
 
index 2791b55..45915b2 100644 (file)
@@ -56,8 +56,8 @@ if ($courseid) {
 /// return tracking object
 $gpr = new grade_plugin_return(array('type'=>'edit', 'plugin'=>'outcome', 'courseid'=>$courseid));
 
-$strshortname        = get_string('shortname');
-$strfullname         = get_string('fullname');
+$strshortname        = get_string('outcomeshortname', 'grades');
+$strfullname         = get_string('outcomefullname', 'grades');
 $strscale            = get_string('scale');
 $strstandardoutcome  = get_string('outcomesstandard', 'grades');
 $strcustomoutcomes   = get_string('outcomescustom', 'grades');
index 8311fba..cf73c63 100644 (file)
@@ -69,7 +69,7 @@ foreach ($outcomes as $outcomeid => $outcome) {
 }
 
 $html = '<table class="generaltable boxaligncenter" width="90%" cellspacing="1" cellpadding="5" summary="Outcomes Report">' . "\n";
-$html .= '<tr><th class="header c0" scope="col">' . get_string('outcomename', 'grades') . '</th>';
+$html .= '<tr><th class="header c0" scope="col">' . get_string('outcomeshortname', 'grades') . '</th>';
 $html .= '<th class="header c1" scope="col">' . get_string('courseavg', 'grades') . '</th>';
 $html .= '<th class="header c2" scope="col">' . get_string('sitewide', 'grades') . '</th>';
 $html .= '<th class="header c3" scope="col">' . get_string('activities', 'grades') . '</th>';
index 4a177de..8c3ec13 100644 (file)
@@ -441,9 +441,9 @@ $string['outcomecategorynew'] = 'New category';
 $string['outcomeconfirmdelete'] = 'Are you sure you wish to delete the outcome "{$a}"?';
 $string['outcomecreate'] = 'Add a new outcome';
 $string['outcomedelete'] = 'Delete outcome';
+$string['outcomefullname'] = 'Full name';
 $string['outcomeitem'] = 'Outcome item';
 $string['outcomeitemsedit'] = 'Edit outcome item';
-$string['outcomename'] = 'Outcome name';
 $string['outcomereport'] = 'Outcome report';
 $string['outcomes'] = 'Outcomes';
 $string['outcomescourse'] = 'Outcomes used in course';
@@ -451,6 +451,7 @@ $string['outcomescoursecustom'] = 'Custom used (no remove)';
 $string['outcomescoursenotused'] = 'Standard not used';
 $string['outcomescourseused'] = 'Standard used (no remove)';
 $string['outcomescustom'] = 'Custom outcomes';
+$string['outcomeshortname'] = 'Short name';
 $string['outcomesstandard'] = 'Standard outcomes';
 $string['outcomesstandardavailable'] = 'Available standard outcomes';
 $string['outcomestandard'] = 'Standard outcome';
index 05b7957..9e38f1c 100644 (file)
@@ -707,11 +707,11 @@ $string['frontpagenews'] = 'News items';
 $string['frontpagesettings'] = 'Front page settings';
 $string['frontpagetopiconly'] = 'Topic section';
 $string['fulllistofcourses'] = 'All courses';
-$string['fullname'] = 'Full name';
-$string['fullnamecourse'] = 'Course full name'; // fork of fullname
+$string['fullname'] = 'Full name'; // @deprecated - use fullnamecourse or fullnameuser or some own context specific string
+$string['fullnamecourse'] = 'Course full name';
 $string['fullnamecourse_help'] = 'The full name of the course is displayed at the top of each page in the course and in the list of courses.';
 $string['fullnamedisplay'] = '{$a->firstname} {$a->lastname}';
-$string['fullnameuser'] = 'User full name'; // fork of fullname
+$string['fullnameuser'] = 'User full name';
 $string['fullprofile'] = 'Full profile';
 $string['fullsitename'] = 'Full site name';
 $string['functiondisabled'] = 'That functionality is currently disabled';
@@ -1469,7 +1469,7 @@ $string['separateandconnectedinfo'] = 'The scale based on the theory of separate
 $string['serverlocaltime'] = 'Server\'s local time';
 $string['setcategorytheme'] = 'Set category theme';
 $string['settings'] = 'Settings';
-$string['shortname'] = 'Short name';
+$string['shortname'] = 'Short name'; // @deprecated - use shortnamecourse or shortnameuser or some own context specific string
 $string['shortnamecollisionwarning'] = '[*] = This shortname is already in use by a course and will need to be changed upon approval';
 $string['shortnamecourse'] = 'Course short name';
 $string['shortnamecourse_help'] = 'The short name of the course is displayed in the navigation and is used in the subject line of course email messages.';
index 322fb55..cf4f832 100644 (file)
@@ -294,6 +294,7 @@ $string['roleallowinfo'] = 'Select a role to be added to the list of allowed rol
 $string['role:assign'] = 'Assign roles to users';
 $string['roleassignments'] = 'Role assignments';
 $string['roledefinitions'] = 'Role definitions';
+$string['rolefullname'] = 'Role name';
 $string['role:manage'] = 'Create and manage roles';
 $string['role:override'] = 'Override permissions for others';
 $string['role:review'] = 'Review permissions for others';
@@ -304,6 +305,7 @@ $string['roles_help'] = 'A role is a collection of permissions defined for the w
 $string['roles_link'] = 'roles';
 $string['role:safeoverride'] = 'Override safe permissions for others';
 $string['roleselect'] = 'Select role';
+$string['roleshortname'] = 'Short name';
 $string['role:switchroles'] = 'Switch to other roles';
 $string['roletoassign'] = 'Role to assign';
 $string['roletooverride'] = 'Role to override';
index 82113ba..c27ca95 100644 (file)
@@ -1215,7 +1215,7 @@ class assignment_base {
         }
 
         $tableheaders = array('',
-                              get_string('fullname'),
+                              get_string('fullnameuser'),
                               get_string('grade'),
                               get_string('comment', 'assignment'),
                               get_string('lastmodified').' ('.get_string('submission', 'assignment').')',
index dad084e..df318d0 100644 (file)
@@ -48,10 +48,10 @@ class data_save_preset_form extends moodleform {
         $this->_form->addElement('header', 'exportheading', get_string('saveaspreset', 'data'));
         $this->_form->addElement('hidden', 'd');
         $this->_form->addElement('hidden', 'action', 'save2');
-        $this->_form->addElement('text', 'name', get_string('shortname'));
+        $this->_form->addElement('text', 'name', get_string('name'));
         $this->_form->setType('name', PARAM_FILE);
         $this->_form->addRule('name', null, 'required');
         $this->_form->addElement('checkbox', 'overwrite', get_string('overwrite', 'data'), get_string('overrwritedesc', 'data'));
         $this->_form->addElement('submit', 'saveaspreset', get_string('continue'));
     }
-}
\ No newline at end of file
+}
index 2a5e950..33920e5 100644 (file)
@@ -60,7 +60,7 @@ $fstring->question = get_string('question', 'feedback');
 $fstring->responses = get_string('responses', 'feedback');
 $fstring->idnumber = get_string('idnumber');
 $fstring->username = get_string('username');
-$fstring->fullname = get_string('fullname');
+$fstring->fullname = get_string('fullnameuser');
 $fstring->courseid = get_string('courseid', 'feedback');
 $fstring->course = get_string('course');
 $fstring->anonymous_user = get_string('anonymous_user','feedback');
index cbc5209..b6a0e10 100644 (file)
@@ -89,7 +89,7 @@ echo '<input type="hidden" name="id" value="'.$course->id.'" />';
 echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
 echo '</fieldset>';
 $table = new html_table();
-$table->head  = array (get_string('fullname'),
+$table->head  = array (get_string('fullnameuser'),
     get_string('content', 'notes'),
     get_string('publishstate', 'notes') . $OUTPUT->help_icon('publishstate', 'notes'),
     );