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
This commit is contained in:
David Mudrak 2011-02-22 10:12:10 +01:00
parent 2b37004c28
commit 29cbe43189
17 changed files with 27 additions and 24 deletions

View 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());

View File

@ -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')
);

View 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();

View 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);

View 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')
);

View 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) {

View 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);

View 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);

View 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');

View 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>';

View 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';

View 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.';

View 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';

View 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').')',

View 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'));
}
}
}

View 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');

View 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'),
);