Skip to content

Commit

Permalink
MDL-21695 Course settings page help strings
Browse files Browse the repository at this point in the history
Many of them are missing at the moment, Helen shall fix that soon

AMOS BEGIN
 HLP courseavailability.html,[availability_help,core]
 HLP coursecategory.html,[category_help,core]
 HLP courseenrollable2.html,[enrollable_help,core]
 HLP courseenrolmentplugins.html,[enrolmentplugins_help,core]
 HLP courseformats.html,[format_help,core]
 HLP coursegrades.html,[showgrades_help,core]
 HLP coursehiddensections.html,[hiddensections_help,core]
 HLP courseidnumber.html,[idnumbercourse_help,core]
 HLP coursenewsitems.html,[newsitemsnumber_help,core]
 HLP coursereports.html,[showreports_help,core]
 HLP courseshortname.html,[shortnamecourse_help,core]
 HLP coursestartdate.html,[startdate_help,core]
 HLP courseuploadsize.html,[maximumupload_help,core]
 HLP expirynotify.html,[expirynotify_help,core]
 HLP expirynotifystudents.html,[expirynotifystudents_help,core]
 HLP expirythreshold.html,[expirythreshold_help,core]
 HLP groupmodeforce.html,[groupmodeforce_help,core]
 HLP groupmode.html,[groupmode_help,core]
 HLP metacourse.html,[managemeta_help,core]
 HLP rolerenaming.html,[rolerenaming_help,core]
AMOS END
  • Loading branch information
mudrd8mz committed May 3, 2010
1 parent 4be9b12 commit 5e67868
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 27 deletions.
49 changes: 23 additions & 26 deletions course/edit_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function definition() {
$mform->addElement('hidden', 'category', null);
$mform->setType('category', PARAM_INT);
}
$mform->setHelpButton('category', array('coursecategory', get_string('category')));
$mform->addHelpButton('category', 'category');
$mform->setDefault('category', $category->id);
$mform->setType('category', PARAM_INT);

