Details
-
Type:
Sub-task
-
Status: Reopened
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9
-
Fix Version/s: STABLE backlog
-
Component/s: Questions
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
Actually (as in older version) moving a question in another category is done by modifying the question->category parameter as in
line 486 of question/editlib.php
//move question
if (!set_field('question', 'category', $tocategory->id, 'id', $questionid))
Calculated question can use category shared dataitems sets and just changing the category is not sufficient.
I suggest that a moving_to_category() function being created in questiontype and that the default function could be the one used.
I let you create the function and I will work on a specific one for calculated question.
I suggest that the entire list i.e. $questionids be passed to the function because if you move all or part of the calculated questions that are in a category, the moving process is different.