-
Notifications
You must be signed in to change notification settings - Fork 2
/
config_instance.html
40 lines (32 loc) · 1.01 KB
/
config_instance.html
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
<?php
/**
* Instance config file for the Assessment Manager.
*
* @copyright © 2009-2010 University of London Computer Centre
* @author http://www.ulcc.ac.uk, http://moodle.ulcc.ac.uk
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package AssMgr
* @version 1.0
*/
global $CFG;
// include the moodle forms lib
require_once("{$CFG->dirroot}/lib/formslib.php");
if(!class_exists('block_edit_form')) {
// create the base class that doens't exist in version 1.x
class block_edit_form extends moodleform {
function definition() {
$mform =& $this->_form;
$this->specific_definition($mform);
$this->add_action_buttons();
}
}
}
// include the moodle 2.x form for editing this block instance
require_once("{$CFG->dirroot}/blocks/assmgr/edit_form.php");
// instantiate the form
$mform = new block_assmgr_edit_form();
// load the existing config data into the form
$mform->set_data($this->config);
// render the form
$mform->display();
?>