本文整理汇总了PHP中moodleform_mod::standard_intro_elements方法的典型用法代码示例。如果您正苦于以下问题:PHP moodleform_mod::standard_intro_elements方法的具体用法?PHP moodleform_mod::standard_intro_elements怎么用?PHP moodleform_mod::standard_intro_elements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类moodleform_mod
的用法示例。
在下文中一共展示了moodleform_mod::standard_intro_elements方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: definition
function definition()
{
global $CFG, $COURSE, $DB;
$mform = $this->_form;
$pluginconfig = get_config('dialogue');
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('dialoguename', 'dialogue'), array('size' => '64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
moodleform_mod::standard_intro_elements();
$choices = get_max_upload_sizes($CFG->maxbytes, $COURSE->maxbytes, $pluginconfig->maxbytes);
$mform->addElement('select', 'maxbytes', get_string('maxattachmentsize', 'dialogue'), $choices);
$mform->addHelpButton('maxbytes', 'maxattachmentsize', 'dialogue');
$mform->setDefault('maxbytes', $pluginconfig->maxbytes);
$choices = range(0, $pluginconfig->maxattachments);
$choices[0] = get_string('uploadnotallowed');
$mform->addElement('select', 'maxattachments', get_string('maxattachments', 'dialogue'), $choices);
$mform->addHelpButton('maxattachments', 'maxattachments', 'dialogue');
$mform->setDefault('maxattachments', $pluginconfig->maxattachments);
$mform->addElement('checkbox', 'usecoursegroups', get_string('usecoursegroups', 'dialogue'));
$mform->addHelpButton('usecoursegroups', 'usecoursegroups', 'dialogue');
$mform->setDefault('usecoursegroups', 0);
$this->standard_grading_coursemodule_elements();
$this->standard_coursemodule_elements();
$this->add_action_buttons();
}