Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add option that allows students to resubmit after being graded

  • Loading branch information...
commit 085bd98e7e9435c22354000d05d8f97b50beccd6 1 parent 0431bd7
moodler authored
View
1  lang/en/assignment.php
@@ -2,6 +2,7 @@
// assignment.php - created with Moodle 1.0.5 dev (2002092300)
+$string['allowresubmit'] = "Allow resubmitting";
$string['assignmentdetails'] = "Assignment details";
$string['assignmentname'] = "Assignment name";
$string['assignmenttype'] = "Assignment type";
View
9 lang/en/help/assignment/resubmit.html
@@ -0,0 +1,9 @@
+<P ALIGN=CENTER><B>Resubmitting assignments</B></P>
+
+<P>By default, students cannot resubmit assignments once the teacher has graded them</P>
+
+<P>If you turn this option on, then students will be allowed to resubmit assignments
+ after they have been graded (for you to re-grade). This may be useful if the
+ teacher wants to encourage students to do better work in an iterative process.</P>
+
+<P>Obviously, this option is not relevant for offline assignments.</P>
View
3  mod/assignment/db/mysql.php
@@ -85,6 +85,9 @@ function assignment_upgrade($oldversion) {
if ($oldversion < 2002110302) {
execute_sql(" UPDATE `assignment` SET `type` = '1'");
}
+ if ($oldversion < 2002111500) {
+ execute_sql(" ALTER TABLE `assignment` ADD `resubmit` TINYINT(2) UNSIGNED DEFAULT '0' NOT NULL AFTER `format` ");
+ }
return true;
}
View
1  mod/assignment/db/mysql.sql
@@ -8,6 +8,7 @@ CREATE TABLE `assignment` (
`name` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`format` tinyint(2) unsigned NOT NULL default '0',
+ `resubmit` tinyint(2) unsigned NOT NULL default '0',
`type` int(10) unsigned NOT NULL default '1',
`maxbytes` int(10) unsigned NOT NULL default '100000',
`timedue` int(10) unsigned NOT NULL default '0',
View
10 mod/assignment/mod.html
@@ -50,6 +50,16 @@
?>
</td>
</tr>
+<tr>
+ <td align=right><P><B><? print_string("allowresubmit", "assignment") ?>:</B></P></TD>
+ <td>
+ <?PHP
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "resubmit", $form->resubmit, "");
+ helpbutton("resubmit", get_string("allowresubmit", "assignment"), "assignment");
+ ?>
+ </td>
+</tr>
<tr valign=top>
<td align=right><P><B><? print_string("maximumgrade") ?>:</B></P></TD>
<td>
View
2  mod/assignment/upload.php
@@ -32,7 +32,7 @@
"", "", true);
if ($submission = assignment_get_submission($assignment, $USER)) {
- if ($submission->grade) {
+ if ($submission->grade and !$assignment->resubmit) {
error("You've already been graded - there's no point in uploading anything");
}
}
View
2  mod/assignment/version.php
@@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2002110602;
+$module->version = 2002111500;
$module->cron = 60;
?>
View
3  mod/assignment/view.php
@@ -100,7 +100,8 @@
if ($submission and $submission->timemarked) {
print_heading(get_string("submissionfeedback", "assignment").":", "CENTER");
assignment_print_feedback($course, $submission);
- } else {
+ }
+ if (!$submission->timemarked or $assignment->resubmit) {
if ($submission and $submission->timemodified) {
echo "<P ALIGN=CENTER>".get_string("overwritewarning", "assignment")."</P>";
}
Please sign in to comment.
Something went wrong with that request. Please try again.