Skip to content

Commit

Permalink
MDL-13709 66 new lang files, and links to these help files have been …
Browse files Browse the repository at this point in the history
…updated wherever found.
  • Loading branch information
nicolasconnault committed Mar 3, 2008
1 parent e14a090 commit e0bc9f3
Show file tree
Hide file tree
Showing 79 changed files with 183 additions and 134 deletions.
7 changes: 3 additions & 4 deletions grade/edit/letter/edit_form.php
Expand Up @@ -37,8 +37,7 @@ function definition() {
// Only show "override site defaults" checkbox if editing the course grade letters
if (!$admin) {
$mform->addElement('checkbox', 'override', get_string('overridesitedefaultgradedisplaytype', 'grades'));
$mform->setHelpButton('override', array(false, get_string('overridesitedefaultgradedisplaytype', 'grades'),
false, true, false, get_string('overridesitedefaultgradedisplaytypehelp', 'grades')));
$mform->setHelpButton('override', array('overridesitedefaultgradedisplaytype', get_string('overridesitedefaultgradedisplaytype')));
}

$gradeletterhelp = get_string('configgradeletter', 'grades');
Expand All @@ -57,7 +56,7 @@ function definition() {

$mform->addElement('text', $gradelettername, $gradeletter." $i");
if ($i == 1) {
$mform->setHelpButton($gradelettername, array(false, $gradeletter." $i", false, true, false, $gradeletterhelp));
$mform->setHelpButton($gradelettername, array('gradeletter', get_string('gradeletter')));
}
$mform->setType($gradelettername, PARAM_TEXT);

Expand All @@ -68,7 +67,7 @@ function definition() {

$mform->addElement('select', $gradeboundaryname, $gradeboundary." $i", $percentages);
if ($i == 1) {
$mform->setHelpButton($gradeboundaryname, array(false, $gradeboundary." $i", false, true, false, $gradeboundaryhelp));
$mform->setHelpButton($gradeboundaryname, array('gradeboundary', get_string('boundary')));
}
$mform->setDefault($gradeboundaryname, -1);
$mform->setType($gradeboundaryname, PARAM_INT);
Expand Down
6 changes: 2 additions & 4 deletions grade/edit/outcome/edit_form.php
Expand Up @@ -42,14 +42,12 @@ function definition() {
$mform->setType('shortname', PARAM_NOTAGS);

$mform->addElement('advcheckbox', 'standard', get_string('outcomestandard', 'grades'));
$mform->setHelpButton('standard', array(false, get_string('outcomestandard', 'grades'),
false, true, false, get_string('outcomestandardhelp', 'grades')));
$mform->setHelpButton('standard', array('outcomestandard', get_string('outcomestandard'), 'grade'));

$options = array();

$mform->addElement('select', 'scaleid', get_string('scale'), $options);
$mform->setHelpButton('scaleid', array(false, get_string('scale'),
false, true, false, get_string('scaleidhelp', 'grades', get_string('outcome', 'grades'))));
$mform->setHelpButton('scaleid', array('scaleid', get_string('scale'), 'grade'));
$mform->addRule('scaleid', get_string('required'), 'required');

$mform->addElement('htmleditor', 'description', get_string('description'), array('cols'=>80, 'rows'=>20));
Expand Down
3 changes: 1 addition & 2 deletions grade/edit/scale/edit_form.php
Expand Up @@ -38,8 +38,7 @@ function definition() {
$mform->setType('name', PARAM_TEXT);

$mform->addElement('advcheckbox', 'standard', get_string('scalestandard'));
$mform->setHelpButton('standard', array(false, get_string('scalestandard'),
false, true, false, get_string('scalestandardhelp', 'grades')));
$mform->setHelpButton('standard', array('scalestandard', get_string('scalestandard'), 'grade'));

$mform->addElement('static', 'used', get_string('used'));

Expand Down
9 changes: 3 additions & 6 deletions grade/edit/settings/form.php
Expand Up @@ -60,8 +60,7 @@ function definition() {
}
}
$mform->addElement('select', 'aggregationposition', get_string('aggregationposition', 'grades'), $options);
$mform->setHelpButton('aggregationposition', array(false, get_string('aggregationposition', 'grades'),
false, true, false, get_string('configaggregationposition', 'grades')));
$mform->setHelpButton('aggregationposition', array('aggregationposition', get_string('aggregationposition', 'grades'), 'grade'));

// Grade item settings
$mform->addElement('header', 'grade_item_settings', get_string('gradeitemsettings', 'grades'));
Expand All @@ -82,14 +81,12 @@ function definition() {
}
}
$mform->addElement('select', 'displaytype', get_string('gradedisplaytype', 'grades'), $options);
$mform->setHelpButton('displaytype', array(false, get_string('gradedisplaytype', 'grades'),
false, true, false, get_string('configgradedisplaytype', 'grades')));
$mform->setHelpButton('displaytype', array('gradedisplaytype', get_string('gradedisplaytype', 'grades'), 'grade'));


$options = array(-1=> get_string('defaultprev', 'grades', $CFG->grade_decimalpoints), 0=>0, 1=>1, 2=>2, 3=>3, 4=>4, 5=>5);
$mform->addElement('select', 'decimalpoints', get_string('decimalpoints', 'grades'), $options);
$mform->setHelpButton('decimalpoints', array(false, get_string('decimalpoints', 'grades'),
false, true, false, get_string('configdecimalpoints', 'grades')));
$mform->setHelpButton('decimalpoints', array('decimalpoints', get_string('decimalpoints', 'grades'), 'grade'));

// add setting options for plugins
$types = array('report', 'export', 'import');
Expand Down
24 changes: 8 additions & 16 deletions grade/edit/tree/category_form.php
Expand Up @@ -53,8 +53,7 @@ function definition() {
}

$mform->addElement('checkbox', 'aggregateonlygraded', get_string('aggregateonlygraded', 'grades'));
$mform->setHelpButton('aggregateonlygraded', array(false, get_string('aggregateonlygraded', 'grades'),
false, true, false, get_string('aggregateonlygradedhelp', 'grades')));
$mform->setHelpButton('aggregateonlygraded', array('aggregateonlygraded', get_string('aggregateonlygraded', 'grades'),'grade'), true);
$mform->disabledIf('aggregateonlygraded', 'aggregation', 'eq', GRADE_AGGREGATE_SUM);
if ((int)$CFG->grade_aggregateonlygraded_flag & 2) {
$mform->setAdvanced('aggregateonlygraded');
Expand All @@ -65,17 +64,15 @@ function definition() {
$mform->setType('aggregateoutcomes', PARAM_INT);
} else {
$mform->addElement('checkbox', 'aggregateoutcomes', get_string('aggregateoutcomes', 'grades'));
$mform->setHelpButton('aggregateoutcomes', array(false, get_string('aggregateoutcomes', 'grades'),
false, true, false, get_string('aggregateoutcomeshelp', 'grades')));
$mform->setHelpButton('aggregateoutcomes', array('aggregateoutcomes', get_string('aggregateoutcomes', 'grades'), 'grade'), true);
$mform->disabledIf('aggregateoutcomes', 'aggregation', 'eq', GRADE_AGGREGATE_SUM);
if ((int)$CFG->grade_aggregateoutcomes_flag & 2) {
$mform->setAdvanced('aggregateoutcomes');
}
}

$mform->addElement('advcheckbox', 'aggregatesubcats', get_string('aggregatesubcats', 'grades'));
$mform->setHelpButton('aggregatesubcats', array(false, get_string('aggregatesubcats', 'grades'),
false, true, false, get_string('aggregatesubcatshelp', 'grades')));
$mform->setHelpButton('aggregatesubcats', array('aggregatesubcats', get_string('aggregatesubcats', 'grades'), 'grade'), true);
if ((int)$CFG->grade_aggregatesubcats_flag & 2) {
$mform->setAdvanced('aggregatesubcats');
}
Expand All @@ -86,15 +83,13 @@ function definition() {
}

$mform->addElement('select', 'keephigh', get_string('keephigh', 'grades'), $options);
$mform->setHelpButton('keephigh', array(false, get_string('keephigh', 'grades'),
false, true, false, get_string('keephighhelp', 'grades')));
$mform->setHelpButton('keephigh', array('keephigh', get_string('keephigh', 'grades'), 'grade'), true);
if ((int)$CFG->grade_keephigh_flag & 2) {
$mform->setAdvanced('keephigh');
}

$mform->addElement('select', 'droplow', get_string('droplow', 'grades'), $options);
$mform->setHelpButton('droplow', array(false, get_string('droplow', 'grades'),
false, true, false, get_string('droplowhelp', 'grades')));
$mform->setHelpButton('droplow', array('droplow', get_string('droplow', 'grades'), 'grade'), true);
$mform->disabledIf('droplow', 'keephigh', 'noteq', 0);
if ((int)$CFG->grade_droplow_flag & 2) {
$mform->setAdvanced('droplow');
Expand Down Expand Up @@ -136,8 +131,7 @@ function definition() {

if ($coefstring !== '') {
$mform->addElement('text', 'aggregationcoef', get_string($coefstring, 'grades'));
$mform->setHelpButton('aggregationcoef', array(false, get_string($coefstring, 'grades'),
false, true, false, get_string($coefstring.'help', 'grades')));
$mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true);
}

/// user preferences
Expand All @@ -149,8 +143,7 @@ function definition() {
$label = get_string('aggregationview', 'grades') . ' (' . get_string('default', 'grades')
. ': ' . $options[$CFG->grade_report_aggregationview] . ')';
$mform->addElement('select', 'pref_aggregationview', $label, $options);
$mform->setHelpButton('pref_aggregationview', array(false, get_string('aggregationview', 'grades'),
false, true, false, get_string('configaggregationview', 'grades')));
$mform->setHelpButton('pref_aggregationview', array('aggregationview', get_string('aggregationview', 'grades'), 'grade'), true);
$mform->setDefault('pref_aggregationview', GRADE_REPORT_PREFERENCE_DEFAULT);
$mform->setAdvanced('pref_aggregationview');

Expand Down Expand Up @@ -239,8 +232,7 @@ function definition_after_data() {
}
if ($aggcoef !== '') {
$agg_el->setLabel(get_string($aggcoef, 'grades'));
$mform->setHelpButton('aggregationcoef', array(false, get_string($aggcoef, 'grades'),
false, true, false, get_string($aggcoef.'help', 'grades')));
$mform->setHelpButton('aggregationcoef', array('aggregationcoef', get_string('aggregationcoef', 'grades'), 'grade'), true);
}
}

Expand Down
15 changes: 5 additions & 10 deletions grade/edit/tree/grade_form.php
Expand Up @@ -40,15 +40,13 @@ function definition() {
$mform->addElement('static', 'itemname', get_string('itemname', 'grades'));

$mform->addElement('checkbox', 'overridden', get_string('overridden', 'grades'));
$mform->setHelpButton('overridden', array(false, get_string('overridden', 'grades'),
false, true, false, get_string('overriddenhelp', 'grades')));
$mform->setHelpButton('overridden', array('overridden', get_string('overridden', 'grades'), 'grade'));

/// actual grade - numeric or scale
if ($grade_item->gradetype == GRADE_TYPE_VALUE) {
// numeric grade
$mform->addElement('text', 'finalgrade', get_string('finalgrade', 'grades'));
$mform->setHelpButton('finalgrade', array(false, get_string('finalgrade', 'grades'),
false, true, false, get_string('finalgradehelp', 'grades')));
$mform->setHelpButton('finalgrade', array('finalgrade', get_string('finalgrade', 'grades'), 'grade'));
$mform->disabledIf('finalgrade', 'overridden', 'notchecked');

} else if ($grade_item->gradetype == GRADE_TYPE_SCALE) {
Expand All @@ -70,14 +68,12 @@ function definition() {
}

$mform->addElement('select', 'finalgrade', get_string('finalgrade', 'grades'), $scaleopt);
$mform->setHelpButton('finalgrade', array(false, get_string('finalgrade', 'grades'),
false, true, false, get_string('finalgradehelp', 'grades')));
$mform->setHelpButton('finalgrade', array('finalgrade', get_string('finalgrade', 'grades'), 'grade'));
$mform->disabledIf('finalgrade', 'overridden', 'notchecked');
}

$mform->addElement('advcheckbox', 'excluded', get_string('excluded', 'grades'));
$mform->setHelpButton('excluded', array(false, get_string('excluded', 'grades'),
false, true, false, get_string('excludedhelp', 'grades')));
$mform->setHelpButton('excluded', array('excluded', get_string('excluded', 'grades'), 'grade'));

/// hiding
/// advcheckbox is not compatible with disabledIf !!
Expand All @@ -97,8 +93,7 @@ function definition() {
// Feedback format is automatically converted to html if user has enabled editor
$mform->addElement('htmleditor', 'feedback', get_string('feedback', 'grades'),
array('rows'=>'15', 'course'=>$COURSE->id, 'cols'=>'45'));
$mform->setHelpButton('feedback', array(false, get_string('feedback', 'grades'),
false, true, false, get_string('feedbackhelp', 'grades')));
$mform->setHelpButton('feedback', array('feedback', get_string('feedback', 'grades'), 'grade'));
$mform->setType('text', PARAM_RAW); // to be cleaned before display, no XSS risk
$mform->addElement('format', 'feedbackformat', get_string('format'));
$mform->setHelpButton('feedbackformat', array('textformat', get_string('helpformatting')));
Expand Down

0 comments on commit e0bc9f3

Please sign in to comment.