MDL-10210 Added help text for fields of 'text' type: "Leave this field empty to use the site default (currently $a)"

This commit is contained in:
nicolasconnault 2007-07-30 09:01:14 +00:00
parent 7b61efbefe
commit 8933d48cf4
2 changed files with 7 additions and 4 deletions

View File

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

View File

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