From: tjhunt Date: Thu, 20 Dec 2007 11:28:18 +0000 (+0000) Subject: MDL-12666 - When moving questions between categories, we should default to copying... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cb29abc508ab8d9b230138f8975bd6c04fa61b9a;p=moodle.git MDL-12666 - When moving questions between categories, we should default to copying amy linked files. Merged from MOODLE_19_STABLE. --- diff --git a/question/contextmove.php b/question/contextmove.php index 0b218561d9..7ee5908835 100644 --- a/question/contextmove.php +++ b/question/contextmove.php @@ -226,16 +226,8 @@ $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 diff --git a/question/contextmoveq.php b/question/contextmoveq.php index 53b1f63d73..43f04ba1fd 100644 --- a/question/contextmoveq.php +++ b/question/contextmoveq.php @@ -223,16 +223,8 @@ $questionsstr->questions = '"'.join($questionnamestojoin, '", < 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);