+<?PHP
+ if (empty($form->name)) {
+ $form->name = "";
+ }
+ if (empty($form->type)) {
+ $form->type = "";
+ }
+ if (empty($form->intro)) {
+ $form->intro = "";
+ }
+ if (empty($form->open)) {
+ $form->open = "";
+ }
+ if (empty($form->assessed)) {
+ $form->assessed = "";
+ }
+ if (empty($form->forcesubscribe)) {
+ $form->forcesubscribe = "";
+ }
+?>
<form name="form" method="post" action="<?=$ME ?>">
<table cellpadding=5>
<tr>
+<?PHP
+ if (empty($form->name)) {
+ $form->name = "";
+ }
+ if (empty($form->intro)) {
+ $form->intro = "";
+ }
+ if (empty($form->days)) {
+ $form->days = "14";
+ }
+?>
+
<form name="form" method="post" action="<?=$ME ?>">
<table cellpadding=5>
<tr valign=top>
$options[$days] = get_string("numweeks", "", $i);
}
$options[365] = get_string("numweeks", "", 52);
- if ($form->days == "") {
- $form->days == "14";
- }
choose_from_menu($options, "days", "$form->days");
?>
</TD>
execute_sql("ALTER TABLE `quiz_attempts` CHANGE `user` `userid` INT(10) UNSIGNED DEFAULT '0' NOT NULL ");
}
+ // prefixes required from here on
+
+ if ($oldversion < 2003010100) {
+ execute_sql(" ALTER TABLE {$CFG->prefix}quiz ADD review TINYINT(4) UNSIGNED DEFAULT '0' NOT NULL AFTER `grademethod` ");
+ }
+
return true;
}
`feedback` tinyint(4) NOT NULL default '0',
`correctanswers` tinyint(4) NOT NULL default '1',
`grademethod` tinyint(4) NOT NULL default '1',
+ `review` tinyint(4) NOT NULL default '0',
`questions` text NOT NULL,
`sumgrades` int(10) NOT NULL default '0',
`grade` int(10) NOT NULL default '0',
global $CFG;
+ if ($oldversion < 2003010100) {
+ execute_sql(" ALTER TABLE {$CFG->prefix}quiz ADD review integer DEFAULT '0' NOT NULL AFTER `grademethod` ");
+ }
+
return true;
}
feedback integer NOT NULL default '0',
correctanswers integer NOT NULL default '1',
grademethod integer NOT NULL default '1',
+ review integer NOT NULL default '0',
questions text NOT NULL default '',
sumgrades integer NOT NULL default '0',
grade integer NOT NULL default '0',
<!-- 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. -->
-<? include_once("$CFG->dirroot/mod/quiz/lib.php") ?>
+<?PHP
+ include_once("$CFG->dirroot/mod/quiz/lib.php");
+
+ if (empty($form->name)) {
+ $form->name = "";
+ }
+ if (empty($form->intro)) {
+ $form->intro = "";
+ }
+ if (empty($form->timeopen)) {
+ $form->timeopen = "";
+ }
+ if (empty($form->timeclose)) {
+ $form->timeclose = "";
+ }
+ if (empty($form->attempts)) {
+ $form->attempts = "";
+ }
+ if (empty($form->grademethod)) {
+ $form->grademethod = "";
+ }
+ if (empty($form->feedback)) {
+ $form->feedback = "";
+ }
+ if (empty($form->correctanswers)) {
+ $form->correctanswers = "";
+ }
+ if (empty($form->grade)) {
+ $form->grade = "";
+ }
+ if (empty($form->questions)) {
+ $form->questions = "";
+ }
+?>
+
+
<FORM name="form" method="post" action="<?=$CFG->wwwroot?>/mod/quiz/edit.php">
<CENTER>
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2002122300; // The (date) version of this module
+$module->version = 2003010100; // The (date) version of this module
$module->cron = 0; // How often should cron check this module (seconds)?
?>
+<?PHP
+ if (empty($form->name)) {
+ $form->name = "";
+ }
+ if (empty($form->type)) {
+ $form->type = "";
+ }
+ if (empty($form->summary)) {
+ $form->summary = "";
+ }
+ if (empty($form->reference)) {
+ $form->reference = "";
+ }
+ if (empty($form->alltext)) {
+ $form->alltext = "";
+ }
+?>
+
+
<form name="form" method="post" action="<?=$CFG->wwwroot?>/mod/resource/details.php">
<table cellpadding=5>
<tr valign=top>
+<?PHP
+ if (empty($form->name)) {
+ $form->name = "";
+ }
+ if (empty($form->template)) {
+ $form->template = "";
+ }
+ if (empty($form->intro)) {
+ $form->intro = "";
+ }
+?>
+
<form name="form" method="post" action="<?=$CFG->wwwroot ?>/mod/survey/details.php">
<table cellpadding=5>
<tr valign=top>