troodle-expcontent/mod_form.php

30 lines
966 B
PHP
Raw Permalink Normal View History

<?php
require_once("$CFG->dirroot/course/moodleform_mod.php");
class mod_exp360_mod_form extends moodleform_mod
{
public function definition()
{
$mform = $this->_form;
$mform->addElement('header', 'general', get_string('general', 'form'));
$mform->addElement('text', 'name', get_string('exp360name', 'exp360'), array('size' => '64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', null, 'maxlength', 255, 'client');
// Add the standard intro elements.
$this->standard_intro_elements();
$mform->addElement('text', 'content_id', get_string('contentid', 'exp360'), array('size' => '64'));
$mform->setType('content_id', PARAM_TEXT);
$mform->addRule('content_id', null, 'required', null, 'client');
$this->standard_coursemodule_elements();
$this->add_action_buttons();
}
}