]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-17273 Added a back button to the error message and fixed missing handling of...
authornicolasconnault <nicolasconnault>
Thu, 9 Apr 2009 12:29:54 +0000 (12:29 +0000)
committernicolasconnault <nicolasconnault>
Thu, 9 Apr 2009 12:29:54 +0000 (12:29 +0000)
grade/edit/outcome/import.php
theme/standard/styles_layout.css

index 7bc269ab8b65017f1e804bb518341e574ba906ef..9e45362bd1207c8d35d62f54acd2c6a440e0c579 100644 (file)
@@ -142,7 +142,10 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
                 }
             }
             if ($error) {
-                print_box(get_string('importoutcomenofile', 'grades', $line));
+                print_box_start('generalbox importoutcomenofile');
+                echo get_string('importoutcomenofile', 'grades', $line);
+                echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
+                print_box_end();
                 $fatal_error = true;
                 break;
             }
@@ -158,7 +161,10 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
         // sanity check #2: every line must have the same number of columns as there are
         // headers.  If not, processing stops.
         if ( count($csv_data) != count($file_headers) ) {
-            print_box(get_string('importoutcomenofile', 'grades', $line));
+            print_box_start('generalbox importoutcomenofile');
+            echo get_string('importoutcomenofile', 'grades', $line);
+            echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
+            print_box_end();
             $fatal_error = true;
             //print_box(var_export($csv_data, true) ."<br />". var_export($header, true));
             break;
@@ -167,7 +173,10 @@ if ($handle = fopen($imported_file['userfile']['tmp_name'], 'r')) {
         // sanity check #3: all required fields must be present on the current line.
         foreach ($headers as $header => $position) {
             if ($csv_data[$imported_headers[$header]] == '') {
-                print_box(get_string('importoutcomenofile', 'grades', $line));
+                print_box_start('generalbox importoutcomenofile');
+                echo get_string('importoutcomenofile', 'grades', $line);
+                echo print_single_button($CFG->wwwroot.'/grade/edit/outcome/index.php', array('id'=> $courseid), get_string('back'), 'get', '_self', true);
+                print_box_end();
                 $fatal_error = true;
                 break;
             }
index b9f930e542fb8fdb5a5ab687b5cbfbf9ba4e56b2..43b2c0fa6ca161f8e2fa32ea9d6ef8700a3d728f 100644 (file)
@@ -2577,6 +2577,11 @@ div.allcoursegrades {
     text-align: right;
     padding: 4px 0px 5px 0px;
 }
+
+.importoutcomenofile .singlebutton {
+    text-align: center;
+    margin-top: 5px;
+}
 /* gradebook edit tree */
 
 .grade-edit-tree .gradetreebox {