diff --git a/lang/en_utf8/assignment.php b/lang/en_utf8/assignment.php
index 39a0889..8432839 100644
--- a/lang/en_utf8/assignment.php
+++ b/lang/en_utf8/assignment.php
@@ -109,6 +109,16 @@ $string['reviewed'] = 'Reviewed';
$string['saveallfeedback'] = 'Save all my feedback';
$string['sendformarking'] = 'Send for marking';
$string['showrecentsubmissions'] = 'Show recent submissions';
+$string['studentdeclaration'] = 'Student declaration';
+$string['studentdeclarationconfirm'] = 'Tick box to confirm:';
+$string['studentdeclarationrequired'] = 'Require confirmation of student declaration';
+$string['studentdeclarationtext'] = '
I, $a, declare that:
- I am aware of the University\'s disciplinary regulations concerning conduct in examinations pertaining to submission of assignments and long essays and, in particular, of the regulations on plagiarism.
+- The work I am submitting is entirely my own work except where otherwise indicated.
+- It has not been submitted, either wholly or substantially, for another course of this Department or University, or for a course at any other institution.
+- I have clearly signalled the presence of quoted or paraphrased material and referenced all sources.
+- I have acknowledged appropriately any assistance I have received in addition to that provided by my tutor.
+- I have not sought assistance from any professional agency.
+- I agree to make available any electronic version of the work on request from the Chair of Examiners should this be required in order to confirm my word count or to check for plagiarism.
';
$string['submission'] = 'Submission';
$string['submissiondraft'] = 'Submission draft';
$string['submissionfeedback'] = 'Submission feedback';
diff --git a/mod/assignment/db/upgrade.php b/mod/assignment/db/upgrade.php
index c417885..7ed21b9 100644
--- a/mod/assignment/db/upgrade.php
+++ b/mod/assignment/db/upgrade.php
@@ -59,6 +59,27 @@ function xmldb_assignment_upgrade($oldversion=0) {
$db->debug = true;
}
+ if ($result && $oldversion < 2007101552) {
+ // Add fields for student declaration on assiginment submissions
+
+ /// Define field studentdeclarationrequired to be added to assignment
+ $table = new XMLDBTable('assignment');
+ $field = new XMLDBField('studentdeclarationrequired');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'preventlate');
+
+ /// Launch add field studentdeclarationrequired
+ $result = $result && add_field($table, $field);
+
+
+ /// Define field timeagreedeclaration to be added to assignment_submissions
+ $table = new XMLDBTable('assignment_submissions');
+ $field = new XMLDBField('timeagreedeclaration');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null, null, '0', 'timemodified');
+
+ /// Launch add field timeagreedeclaration
+ $result = $result && add_field($table, $field);
+ }
+
return $result;
}
diff --git a/mod/assignment/mod_form.php b/mod/assignment/mod_form.php
index c3bfe25..a056b4f 100644
--- a/mod/assignment/mod_form.php
+++ b/mod/assignment/mod_form.php
@@ -57,6 +57,9 @@ class mod_assignment_mod_form extends moodleform_mod {
$mform->addElement('select', 'preventlate', get_string('preventlate', 'assignment'), $ynoptions);
$mform->setDefault('preventlate', 0);
+ $mform->addElement('select', 'studentdeclarationrequired', get_string('studentdeclarationrequired', 'assignment'), $ynoptions);
+ $mform->setDefault('studentdeclarationrequired', 0);
+
$mform->addElement('header', 'typedesc', get_string('type'.$type,'assignment'));
$assignmentinstance->setup_elements($mform);
@@ -72,4 +75,4 @@ class mod_assignment_mod_form extends moodleform_mod {
}
-?>
\ No newline at end of file
+?>
diff --git a/mod/assignment/type/upload/assignment.class.php b/mod/assignment/type/upload/assignment.class.php
index fd07957..8bf859f 100644
--- a/mod/assignment/type/upload/assignment.class.php
+++ b/mod/assignment/type/upload/assignment.class.php
@@ -209,6 +209,16 @@ class assignment_upload extends assignment_base {
print_heading(get_string('submitformarking','assignment'), '', 3);
echo '