本文整理匯總了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();
}