Skip to content

Commit

Permalink
course publication MDL-19315 add help icons for course publication form
Browse files Browse the repository at this point in the history
  • Loading branch information
mouneyrac committed May 3, 2010
1 parent a6fb9d0 commit 63c9d71
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
16 changes: 14 additions & 2 deletions course/publish/forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function definition() {
$mform->addElement('text', 'demourl', get_string('demourl', 'hub'));
$mform->setType('demourl', PARAM_URL);
$mform->setDefault('demourl', new moodle_url("/course/view.php?id=".$course->id));
$mform->addHelpButton('demourl', 'demourl', 'hub');
}

if ($advertise) {
Expand All @@ -120,10 +121,12 @@ public function definition() {
$mform->addElement('text', 'courseurl', get_string('courseurl', 'hub'));
$mform->setType('courseurl', PARAM_URL);
$mform->setDefault('courseurl', new moodle_url("/course/view.php?id=".$course->id));
$mform->addHelpButton('courseurl', 'courseurl', 'hub');
}

$mform->addElement('text', 'courseshortname',get_string('courseshortname', 'hub'));
$mform->setDefault('courseshortname', $course->shortname);
$mform->addHelpButton('courseshortname', 'courseshortname', 'hub');

$mform->addElement('textarea', 'description', get_string('description'), array('rows'=>10));
$mform->addRule('description', $strrequired, 'required', null, 'client');
Expand All @@ -149,17 +152,21 @@ public function definition() {
$mform->addElement('text', 'publishername',get_string('publishername', 'hub'));
$mform->setDefault('publishername', $USER->firstname.' '.$USER->lastname);
$mform->addRule('publishername', $strrequired, 'required', null, 'client');
$mform->addHelpButton('publishername', 'publishername', 'hub');

$mform->addElement('text', 'contributornames', get_string('contributornames', 'hub'));
$mform->setDefault('contributornames', '');
$mform->addHelpButton('contributornames', 'contributornames', 'hub');

$mform->addElement('text','coverage' , get_string('tags', 'hub'));
$mform->setType('coverage', PARAM_TEXT);
$mform->addHelpButton('coverage', 'tags', 'hub');

$mform->addElement('text', 'creatorname', get_string('creatorname', 'hub'));
$mform->addRule('creatorname', $strrequired, 'required', null, 'client');
$mform->setType('creatorname', PARAM_TEXT);
$mform->setDefault('creatorname', $USER->firstname.' '.$USER->lastname);
$mform->addHelpButton('creatorname', 'creatorname', 'hub');

require_once($CFG->dirroot."/lib/licenselib.php");
$licensemanager = new license_manager();
Expand All @@ -171,10 +178,12 @@ public function definition() {
$mform->addElement('select', 'licence', get_string('license'), $options);
$mform->setDefault('licence', 'cc');
unset($options);
$mform->addHelpButton('licence', 'licence', 'hub');

$options = get_string_manager()->load_component_strings('edufields', current_language());
$mform->addElement('select', 'subject', get_string('subject', 'hub'), $options);
unset($options);
$mform->addHelpButton('subject', 'subject', 'hub');

$options = array();
$options[AUDIENCE_EDUCATORS] = get_string('audienceeducators', 'hub');
Expand All @@ -183,6 +192,7 @@ public function definition() {
$mform->addElement('select', 'audience', get_string('audience', 'hub'), $options);
$mform->setDefault('audience', AUDIENCE_EDUCATORS);
unset($options);
$mform->addHelpButton('audience', 'audience', 'hub');

$options = array();
$options[EDULEVEL_PRIMARY] = get_string('edulevelprimary', 'hub');
Expand All @@ -195,22 +205,24 @@ public function definition() {
$mform->addElement('select', 'educationallevel', get_string('educationallevel', 'hub'), $options);
$mform->setDefault('educationallevel', EDULEVEL_TERTIARY);
unset($options);
$mform->addHelpButton('educationallevel', 'educationallevel', 'hub');

$editoroptions = array('maxfiles'=>0, 'maxbytes'=>0, 'trusttext'=>false, 'forcehttps'=>false);
$mform->addElement('editor', 'creatornotes', get_string('creatornotes', 'hub'), '', $editoroptions);
$mform->addRule('creatornotes', $strrequired, 'required', null, 'client');
$mform->setDefault('creatornotes', '');
$mform->setType('creatornotes', PARAM_CLEANHTML);
$mform->addHelpButton('creatornotes', 'creatornotes', 'hub');



$mform->addElement('filemanager', 'screenshots', get_string('screenshots','hub'), null,
array('subdirs'=>0,
'maxbytes'=>1000000,
'maxfiles'=>3,
'filetypes'=>array('image')
'maxfiles'=>3
));
$mform->setHelpButton('screenshots', array('screenshots', get_string('screenshots', 'hub'), 'hub'));
$mform->addHelpButton('screenshots', 'screenshots', 'hub');

$this->add_action_buttons(false, $buttonlabel);
}
Expand Down
15 changes: 15 additions & 0 deletions lang/en/hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$string['allowglobalsearch'] = 'Publish this hub and allow global search of all courses';
$string['allowpublicsearch'] = 'Publish this hub so people can join it';
$string['audience'] = 'Audience';
$string['audience_help'] = '';
$string['audienceeducators'] = 'Educators';
$string['audiencestudents'] = 'Students';
$string['audienceadmins'] = 'Administators';
Expand All @@ -45,20 +46,27 @@
$string['contactphone'] = 'Phone';
$string['contactphone_help'] = 'Phone numbers are displayed to the Hub administrator only. There are not communicated on the hub list or anywhere else.';
$string['contributornames'] = 'Contributor names';
$string['contributornames_help'] = 'Contributors are people that contribuated to create this course.';
$string['coursemap'] = 'Course map';
$string['coursename'] = 'Name';
$string['courseprivate'] = 'Private';
$string['coursepublic'] = 'Public';
$string['coursepublished'] = 'Course published';
$string['courseshortname'] = 'Shortname';
$string['courseshortname_help'] = 'Enter any shortname for your course. It is not an identifier (i.e many courses can have a same shortname in a search result.)';
$string['coursesnumber'] = 'Number of courses ({$a})';
$string['courseurl'] = 'Course URL';
$string['courseurl_help'] = 'Enter your course URL. By default it is the URL of your course. This url is displayed as a link in a search result.';
$string['creatorname'] = 'Creator name';
$string['creatorname_help'] = 'The creator is the course creator.';
$string['creatornotes'] = 'Creator notes';
$string['creatornotes_help'] = 'Creator notes are a guide for teacher on how to use the course.';
$string['demourl'] = 'Demo URL';
$string['demourl_help'] = 'Enter the demo URL of your course. By default it is the URL of your course. The demo url is displayed as a link in a search result.';
$string['description'] = 'Description';
$string['downloadable'] = 'Downloadable';
$string['educationallevel'] = 'Educational level';
$string['educationallevel_help'] = '';
$string['edulevelassociation'] = 'Association';
$string['edulevelcorporate'] = 'Corporate';
$string['edulevelgovernment'] = 'Government';
Expand All @@ -78,6 +86,8 @@
$string['imageurl_help'] = 'This image will be displayed on the hub. This image must be available from the hub at any moment. The image should have a maximum size of {$a->width} X {$a->height}';
$string['information'] = 'Information';
$string['language'] = 'Language';
$string['licence'] = 'Licence';
$string['licence_help'] = 'Select the licence you want to distribuate your course under.';
$string['logourl'] = 'Logo URL';
$string['modulenumberaverage'] = 'Average number of course modules ({$a})';
$string['moodleorg'] = 'Moodle.org';
Expand Down Expand Up @@ -106,6 +116,7 @@
$string['publichub'] = 'Public hub';
$string['publishcourseon'] = 'Publish on {$a}';
$string['publishername'] = 'Publisher';
$string['publishername_help'] = 'The publisher is the person publishing the course. Most of the time it should be you, except if you do it on the behalf of someone else.';
$string['publishon'] = 'Publish on';
$string['publishonmoodleorg'] = 'Publish on Moodle.org';
$string['publishonspecifichub'] = 'Publish on a Hub';
Expand All @@ -123,6 +134,7 @@
$string['resourcesnumber'] = 'Number of resources ({$a})';
$string['roleassignmentsnumber'] = 'Number of role assignments ({$a})';
$string['screenshots'] = 'Screenshots';
$string['screenshots_help'] = 'Screenshots will displayed during search results.';
$string['search'] = 'Search';
$string['selecthub'] = 'Select hub';
$string['sendfollowinginfo'] = 'Send the following information:';
Expand All @@ -142,12 +154,15 @@
$string['siteregconfcomment'] = 'Your site needs a final confirmation on {$a} (in order to avoid spam on {$a})';
$string['siteregistrationupdated'] = 'Site registration updated';
$string['siteurl'] = 'Site URL';
$string['subject'] = 'Subject';
$string['subject_help'] = 'The main course subject.';
$string['specifichub'] = 'Specific hub';
$string['specifichubpublicationdetail'] = 'You can publish on another hub.';
$string['specifichubregistrationdetail'] = 'You can register to other hub.';
$string['statistics'] = 'Statistics privacy';
$string['subject'] = 'Subject';
$string['tags'] = 'Tags';
$string['tags_help'] = 'Your course can be searched against these tag words. Separate your tag words with a comma. Example: math, algebric, geometry';
$string['trustme'] = 'Trust';
$string['unlistedurl'] = 'Unlisted hub URL';
$string['unprioritise'] = 'Unprioritise';
Expand Down

0 comments on commit 63c9d71

Please sign in to comment.