fix for MDL-9087 screwy page when user places table into online assignment. - mergin...
authordanmarsden <danmarsden>
Fri, 30 Mar 2007 02:10:58 +0000 (02:10 +0000)
committerdanmarsden <danmarsden>
Fri, 30 Mar 2007 02:10:58 +0000 (02:10 +0000)
mod/assignment/type/online/assignment.class.php

index b639635..63088a7 100644 (file)
@@ -104,12 +104,14 @@ class assignment_online extends assignment_base {
                 } else if ($this->isopen()){    //fix for #4206
                     echo '<div style="text-align:center">'.get_string('emptysubmission', 'assignment').'</div>';
                 }
-                if ($editable) {
-                    print_single_button('view.php', array('id'=>$this->cm->id, 'edit'=>'1'),
-                                         get_string('editmysubmission', 'assignment'));
-                }
             }
             print_simple_box_end();
+            if (!$editmode && $editable) { 
+                echo "<div style='text-align:center'>"; 
+                print_single_button('view.php', array('id'=>$this->cm->id,'edit'=>'1'), 
+                        get_string('editmysubmission', 'assignment')); 
+                echo "</div>"; 
+            } 
 
         }