Skip to content
Browse files

unset unmodified text fields SC#140 + popup fix

  • Loading branch information...
1 parent 641649b commit 854e6f0b2c5e63e2b2c7cc0562dbdf33be9f3a48 skodak committed Jul 12, 2005
View
10 mod/assignment/lib.php
@@ -851,6 +851,9 @@ function process_feedback() {
$newsubmission->mailed = 0; // Make sure mail goes out (again, even)
$newsubmission->timemarked = time();
+ unset($newsubmission->data1); // Don't need to update this.
+ unset($newsubmission->data2); // Don't need to update this.
+
if (empty($submission->timemodified)) { // eg for offline assignments
$newsubmission->timemodified = time();
}
@@ -1030,14 +1033,13 @@ function print_user_files($userid=0, $return=false) {
require_once($CFG->libdir.'/filelib.php');
$icon = mimeinfo('icon', $file);
if ($CFG->slasharguments) {
- $ffurl = "file.php/$filearea/$file";
+ $ffurl = "$CFG->wwwroot/file.php/$filearea/$file";
} else {
- $ffurl = "file.php?file=/$filearea/$file";
+ $ffurl = "$CFG->wwwroot/file.php?file=/$filearea/$file";
}
$output = '<img align="middle" src="'.$CFG->pixpath.'/f/'.$icon.'" height="16" width="16" alt="'.$icon.'" />'.
- link_to_popup_window ('/'.$ffurl, 'file'.$key, $file, 450, 580, $file, 'none', true).
- '<br />';
+ '<a href="'.$ffurl.'" >'.$file.'</a><br />';
}
}
}
View
1 mod/assignment/type/online/assignment.class.php
@@ -181,6 +181,7 @@ function process_feedback() {
$newsubmission->timemarked = time();
unset($newsubmission->data1); // Don't need to update this.
+ unset($newsubmission->data2); // Don't need to update this.
if (! update_record('assignment_submissions', $newsubmission)) {
return false;
View
7 mod/assignment/type/uploadsingle/assignment.class.php
@@ -85,6 +85,8 @@ function upload() {
$submission->timemodified = time();
$submission->numfiles = 1;
$submission->comment = addslashes($submission->comment);
+ unset($submission->data1); // Don't need to update this.
+ unset($submission->data2); // Don't need to update this.
if (update_record("assignment_submissions", $submission)) {
$this->email_teachers($submission);
print_heading(get_string('uploadedfile'));
@@ -140,7 +142,10 @@ function process_feedback() {
$newsubmission->teacher = $USER->id;
$newsubmission->mailed = 0; // Make sure mail goes out (again, even)
$newsubmission->timemarked = time();
-
+
+ unset($newsubmission->data1); // Don't need to update this.
+ unset($newsubmission->data2); // Don't need to update this.
+
if (! update_record('assignment_submissions', $newsubmission)) {
return false;
}

0 comments on commit 854e6f0

Please sign in to comment.
Something went wrong with that request. Please try again.