$string['allunsubscribe'] = 'Unsubscribe from all forums';
$string['alreadyfirstpost'] = 'This is already the first post in the discussion';
$string['anyfile'] = 'Any file';
-$string['areaintro'] = 'Forum introduction';
$string['attachment'] = 'Attachment';
$string['attachments'] = 'Attachments';
$string['attachmentnopost'] = 'You cannot export attachments without a post id';
$string['allowratings'] = 'Allow entries to be rated?';
$string['answer'] = 'Answer';
$string['approve'] = 'Approve';
-$string['areaintro'] = 'Glossary introduction';
$string['areyousuredelete'] = 'Are you sure you want to delete this entry?';
$string['areyousuredeletecomment'] = 'Are you sure you want to delete this comment?';
$string['areyousureexport'] = 'Are you sure you want to export this entry to';
$string['allowtypeexternal'] = 'Enable external package type';
$string['allowtypeimsrepository'] = 'Enable IMS package type';
$string['allowtypelocalsync'] = 'Enable downloaded package type';
-$string['areaintro'] = 'Introduction files';
$string['areacontent'] = 'Content files';
$string['areapackage'] = 'Package file';
$string['asset'] = 'Asset';
if (function_exists($fileinfofunction)) {
$areas = $fileinfofunction($course, $cm, $context);
} else {
+ $areas = array();
+ }
+ if (!isset($areas[$modname.'_intro'])
+ and plugin_supports('mod', $modname, FEATURE_MOD_INTRO, true)
+ and has_capability('moodle/course:managefiles', $context)) {
+ $areas[$modname.'_intro'] = get_string('moduleintro');
+ }
+ if (empty($areas)) {
return null;
}
+
if (is_null($filearea) or is_null($itemid)) {
return new file_info_module($this, $course, $cm, $context, $areas);
*/
function data_get_file_areas($course, $cm, $context) {
$areas = array();
- if (has_capability('moodle/course:managefiles', $context)) {
- $areas['data_intro'] = get_string('areaintro', 'data');
- }
return $areas;
}
function data_preprocessing(&$default_values){
if (empty($default_values['scale'])){
$default_values['assessed'] = 0;
- }
+ }
}
}
//-------------------------------------------------------------------------------
$mform->addElement('header', 'general', get_string('general', 'form'));
-
+
$mform->addElement('text', 'name', get_string('name', 'feedback'), array('size'=>'64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
//-------------------------------------------------------------------------------
$mform->addElement('header', 'timinghdr', get_string('timing', 'form'));
-
+
$enableopengroup = array();
$enableopengroup[] =& $mform->createElement('checkbox', 'openenable', get_string('feedbackopen', 'feedback'));
$enableopengroup[] =& $mform->createElement('date_time_selector', 'timeopen', '');
$mform->addGroup($enableopengroup, 'enableopengroup', get_string('feedbackopen', 'feedback'), ' ', false);
$mform->setHelpButton('enableopengroup', array('timeopen', get_string('feedbackopens', 'feedback'), 'feedback'));
$mform->disabledIf('enableopengroup', 'openenable', 'notchecked');
-
+
$enableclosegroup = array();
$enableclosegroup[] =& $mform->createElement('checkbox', 'closeenable', get_string('feedbackclose', 'feedback'));
$enableclosegroup[] =& $mform->createElement('date_time_selector', 'timeclose', '');
$mform->addGroup($enableclosegroup, 'enableclosegroup', get_string('feedbackclose', 'feedback'), ' ', false);
$mform->setHelpButton('enableclosegroup', array('timeclose', get_string('feedbackcloses', 'feedback'), 'feedback'));
$mform->disabledIf('enableclosegroup', 'closeenable', 'notchecked');
-
+
//-------------------------------------------------------------------------------
$mform->addElement('header', 'feedbackhdr', get_string('feedback_options', 'feedback'));
-
+
$options=array();
$options[1] = get_string('anonymous', 'feedback');
$options[2] = get_string('non_anonymous', 'feedback');
$mform->addElement('select', 'anonymous', get_string('anonymous_edit', 'feedback'), $options);
-
+
$mform->addElement('selectyesno', 'publish_stats', get_string('show_analysepage_after_submit', 'feedback'));
$mform->addElement('selectyesno', 'email_notification', get_string('email_notification', 'feedback'));
$mform->setHelpButton('email_notification', array('emailnotification', get_string('email_notification', 'feedback'), 'feedback'));
-
+
// check if there is existing responses to this feedback
if (is_numeric($this->_instance) AND $this->_instance and $feedback = $DB->get_record("feedback", array("id"=>$this->_instance))) {
$completedFeedbackCount = feedback_get_completeds_group_count($feedback);
} else {
$completedFeedbackCount = false;
}
-
+
if($completedFeedbackCount) {
$multiple_submit_value = $feedback->multiple_submit ? get_string('yes') : get_string('no');
$mform->addElement('text', 'multiple_submit_static', get_string('multiple_submit', 'feedback'), array('size'=>'4','disabled'=>'disabled', 'value'=>$multiple_submit_value));
}
$mform->addElement('selectyesno', 'autonumbering', get_string('autonumbering', 'feedback'));
$mform->setHelpButton('autonumbering', array('autonumbering', get_string('autonumbering', 'feedback'), 'feedback'));
-
+
//-------------------------------------------------------------------------------
$mform->addElement('header', 'aftersubmithdr', get_string('after_submit', 'feedback'));
-
+
$mform->addElement('text', 'site_after_submit', get_string('site_after_submit', 'feedback'), array('size'=>'64','maxlength'=>'255'));
$mform->setType('site_after_submit', PARAM_TEXT);
*/
function forum_get_file_areas($course, $cm, $context) {
$areas = array();
- if (has_capability('moodle/course:managefiles', $context)) {
- $areas['forum_intro'] = get_string('areaintro', 'forum');
- }
return $areas;
}
*/
function glossary_get_file_areas($course, $cm, $context) {
$areas = array();
- if (has_capability('moodle/course:managefiles', $context)) {
- $areas['glossary_intro'] = get_string('areaintro', 'glossary');
- }
return $areas;
}
function data_preprocessing(&$default_values){
if (empty($default_values['scale'])){
$default_values['assessed'] = 0;
- }
+ }
if (empty($default_values['assessed'])){
$default_values['userating'] = 0;
require_once ($CFG->dirroot.'/mod/hotpot/lib.php');
$HOTPOT_TEXTSOURCE = array(
- HOTPOT_TEXTSOURCE_QUIZ => get_string('textsourcequiz', 'hotpot'),
+ HOTPOT_TEXTSOURCE_QUIZ => get_string('textsourcequiz', 'hotpot'),
HOTPOT_TEXTSOURCE_FILENAME => get_string('textsourcefilename', 'hotpot'),
HOTPOT_TEXTSOURCE_FILEPATH => get_string('textsourcefilepath', 'hotpot'),
HOTPOT_TEXTSOURCE_SPECIFIC => get_string('textsourcespecific', 'hotpot')
/**
* Settings form for the quiz module.
- *
+ *
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package quiz
*/
function scorm_get_file_areas($course, $cm, $context) {
$areas = array();
if (has_capability('moodle/course:managefiles', $context)) {
- $areas['scorm_intro'] = get_string('areaintro', 'scorm');
$areas['scorm_content'] = get_string('areacontent', 'scorm');
$areas['scorm_package'] = get_string('areapackage', 'scorm');
}
$mform->addElement('select', 'grademethod', get_string('grademethod', 'scorm'), scorm_get_grade_method_array());
$mform->setHelpButton('grademethod', array('grademethod', get_string('grademethod', 'scorm'),'scorm'));
$mform->setDefault('grademethod', $cfg_scorm->grademethod);
-
+
// Maximum Grade
for ($i=0; $i<=100; $i++) {
$grades[$i] = "$i";
$mform->addElement('select', 'maxattempt', get_string('maximumattempts', 'scorm'), scorm_get_attempts_array());
$mform->setHelpButton('maxattempt', array('maxattempt',get_string('maximumattempts', 'scorm'), 'scorm'));
$mform->setDefault('maxattempt', $cfg_scorm->maxattempts);
-
+
// Display attempt status
$mform->addElement('selectyesno', 'displayattemptstatus', get_string('displayattemptstatus', 'scorm'));
$mform->setHelpButton('displayattemptstatus', array('displayattemptstatus',get_string('displayattemptstatus', 'scorm'), 'scorm'));
$mform->setDefault('displayattemptstatus', $cfg_scorm->displayattemptstatus);
-
+
// Display course structure
$mform->addElement('selectyesno', 'displaycoursestructure', get_string('displaycoursestructure', 'scorm'));
$mform->setHelpButton('displaycoursestructure', array('displaycoursestructure',get_string('displaycoursestructure', 'scorm'), 'scorm'));
$mform->setDefault('displaycoursestructure', $cfg_scorm->displaycoursestructure);
-
+
// Force completed
$mform->addElement('selectyesno', 'forcecompleted', get_string('forcecompleted', 'scorm'));
$mform->setHelpButton('forcecompleted', array('forcecompleted',get_string('forcecompleted', 'scorm'), 'scorm'));
$mform->setHelpButton('forcenewattempt', array('forcenewattempt',get_string('forcenewattempt', 'scorm'), 'scorm'));
$mform->setDefault('forcenewattempt', $cfg_scorm->forcenewattempt);
$mform->setAdvanced('forcenewattempt');
-
+
// Last attempt lock - lock the enter button after the last available attempt has been made
$mform->addElement('selectyesno', 'lastattemptlock', get_string('lastattemptlock', 'scorm'));
$mform->setHelpButton('lastattemptlock', array('lastattemptlock',get_string('lastattemptlock', 'scorm'), 'scorm'));
$mform->setDefault('lastattemptlock', $cfg_scorm->lastattemptlock);
$mform->setAdvanced('lastattemptlock');
-
+
// What Grade
$mform->addElement('select', 'whatgrade', get_string('whatgrade', 'scorm'), scorm_get_what_grade_array());
$mform->disabledIf('whatgrade', 'maxattempt','eq',1);
$mform->setDefault('enddisabled', 1);
$mform->disabledIf('dateendgrp', 'enddisabled', 'checked');
*/
-
+
// Stage Size
$mform->addElement('static', '', '' ,'<hr />');
$mform->addElement('static', 'stagesize', get_string('stagesize','scorm'));