Small fix just in case numfiles isn't set ... it will still try to display
authormoodler <moodler>
Tue, 12 Nov 2002 05:05:21 +0000 (05:05 +0000)
committermoodler <moodler>
Tue, 12 Nov 2002 05:05:21 +0000 (05:05 +0000)
files if timemodified is set ... workaround for possible bug

mod/assignment/lib.php

index 1aaafec..3b9f327 100644 (file)
@@ -272,13 +272,6 @@ function assignment_print_difference($time) {
 function assignment_print_submission($assignment, $user, $submission, $teachers, $grades) {
     global $THEME;
 
-    switch ($assignment->type) {
-        case OFFLINE:
-            break;
-        case UPLOADSINGLE:
-            break;
-    }
-
     echo "\n<TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=10 align=center>";
 
     echo "\n<TR>";
@@ -300,7 +293,7 @@ function assignment_print_submission($assignment, $user, $submission, $teachers,
 
     if ($assignment->type != OFFLINE) {
         echo "\n<TR><TD BGCOLOR=\"$THEME->cellcontent\">";
-        if ($submission->numfiles) {
+        if ($submission->timemodified) {
             assignment_print_user_files($assignment, $user);
         } else {
             print_string("notsubmittedyet", "assignment");