]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12666 - When moving questions between categories, we should default to copying...
authortjhunt <tjhunt>
Thu, 20 Dec 2007 11:28:18 +0000 (11:28 +0000)
committertjhunt <tjhunt>
Thu, 20 Dec 2007 11:28:18 +0000 (11:28 +0000)
question/contextmove.php
question/contextmoveq.php

index 0b218561d9a6b5d83f70b244932ec4cb7875432b..7ee5908835794fa665be7391f8dc968760a7d9fb 100644 (file)
     $cattomove->contextto = $contexttostring;
     if (count($urls)){
         $defaults = array();
-        for ($default_key =0; $default_key < count($urls); $default_key++){
-            switch ($tocoursefilesid){
-                case SITEID:
-                    $defaults['urls'][$default_key] = QUESTION_FILEMOVE;
-                    break;
-                default :
-                    $defaults['urls'][$default_key] = QUESTION_FILECOPY;
-                    break;
-
-            }
+        for ($default_key = 0; $default_key < count($urls); $default_key++){
+            $defaults['urls'][$default_key] = QUESTION_FILECOPY;
         }
         $contextmoveform->set_data($defaults);
         //some parameters for get_string
index 53b1f63d73a660e9038bc86a99fab8b42bcfea7e..43f04ba1fdbf0e4828be9a1c794a5ac921c966c2 100644 (file)
@@ -223,16 +223,8 @@ $questionsstr->questions = '<strong>"'.join($questionnamestojoin, '"</strong>, <
 
 if (count($urls)){
     $defaults = array();
-    for ($default_key =0; $default_key < count($urls); $default_key++){
-        switch ($tocoursefilesid){
-            case SITEID:
-                $defaults['urls'][$default_key] = QUESTION_FILEMOVE;
-                break;
-            default :
-                $defaults['urls'][$default_key] = QUESTION_FILECOPY;
-                break;
-
-        }
+    for ($default_key = 0; $default_key < count($urls); $default_key++){
+        $defaults['urls'][$default_key] = QUESTION_FILECOPY;
     }
     $contextmoveform->set_data($defaults);