-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.html
66 lines (58 loc) · 2.54 KB
/
mod.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
newmodulenewmodule<?php // $Id: mod.html,v 1.5 2006/10/07 12:28:57 gustav_delius Exp $
/**
* This page defines the form to create or edit an instance of this module
* It is used from /course/mod.php. The whole instance is available as $form.
*
* @author
* @version $Id: mod.html,v 1.5 2006/10/07 12:28:57 gustav_delius Exp $
* @package newmodule
**/
/// First we check that form variables have been initialised
if (!isset($form->name)) {
$form->name = '';
}
if (!isset($form->description)) {
$form->description = "";
}
if (!isset($form->grade)) {
$form->grade = 100; //100 es el valor predeterminado que tendrá.
}
// More similar blocks go here...
?>
<form name="form" method="post" action="mod.php">
<center>
<table cellpadding="5">
<tr valign="top">
<td align="right"><b><?php print_string("name", "ejemplo") ?>:</b></td>
<td>
<input type="text" name="name" size=60 value="<?php p($form->name) ?>">
</td>
</tr>
<tr valing="top">
<td align="right"><b><?php print_string("description", "ejemplo") ?>:</b></td>
</tr>
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=sesskey value="<?php p($form->sesskey) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<!-- More rows go in here... -->
<!-- The following line for Moodle 1.5 prints the visibility setting form element -->
<?php print_visible_setting($form); ?>
<!-- and if your module uses groups you would also have -->
<?php print_groupmode_setting($form); ?>
</table>
<!-- These hidden variables are always the same -->
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name=section value="<?php p($form->section) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" />
</center>
</form>