publication MDL-19315 add publisher email field + some help icons + reorder some fields + change some default

This commit is contained in:
jerome mouneyrac
2010-05-19 05:30:34 +00:00
parent 60c3cf88e0
commit bde8d7717e
3 changed files with 31 additions and 11 deletions
+19 -6
View File
@@ -124,6 +124,7 @@ class course_publication_form extends moodleform {
$defaultsummary = $publishedcourse['description'];
$defaultlanguage = $publishedcourse['language'];
$defaultpublishername = $publishedcourse['publishername'];
$defaultpublisheremail = $publishedcourse['defaultpublisheremail'];
$defaultcontributornames = $publishedcourse['contributornames'];
$defaultcoverage = $publishedcourse['coverage'];
$defaultcreatorname = $publishedcourse['creatorname'];
@@ -148,12 +149,13 @@ class course_publication_form extends moodleform {
$defaultlanguage = $course->lang;
}
$defaultpublishername = $USER->firstname.' '.$USER->lastname;
$defaultpublisheremail = $USER->email;
$defaultcontributornames = '';
$defaultcoverage = '';
$defaultcreatorname = $USER->firstname.' '.$USER->lastname;
$defaultlicenceshortname = 'cc';
$defaultsubject = '';
$defaultaudience = AUDIENCE_EDUCATORS;
$defaultaudience = AUDIENCE_STUDENTS;
$defaulteducationallevel = EDULEVEL_TERTIARY;
$defaultcreatornotes = '';
}
@@ -166,6 +168,7 @@ class course_publication_form extends moodleform {
$mform->addRule('name', $strrequired, 'required', null, 'client');
$mform->setType('name', PARAM_TEXT);
$mform->setDefault('name', $defaultfullname);
$mform->addHelpButton('name', 'name', 'hub');
$mform->addElement('hidden', 'id', $this->_customdata['id']);
@@ -190,6 +193,7 @@ class course_publication_form extends moodleform {
$mform->addElement('hidden', 'courseurl', $CFG->wwwroot."/course/view.php?id=".$course->id);
$mform->addElement('static', 'courseurlstring', get_string('courseurl', 'hub'));
$mform->setDefault('courseurlstring', new moodle_url("/course/view.php?id=".$course->id));
$mform->addHelpButton('courseurlstring', 'courseurl', 'hub');
}
$mform->addElement('text', 'courseshortname',get_string('courseshortname', 'hub'));
@@ -200,11 +204,13 @@ class course_publication_form extends moodleform {
$mform->addRule('description', $strrequired, 'required', null, 'client');
$mform->setDefault('description', $defaultsummary);
$mform->setType('description', PARAM_TEXT);
$mform->addHelpButton('description', 'description', 'hub');
$languages = get_string_manager()->get_list_of_languages();
asort($languages, SORT_LOCALE_STRING);
$mform->addElement('select', 'language',get_string('language'), $languages);
$mform->setDefault('language', $defaultlanguage);
$mform->addHelpButton('language', 'language', 'hub');
$mform->addElement('text', 'publishername',get_string('publishername', 'hub'));
@@ -212,6 +218,17 @@ class course_publication_form extends moodleform {
$mform->addRule('publishername', $strrequired, 'required', null, 'client');
$mform->addHelpButton('publishername', 'publishername', 'hub');
$mform->addElement('text', 'publisheremail',get_string('publisheremail', 'hub'));
$mform->setDefault('publisheremail', $defaultpublisheremail);
$mform->addRule('publisheremail', $strrequired, 'required', null, 'client');
$mform->addHelpButton('publisheremail', 'publisheremail', 'hub');
$mform->addElement('text', 'creatorname', get_string('creatorname', 'hub'));
$mform->addRule('creatorname', $strrequired, 'required', null, 'client');
$mform->setType('creatorname', PARAM_TEXT);
$mform->setDefault('creatorname', $defaultcreatorname);
$mform->addHelpButton('creatorname', 'creatorname', 'hub');
$mform->addElement('text', 'contributornames', get_string('contributornames', 'hub'));
$mform->setDefault('contributornames', $defaultcontributornames);
$mform->addHelpButton('contributornames', 'contributornames', 'hub');
@@ -221,11 +238,7 @@ class course_publication_form extends moodleform {
$mform->setDefault('coverage', $defaultcoverage);
$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', $defaultcreatorname);
$mform->addHelpButton('creatorname', 'creatorname', 'hub');
require_once($CFG->dirroot."/lib/licenselib.php");
$licensemanager = new license_manager();
+2
View File
@@ -73,6 +73,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
$courseinfo->description = $fromform->description;
$courseinfo->language = $fromform->language;
$courseinfo->publishername = $fromform->publishername;
$courseinfo->publisheremail = $fromform->publisheremail;
$courseinfo->contributornames = $fromform->contributornames;
$courseinfo->coverage = $fromform->coverage;
$courseinfo->creatorname = $fromform->creatorname;
@@ -189,6 +190,7 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
/////// OUTPUT SECTION /////////////
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('publishcourseon', 'hub', !empty($hubname)?$hubname:$huburl), 3, 'main');
if (!empty($courseregisteredmsg)) {
echo $courseregisteredmsg;
}
+10 -5
View File
@@ -39,7 +39,7 @@ $string['audience'] = 'Audience';
$string['audience_help'] = '';
$string['audienceeducators'] = 'Educators';
$string['audiencestudents'] = 'Students';
$string['audienceadmins'] = 'Administators';
$string['audienceadmins'] = 'Moodle administrators';
$string['badurlformat'] = 'Bad URL format';
$string['cancel'] = 'Cancel';
$string['community'] = 'Community';
@@ -51,7 +51,7 @@ $string['contactemail'] = 'Contact email';
$string['contactname'] = 'Contact name';
$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'] = 'Other contributors';
$string['contributornames_help'] = 'Contributors are people that contributed to create this course.';
$string['coursemap'] = 'Course map';
$string['coursename'] = 'Name';
@@ -63,14 +63,15 @@ $string['courseshortname_help'] = 'Enter any shortname for your course. It is no
$string['coursesnumber'] = 'Number of courses ({$a})';
$string['courseunpublished'] = 'the course {$a->courseshortname} has been unpublished from {$a->hubname} successfully.';
$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['courseurl_help'] = 'It is the URL of your course. This url is displayed as a link in a search result.';
$string['creatorname'] = 'Creator';
$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['description_help'] = 'This description text will be showing in the course listing on the hub.';
$string['downloadable'] = 'Downloadable';
$string['downloadconfirmed'] = 'The backup has been saved into your personal area';
$string['educationallevel'] = 'Educational level';
@@ -94,6 +95,7 @@ $string['imageurl'] = 'Image url';
$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['language_help'] = 'The main language of this course.';
$string['licence'] = 'Licence';
$string['licence_help'] = 'Select the licence you want to distribuate your course under.';
$string['logourl'] = 'Logo URL';
@@ -106,6 +108,7 @@ By default, your information will be kept private, and will never be sold or pas
If you choose, you can allow your site name, country and URL to be added to the public list of Moodle Sites.
All new registrations are verified manually before they are added to the list, but once you are added you can update your registration (and your entry on the public list) at any time.';
$string['name'] = 'Name';
$string['name_help'] = 'This name will be showing in the course listing.';
$string['no'] = 'No';
$string['nohubselected'] = 'No hub selected';
$string['nosearch'] = 'Don\'t publish hub or courses';
@@ -126,8 +129,10 @@ $string['publichub'] = 'Public hub';
$string['publishcourse'] = 'Publish {$a}';
$string['publishcourseon'] = 'Publish on {$a}';
$string['publishedon'] = 'Published on';
$string['publisheremail'] = 'Publisher email';
$string['publisheremail_help'] = 'The publisher email address is used by hub administrator to alert the publisher to any change on the course publication as its activation.';
$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['publishername_help'] = 'The publisher is the unique person/organisation 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';