From 29cbe43189ddcd908fdae4d0a9b816c424b9df30 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 22 Feb 2011 10:12:10 +0100 Subject: [PATCH] MDL-13481 Strings fullname and shortname are now deprecated 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 --- admin/roles/lib.php | 4 ++-- admin/roles/manage.php | 2 +- backup/util/ui/renderer.php | 4 ++-- course/edit_form.php | 2 +- course/lib.php | 2 +- course/pending.php | 2 +- course/request_form.php | 2 +- grade/edit/outcome/edit_form.php | 4 ++-- grade/edit/outcome/index.php | 4 ++-- grade/report/outcomes/index.php | 2 +- lang/en/grades.php | 3 ++- lang/en/moodle.php | 8 ++++---- lang/en/role.php | 2 ++ mod/assignment/lib.php | 2 +- mod/data/preset_form.php | 4 ++-- mod/feedback/analysis_to_excel.php | 2 +- user/addnote.php | 2 +- 17 files changed, 27 insertions(+), 24 deletions(-) diff --git a/admin/roles/lib.php b/admin/roles/lib.php index cd55ecfab32..e2113400017 100644 --- a/admin/roles/lib.php +++ b/admin/roles/lib.php @@ -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 '
'; - $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').' '.$OUTPUT->help_icon('archetype', 'role'), $this->get_archetype_field('archetype')); $this->print_field('', get_string('maybeassignedin', 'role'), $this->get_assignable_levels_control()); diff --git a/admin/roles/manage.php b/admin/roles/manage.php index 0473b839cad..411abc8b466 100755 --- a/admin/roles/manage.php +++ b/admin/roles/manage.php @@ -194,7 +194,7 @@ $table->head = array( get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'), get_string('description'), - get_string('shortname'), + get_string('roleshortname', 'role'), get_string('edit') ); diff --git a/backup/util/ui/renderer.php b/backup/util/ui/renderer.php index ed358f628c0..f8ab57bc5f8 100644 --- a/backup/util/ui/renderer.php +++ b/backup/util/ui/renderer.php @@ -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(); diff --git a/course/edit_form.php b/course/edit_form.php index 2adf59ee30f..43271c46876 100644 --- a/course/edit_form.php +++ b/course/edit_form.php @@ -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); diff --git a/course/lib.php b/course/lib.php index aad31ff9b2f..3fd14389258 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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') ); diff --git a/course/pending.php b/course/pending.php index 3c167ca73ff..74c05b3dbb2 100644 --- a/course/pending.php +++ b/course/pending.php @@ -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) { diff --git a/course/request_form.php b/course/request_form.php index d7657b7f018..80e60f0be8e 100644 --- a/course/request_form.php +++ b/course/request_form.php @@ -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); diff --git a/grade/edit/outcome/edit_form.php b/grade/edit/outcome/edit_form.php index 702f24083ca..6c1893ef00a 100644 --- a/grade/edit/outcome/edit_form.php +++ b/grade/edit/outcome/edit_form.php @@ -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); diff --git a/grade/edit/outcome/index.php b/grade/edit/outcome/index.php index 2791b5539c2..45915b2015b 100644 --- a/grade/edit/outcome/index.php +++ b/grade/edit/outcome/index.php @@ -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'); diff --git a/grade/report/outcomes/index.php b/grade/report/outcomes/index.php index 8311fbab2aa..cf73c63eaee 100644 --- a/grade/report/outcomes/index.php +++ b/grade/report/outcomes/index.php @@ -69,7 +69,7 @@ foreach ($outcomes as $outcomeid => $outcome) { } $html = '' . "\n"; -$html .= ''; +$html .= ''; $html .= ''; $html .= ''; $html .= ''; diff --git a/lang/en/grades.php b/lang/en/grades.php index 4a177dee0fd..8c3ec13c88d 100644 --- a/lang/en/grades.php +++ b/lang/en/grades.php @@ -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'; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 05b7957c6a6..9e38f1c9f5c 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -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.'; diff --git a/lang/en/role.php b/lang/en/role.php index 322fb55726f..cf4f832126d 100644 --- a/lang/en/role.php +++ b/lang/en/role.php @@ -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'; diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 82113ba64ec..c27ca95d50b 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -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').')', diff --git a/mod/data/preset_form.php b/mod/data/preset_form.php index dad084e2bbe..df318d0ea59 100644 --- a/mod/data/preset_form.php +++ b/mod/data/preset_form.php @@ -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 +} diff --git a/mod/feedback/analysis_to_excel.php b/mod/feedback/analysis_to_excel.php index 2a5e9506e60..33920e588ec 100644 --- a/mod/feedback/analysis_to_excel.php +++ b/mod/feedback/analysis_to_excel.php @@ -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'); diff --git a/user/addnote.php b/user/addnote.php index cbc52099243..b6a0e1082f1 100644 --- a/user/addnote.php +++ b/user/addnote.php @@ -89,7 +89,7 @@ echo ''; echo ''; echo ''; $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'), );
' . get_string('outcomename', 'grades') . '
' . get_string('outcomeshortname', 'grades') . '' . get_string('courseavg', 'grades') . '' . get_string('sitewide', 'grades') . '' . get_string('activities', 'grades') . '