Index: lang/en_utf8/assignment.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/assignment.php,v
retrieving revision 1.14.2.11
diff -u -r1.14.2.11 assignment.php
--- lang/en_utf8/assignment.php	27 Feb 2008 05:05:01 -0000	1.14.2.11
+++ lang/en_utf8/assignment.php	23 May 2008 12:48:58 -0000
@@ -29,7 +29,9 @@
 $string['configitemstocount'] = 'Nature of items to be counted for student submissions in online assignments.';
 $string['configmaxbytes'] = 'Default maximum assignment size for all assignments on the site (subject to course limits and other local settings)';
 $string['configshowrecentsubmissions'] = 'Everyone can see notifications of submissions in recent activity reports.';
+$string['configuploadtext'] = 'If text is entered here, the user will be required to confirm their agreement to the statement before uploading. Use for site wide uploaded assignment policy.';
 $string['confirmdeletefile'] = 'Are you absolutely sure you want to delete this file?<br /><strong>$a</strong>';
+$string['confirmerror'] = 'You must agree to the statement on the upload page before uploading';
 $string['deleteallsubmissions'] = 'Delete all submissions';
 $string['deletefilefailed'] = 'Deleting of file failed.';
 $string['description'] = 'Description';
@@ -104,6 +106,7 @@
 $string['pagesize'] = 'Submissions shown per page';
 $string['preventlate'] = 'Prevent late submissions';
 $string['quickgrade'] = 'Allow quick grading';
+$string['readconfirm'] = 'I confirm that I have read and agree with the statement above';
 $string['responsefiles'] = 'Response files';
 $string['reviewed'] = 'Reviewed';
 $string['saveallfeedback'] = 'Save all my feedback';
@@ -135,6 +138,7 @@
 $string['uploadnofilefound'] = 'No file was found - are you sure you selected one to upload?';
 $string['uploadnotregistered'] = '\'$a\' was uploaded OK but submission did not register!';
 $string['uploadsuccess'] = 'Uploaded \'$a\' successfully';
+$string['uploadtext'] = 'Must agree before upload';
 $string['viewfeedback'] = 'View assignment grades and feedback';
 $string['viewsubmissions'] = 'View $a submitted assignments';
 $string['yoursubmission'] = 'Your submission';
Index: mod/assignment/settings.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/assignment/settings.php,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 settings.php
--- mod/assignment/settings.php	24 Jan 2008 20:29:36 -0000	1.1.2.3
+++ mod/assignment/settings.php	23 May 2008 12:48:58 -0000
@@ -13,4 +13,9 @@
 $settings->add(new admin_setting_configcheckbox('assignment_showrecentsubmissions', get_string('showrecentsubmissions', 'assignment'),
                    get_string('configshowrecentsubmissions', 'assignment'), 1));
 
+$settings->add(new admin_setting_configtextarea('assignment_uploadtext', 
+    get_string('uploadtext','assignment'),
+    get_string('configuploadtext','assignment'),
+    '' ));
+
 ?>
Index: mod/assignment/type/upload/assignment.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/assignment/type/upload/assignment.class.php,v
retrieving revision 1.32.2.13
diff -u -r1.32.2.13 assignment.class.php
--- mod/assignment/type/upload/assignment.class.php	8 Apr 2008 03:02:49 -0000	1.32.2.13
+++ mod/assignment/type/upload/assignment.class.php	23 May 2008 12:48:58 -0000
@@ -168,6 +168,15 @@
             echo '<div style="text-align:center">';
             echo '<form enctype="multipart/form-data" method="post" action="upload.php">';
             echo '<fieldset class="invisiblefieldset">';
+
+            // check if there is a text to be confirmed 
+            if (!empty($CFG->assignment_uploadtext)) {
+                print_box(format_text($CFG->assignment_uploadtext),'generalbox highlight');
+                $strreadconfirm = get_string('readconfirm','assignment');
+                echo  "<p><strong>$strreadconfirm</strong>:";
+                echo '<input type="checkbox" name="confirmuploadtext" /></p>';
+            }
+
             echo "<p>$struploadafile ($strmaxsize)</p>";
             echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
             echo '<input type="hidden" name="action" value="uploadfile" />';
@@ -568,9 +577,19 @@
 
         $mode   = optional_param('mode', '', PARAM_ALPHA);
         $offset = optional_param('offset', 0, PARAM_INT);
+        $confirmuploadtext = optional_param('confirmuploadtext', 0, PARAM_BOOL);
 
         $returnurl = 'view.php?id='.$this->cm->id;
 
+        // the confirm has to be checked if there was uploadtext
+        if (!empty($CFG->assignment_uploadtext) and !$confirmuploadtext) {
+            $this->view_header(get_string('upload'));
+            notify(get_string('confirmerror','assignment'));
+            print_continue($returnurl);
+            $this->view_footer(); 
+            die;
+        }
+
         $filecount = $this->count_user_files($USER->id);
         $submission = $this->get_submission($USER->id);
 
Index: mod/assignment/type/uploadsingle/assignment.class.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/assignment/type/uploadsingle/assignment.class.php,v
retrieving revision 1.33.2.5
diff -u -r1.33.2.5 assignment.class.php
--- mod/assignment/type/uploadsingle/assignment.class.php	8 Apr 2008 03:02:49 -0000	1.33.2.5
+++ mod/assignment/type/uploadsingle/assignment.class.php	23 May 2008 12:48:58 -0000
@@ -84,6 +84,15 @@
         echo '<form enctype="multipart/form-data" method="post" '.
              "action=\"$CFG->wwwroot/mod/assignment/upload.php\">";
         echo '<fieldset class="invisiblefieldset">';
+
+        // check if there is a text to be confirmed 
+        if (!empty($CFG->assignment_uploadtext)) {
+            print_box(format_text($CFG->assignment_uploadtext),'generalbox highlight');
+            $strreadconfirm = get_string('readconfirm','assignment');
+            echo  "<p><strong>$strreadconfirm</strong>:";
+            echo '<input type="checkbox" name="confirmuploadtext" /></p>';
+         }
+
         echo "<p>$struploadafile ($strmaxsize)</p>";
         echo '<input type="hidden" name="id" value="'.$this->cm->id.'" />';
         require_once($CFG->libdir.'/uploadlib.php');
@@ -103,6 +112,17 @@
 
         $this->view_header(get_string('upload'));
 
+ 
+        // the confirm has to be checked if there was uploadtext
+        $confirmuploadtext = optional_param('confirmuploadtext', 0, PARAM_BOOL);
+        if (!empty($CFG->assignment_uploadtext) and !$confirmuploadtext) {
+            notify(get_string('confirmerror','assignment'));
+            $returnurl = 'view.php?id='.$this->cm->id;
+            print_continue($returnurl);
+            $this->view_footer(); 
+            die;
+        }
+
         $filecount = $this->count_user_files($USER->id);
         $submission = $this->get_submission($USER->id);
         if ($this->isopen() && (!$filecount || $this->assignment->resubmit || !$submission->timemarked)) {
