troodle-expcontent/mod_form.php
Kumi 3247092e59
feat: add intro fields to exp360 module
Added 'intro' and 'introformat' fields to the exp360 module for enhanced activity descriptions. Updated database schema and upgrade script to accommodate new fields. Modified add and update instance functions and the form to manage intro fields. Bumped module version to 2024070503.
2024-07-05 11:38:10 +02:00

29 lines
966 B
PHP

<?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();
}
}