New field and option for assignments, preventlate, which prevents

students from submitting assignments late
This commit is contained in:
moodler 2005-04-18 04:11:15 +00:00
parent 245be804c7
commit 4b46c8039a
7 changed files with 13 additions and 1 deletions

View File

@ -41,6 +41,7 @@
fwrite ($bf,full_tag("DESCRIPTION",4,false,$assignment->description));
fwrite ($bf,full_tag("FORMAT",4,false,$assignment->format));
fwrite ($bf,full_tag("RESUBMIT",4,false,$assignment->resubmit));
fwrite ($bf,full_tag("PREVENTLATE",4,false,$assignment->preventlate));
fwrite ($bf,full_tag("EMAILTEACHERS",4,false,$assignment->emailteachers));
fwrite ($bf,full_tag("VAR1",4,false,$assignment->var1));
fwrite ($bf,full_tag("VAR2",4,false,$assignment->var2));

View File

@ -150,6 +150,10 @@ function assignment_upgrade($oldversion) {
table_column('assignment_submissions', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'comment');
}
if ($oldversion < 2005041800) { // Prevent late submissions? (default no)
table_column('assignment', '', 'preventlate', 'integer', '2', 'unsigned', '0', 'not null', 'resubmit');
}
/// These lines ALWAYS need to be here at the end of this file. Don't mess with them. :-)
include_once("$CFG->dirroot/mod/assignment/lib.php");

View File

@ -10,6 +10,7 @@ CREATE TABLE `prefix_assignment` (
`format` tinyint(4) unsigned NOT NULL default '0',
`assignmenttype` varchar(50) NOT NULL default '',
`resubmit` tinyint(2) unsigned NOT NULL default '0',
`preventlate` tinyint(2) unsigned NOT NULL default '0',
`emailteachers` tinyint(2) unsigned NOT NULL default '0',
`var1` int(10) default '0',
`var2` int(10) default '0',

View File

@ -148,6 +148,10 @@ function assignment_upgrade($oldversion) {
table_column('assignment_submissions', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'comment');
}
if ($oldversion < 2005041800) { // Prevent late submissions? (default no)
table_column('assignment', '', 'preventlate', 'integer', '2', 'unsigned', '0', 'not null', 'resubmit');
}
/// These lines ALWAYS need to be here at the end of this file. Don't mess with them. :-)
include_once("$CFG->dirroot/mod/assignment/lib.php");

View File

@ -10,6 +10,7 @@ CREATE TABLE prefix_assignment (
format integer NOT NULL default '0',
assignmenttype varchar(50) NOT NULL default '',
resubmit integer NOT NULL default '0',
preventlate integer NOT NULL default '0',
emailteachers integer NOT NULL default '0',
var1 integer default '0',
var2 integer default '0',

View File

@ -44,6 +44,7 @@
$assignment->description = backup_todb($info['MOD']['#']['DESCRIPTION']['0']['#']);
$assignment->format = backup_todb($info['MOD']['#']['FORMAT']['0']['#']);
$assignment->resubmit = backup_todb($info['MOD']['#']['RESUBMIT']['0']['#']);
$assignment->preventlate = backup_todb($info['MOD']['#']['PREVENTLATE']['0']['#']);
$assignment->emailteachers = backup_todb($info['MOD']['#']['EMAILTEACHERS']['0']['#']);
$assignment->var1 = backup_todb($info['MOD']['#']['VAR1']['0']['#']);
$assignment->var2 = backup_todb($info['MOD']['#']['VAR2']['0']['#']);

View File

@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
$module->version = 2005041700;
$module->version = 2005041800;
$module->requires = 2005031000; // Requires this Moodle version
$module->cron = 60;