-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod_form.php
More file actions
44 lines (35 loc) · 1.44 KB
/
mod_form.php
File metadata and controls
44 lines (35 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
defined('MOODLE_INTERNAL') || die();
/**
* mod_vdocipher
*
* This Moodle activity plugin allows embedding secure VdoCipher videos by providing only the video ID.
*
* @package mod_vdocipher
* @copyright 2025 Özcan Oğuz <https://github.com/ooguz>
* @license http://www.gnu.org/copyleft/agpl.html GNU AGPL v3 or later
*/
require_once $CFG->dirroot . '/course/moodleform_mod.php';
class mod_vdocipher_mod_form extends moodleform_mod
{
public function definition()
{
$mform = $this->_form;
// General settings
$mform->addElement('header', 'general', get_string('general', 'form'));
// Activity name
$mform->addElement('text', 'name', get_string('activityname', 'mod_vdocipher'), array('size' => '64'));
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required', null, 'client');
// VdoCipher Video ID
$mform->addElement('text', 'vdocipherid', get_string('vdocipherid', 'mod_vdocipher'), array('size' => '20'));
$mform->setType('vdocipherid', PARAM_ALPHANUMEXT);
$mform->addRule('vdocipherid', null, 'required', null, 'client');
// Info about the VdoCipher filter
$mform->addElement('static', 'info', '', get_string('filterinfo', 'mod_vdocipher'));
// Standard course module settings
$this->standard_coursemodule_elements();
// Add submit button
$this->add_action_buttons();
}
}