Expand Down Expand Up @@ -96,7 +96,7 @@ function definition() {
$mform->setDefault('fullname', $fullname);

$mform->addElement('text','shortname', get_string('shortnamecourse'),'maxlength="100" size="20"');
$mform->setHelpButton('shortname', array('courseshortname', get_string('shortnamecourse')), true);
$mform->addHelpButton('shortname', 'shortnamecourse');
$mform->addRule('shortname', get_string('missingshortname'), 'required', null, 'client');
$mform->setType('shortname', PARAM_MULTILANG);
if (!empty($course->id) and !has_capability('moodle/course:changeshortname', $coursecontext)) {
Expand All @@ -107,16 +107,16 @@ function definition() {
$mform->setDefault('shortname', $shortname);

$mform->addElement('text','idnumber', get_string('idnumbercourse'),'maxlength="100" size="10"');
$mform->setHelpButton('idnumber', array('courseidnumber', get_string('idnumbercourse')), true);
$mform->addHelpButton('idnumber', 'idnumbercourse');
$mform->setType('idnumber', PARAM_RAW);
if (!empty($course->id) and !has_capability('moodle/course:changeidnumber', $coursecontext)) {
$mform->hardFreeze('idnumber');
$mform->setConstants('idnumber', $course->idnumber);
}


$mform->addElement('editor','summary_editor', get_string('summary'), null, $editoroptions);
$mform->setHelpButton('summary_editor', array('text2', get_string('helptext')), true);
$mform->addElement('editor','summary_editor', get_string('coursesummary'), null, $editoroptions);
$mform->addHelpButton('summary_editor', 'coursesummary');
$mform->setType('summary_editor', PARAM_RAW);

if (!empty($course->id) and !has_capability('moodle/course:changesummary', $coursecontext)) {
Expand All @@ -129,7 +129,7 @@ function definition() {
$formcourseformats[$courseformat] = get_string('pluginname', "format_$courseformat");
}
$mform->addElement('select', 'format', get_string('format'), $formcourseformats);
$mform->setHelpButton('format', array('courseformats', get_string('courseformats')), true);
$mform->addHelpButton('format', 'format');
$mform->setDefault('format', $courseconfig->format);

for ($i=1; $i<=52; $i++) {
Expand All @@ -139,32 +139,32 @@ function definition() {
$mform->setDefault('numsections', $courseconfig->numsections);

$mform->addElement('date_selector', 'startdate', get_string('startdate'));
$mform->setHelpButton('startdate', array('coursestartdate', get_string('startdate')), true);
$mform->addHelpButton('startdate', 'startdate');
$mform->setDefault('startdate', time() + 3600 * 24);

$choices = array();
$choices['0'] = get_string('hiddensectionscollapsed');
$choices['1'] = get_string('hiddensectionsinvisible');
$mform->addElement('select', 'hiddensections', get_string('hiddensections'), $choices);
$mform->setHelpButton('hiddensections', array('coursehiddensections', get_string('hiddensections')), true);
$mform->addHelpButton('hiddensections', 'hiddensections');
$mform->setDefault('hiddensections', $courseconfig->hiddensections);

$options = range(0, 10);
$mform->addElement('select', 'newsitems', get_string('newsitemsnumber'), $options);
$mform->setHelpButton('newsitems', array('coursenewsitems', get_string('newsitemsnumber')), true);
$mform->addHelpButton('newsitems', 'newsitemsnumber');
$mform->setDefault('newsitems', $courseconfig->newsitems);

$mform->addElement('selectyesno', 'showgrades', get_string('showgrades'));
$mform->setHelpButton('showgrades', array('coursegrades', get_string('grades')), true);
$mform->addHelpButton('showgrades', 'showgrades');
$mform->setDefault('showgrades', $courseconfig->showgrades);

$mform->addElement('selectyesno', 'showreports', get_string('showreports'));
$mform->setHelpButton('showreports', array('coursereports', get_string('activityreport')), true);
$mform->addHelpButton('showreports', 'showreports');
$mform->setDefault('showreports', $courseconfig->showreports);

$choices = get_max_upload_sizes($CFG->maxbytes);
$mform->addElement('select', 'maxbytes', get_string('maximumupload'), $choices);
$mform->setHelpButton('maxbytes', array('courseuploadsize', get_string('maximumupload')), true);
$mform->addHelpButton('maxbytes', 'maximumupload');
$mform->setDefault('maxbytes', $courseconfig->maxbytes);

if (!empty($CFG->allowcoursethemes)) {
Expand All @@ -182,13 +182,13 @@ function definition() {
$meta[1] = get_string('yes');
if ($disable_meta === false) {
$mform->addElement('select', 'metacourse', get_string('managemeta'), $meta);
$mform->setHelpButton('metacourse', array('metacourse', get_string('metacourse')), true);
$mform->addHelpButton('metacourse', 'managemeta');
$mform->setDefault('metacourse', $courseconfig->metacourse);
} else {
// no metacourse element - we do not want to change it anyway!
$mform->addElement('static', 'nometacourse', get_string('managemeta'),
((empty($course->metacourse)) ? $meta[0] : $meta[1]) . " - $disable_meta ");
$mform->setHelpButton('nometacourse', array('metacourse', get_string('metacourse')), true);
$mform->addHelpButton('nometacourse', 'managemeta');
}

//--------------------------------------------------------------------------------
Expand All @@ -207,7 +207,7 @@ function definition() {
$choices = array_flip($choices);
$choices = array_merge(array('' => get_string('sitedefault').' ('.get_string('enrolname', "enrol_$CFG->enrol").')'), $choices);
$mform->addElement('select', 'enrol', get_string('enrolmentplugins'), $choices);
$mform->setHelpButton('enrol', array('courseenrolmentplugins', get_string('enrolmentplugins')), true);
$mform->addHelpButton('enrol', 'enrolmentplugins');
$mform->setDefault('enrol', $courseconfig->enrol);


Expand Down Expand Up @@ -240,7 +240,7 @@ function definition() {
$radio[] = &MoodleQuickForm::createElement('radio', 'enrollable', null, get_string('yes'), 1);
$radio[] = &MoodleQuickForm::createElement('radio', 'enrollable', null, get_string('enroldate'), 2);
$mform->addGroup($radio, 'enrollable', get_string('enrollable'), ' ', false);
$mform->setHelpButton('enrollable', array('courseenrollable2', get_string('enrollable')), true);
$mform->addHelpButton('enrollable', 'enrollable');
$mform->setDefault('enrollable', $courseconfig->enrollable);

$mform->addElement('date_selector', 'enrolstartdate', get_string('enrolstartdate'), array('optional' => true));
Expand All @@ -262,11 +262,11 @@ function definition() {
$choices['0'] = get_string('no');
$choices['1'] = get_string('yes');
$mform->addElement('select', 'expirynotify', get_string('notify'), $choices);
$mform->setHelpButton('expirynotify', array('expirynotify', get_string('expirynotify')), true);
$mform->addHelpButton('expirynotify', 'expirynotify');
$mform->setDefault('expirynotify', $courseconfig->expirynotify);

$mform->addElement('select', 'notifystudents', get_string('expirynotifystudents'), $choices);
$mform->setHelpButton('notifystudents', array('expirynotifystudents', get_string('expirynotifystudents')), true);
$mform->addHelpButton('notifystudents', 'expirynotifystudents');
$mform->setDefault('notifystudents', $courseconfig->notifystudents);

$thresholdmenu=array();
Expand All @@ -275,7 +275,7 @@ function definition() {
$thresholdmenu[$seconds] = get_string('numdays', '', $i);
}
$mform->addElement('select', 'expirythreshold', get_string('expirythreshold'), $thresholdmenu);
$mform->setHelpButton('expirythreshold', array('expirythreshold', get_string('expirythreshold')), true);
$mform->addHelpButton('expirythreshold', 'expirythreshold');
$mform->setDefault('expirythreshold', $courseconfig->expirythreshold);

//--------------------------------------------------------------------------------
Expand All @@ -286,14 +286,14 @@ function definition() {
$choices[SEPARATEGROUPS] = get_string('groupsseparate', 'group');
$choices[VISIBLEGROUPS] = get_string('groupsvisible', 'group');
$mform->addElement('select', 'groupmode', get_string('groupmode'), $choices);
$mform->setHelpButton('groupmode', array('groupmode', get_string('groupmode')), true);
$mform->addHelpButton('groupmode', 'groupmode');
$mform->setDefault('groupmode', $courseconfig->groupmode);

$choices = array();
$choices['0'] = get_string('no');
$choices['1'] = get_string('yes');
$mform->addElement('select', 'groupmodeforce', get_string('force'), $choices);
$mform->setHelpButton('groupmodeforce', array('groupmodeforce', get_string('groupmodeforce')), true);
$mform->addHelpButton('groupmodeforce', 'groupmodeforce');
$mform->setDefault('groupmodeforce', $courseconfig->groupmodeforce);

//default groupings selector
Expand All @@ -308,15 +308,14 @@ function definition() {
$choices['0'] = get_string('courseavailablenot');
$choices['1'] = get_string('courseavailable');
$mform->addElement('select', 'visible', get_string('availability'), $choices);
$mform->setHelpButton('visible', array('courseavailability', get_string('availability')), true);
$mform->addHelpButton('visible', 'availability');
$mform->setDefault('visible', $courseconfig->visible);
if (!empty($course->id) and !has_capability('moodle/course:visibility', $coursecontext)) {
$mform->hardFreeze('visible');
$mform->setConstant('visible', $course->visible);
}

$mform->addElement('passwordunmask', 'enrolpassword', get_string('enrolmentkey'), 'size="25"');
$mform->setHelpButton('enrolpassword', array('enrolmentkey', get_string('enrolmentkey')), true);
$mform->setDefault('enrolpassword', '');
$mform->setDefault('enrolpassword', $courseconfig->enrolpassword);
$mform->setType('enrolpassword', PARAM_RAW);
Expand All @@ -333,7 +332,6 @@ function definition() {
$choices['1'] = get_string('guestsyes');
$choices['2'] = get_string('guestskey');
$mform->addElement('select', 'guest', get_string('opentoguests'), $choices);
$mform->setHelpButton('guest', array('guestaccess', get_string('opentoguests')), true);
$mform->setDefault('guest', $courseconfig->guest);

// If we are creating a course, its enrol method isn't yet chosen, BUT the site has a default enrol method which we can use here
Expand All @@ -354,7 +352,6 @@ function definition() {
//available for most rules, fetched from language pack (err_{rulename}).
$costgrprules['cost'][]=array(null, 'numeric', null, 'client');
$mform->addGroupRule('costgrp',$costgrprules);
$mform->setHelpButton('costgrp', array('cost', get_string('cost')), true);
$mform->setDefault('cost', '');
$mform->setDefault('currency', empty($CFG->enrol_currency) ? 'USD' : $CFG->enrol_currency);

Expand Down Expand Up @@ -420,7 +417,7 @@ function definition() {
/// customizable role names in this course
//--------------------------------------------------------------------------------
$mform->addElement('header','rolerenaming', get_string('rolerenaming'));
$mform->setHelpButton('rolerenaming', array('rolerenaming', get_string('rolerenaming')), true);
$mform->addHelpButton('rolerenaming', 'rolerenaming');

if ($roles = get_all_roles()) {
if ($coursecontext) {
Expand Down
2 changes: 1 addition & 1 deletion lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
$string['allownot'] = 'Do not allow';
$string['allparticipants'] = 'All participants';
$string['allteachers'] = 'All teachers';
$string['alphanumerical'] = 'Can only contain alphanumeric characters, hyphen (-) or period (.)';
$string['alphanumerical'] = 'Can only contain alphanumeric characters, hyphen (-) or period (.)';
$string['alreadyconfirmed'] = 'Registration has already been confirmed';
$string['always'] = 'Always';
$string['and'] = '{$a->one} and {$a->two}';
Expand Down

0 comments on commit 5e67868

Please sign in to comment.