From: nicolasconnault Date: Mon, 30 Jul 2007 09:01:14 +0000 (+0000) Subject: MDL-10210 Added help text for fields of 'text' type: "Leave this field empty to use... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8933d48cf4b05a3f00417c7c33a294fcddf46b24;p=moodle.git MDL-10210 Added help text for fields of 'text' type: "Leave this field empty to use the site default (currently $a)" --- diff --git a/grade/report/grader/preferences_form.php b/grade/report/grader/preferences_form.php index 950b37c162..f51148f794 100644 --- a/grade/report/grader/preferences_form.php +++ b/grade/report/grader/preferences_form.php @@ -112,16 +112,19 @@ class grader_report_preferences_form extends moodleform { $default = $CFG->$full_pref; } + $help_string = get_string("config$lang_string", 'grades'); + // Replace the 'default' value with the site default language string if (!is_null($options) AND $options[GRADE_REPORT_PREFERENCE_DEFAULT] == 'default') { $options[GRADE_REPORT_PREFERENCE_DEFAULT] = get_string('sitedefault', 'grades', $default); + } elseif ($type == 'text') { + $help_string = get_string("config$lang_string", 'grades', $default); } $label = get_string($lang_string, 'grades') . $number; $mform->addElement($type, $full_pref, $label, $options); - $mform->setHelpButton($full_pref, array(false, get_string($lang_string, 'grades'), false, true, false, - get_string("config$lang_string", 'grades'))); + $mform->setHelpButton($full_pref, array(false, get_string($lang_string, 'grades'), false, true, false, $help_string)); $mform->setDefault($full_pref, $pref_value); $mform->setType($full_pref, PARAM_ALPHANUM); } diff --git a/lang/en_utf8/grades.php b/lang/en_utf8/grades.php index 6e006812ef..39f23ce6d2 100644 --- a/lang/en_utf8/grades.php +++ b/lang/en_utf8/grades.php @@ -56,7 +56,7 @@ $string['configenableajax'] = 'Adds a layer of AJAX functionality to the grader $string['configenableoutcomes'] = 'Support for Outcomes (also known as Competencies, Goals, Standards or Criteria) means that we can grade things using one or more scales that are tied to outcome statements. Enabling outcomes makes such special grading possible throughout the site.'; $string['configgradeboundary'] = 'A percentage boundary over which grades will be assigned a grade letter (if the Letter grade display type is used). '; $string['configgradedisplaytype'] = 'Grades can be shown as real grades, as percentages (in reference to the minimum and maximum grades) or as letters (A, B, C etc..)'; -$string['configgradeletter'] = 'A letter or other symbol used to represent a range of grades.'; +$string['configgradeletter'] = 'A letter or other symbol used to represent a range of grades. Leave this field empty to use the site default (currently $a).'; $string['configmeanselection'] = 'Select which types of grades will be included in the column averages. Cells with no grade can be ignored, or counted as 0 (default setting).'; $string['configquickfeedback'] = 'Quick Feedback adds a text input element in each grade cell on the grader report, allowing you to edit many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.'; $string['configquickgrading'] = 'Quick Grading adds a text input element in each grade cell on the grader report, allowing you to edit the feedback for many grades at once. You can then click the Update button to perform all these changes at once, instead of one at a time.'; @@ -70,7 +70,7 @@ $string['configshowlocks'] = 'Whether to show a lock/unlock icon near each grade $string['configshowfeedback'] = 'Whether to show a feedback icon (for adding/editing) near each grade.'; $string['configshowranges'] = 'Display a row showing the range of possible for each grading item in the grader report.'; $string['configshowuserimage'] = 'Whether to show the user\'s profile image next to the name in the grader report.'; -$string['configstudentsperpage'] = 'The number of students to display per page in the grader report.'; +$string['configstudentsperpage'] = 'The number of students to display per page in the grader report. Leave this field empty to use the site default (currently $a).'; $string['contract'] = 'Contract Category'; $string['createcategory'] = 'Create Category'; $string['createcategoryerror'] = 'Could not create a new category';