Jelajahi Sumber

Merge pull request #992 from jloguercio/fixDragDropWork

Fix Drag & Drop for Teacher Corrections in Works
Yannick Warnier 9 tahun lalu
induk
melakukan
3eaacf0532
2 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 5 1
      main/inc/ajax/model.ajax.php
  2. 1 1
      main/work/work.lib.php

+ 5 - 1
main/inc/ajax/model.ajax.php

@@ -1650,7 +1650,11 @@ if (in_array($action, $allowed_actions)) {
             }
             $array = array();
             foreach ($columns as $col) {
-                $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : '';
+                if ($col == 'correction') {
+                    $array[] = isset($row[$col]) ? $row[$col] : '';
+                } else {
+                    $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : '';
+                }
             }
             $response->rows[$i]['cell']=$array;
             $i++;

+ 1 - 1
main/work/work.lib.php

@@ -2089,7 +2089,7 @@ function get_work_user_list(
                         action="'.api_get_path(WEB_AJAX_PATH).'work.ajax.php?'.api_get_cidreq().'&a=upload_correction_file&item_id='.$item_id.'" method="POST" enctype="multipart/form-data"
                         >
                         <div class="button-load">
-                            '.get_lang('ClickOrDropFilesHere').'
+                            '.get_lang('ClickOrDropOneFileHere').'
                         </div>
                         <input type="file" name="file" multiple>
                         <button type="submit"></button>