Hmm... Not for me... I am conducting my tests on a clean new 1.9 install, where I create a couple of courses, a couple of quizzes in each, a couple of categories and a couple of questions in each category.
In import.php, right after
list($thispageurl, $courseid, $cmid, $cm, $module, $pagevars) = question_edit_setup(false, false);I add this line:
echo("HERE IS IMPORT.PHP courseid = $courseid; cmid = $cmid");In course ID 2, if I go directly to the questions bank and click on Import, then import.php echoes "HERE IS IMPORT PHP courseid = 2; cmid = 0".
In course ID 2, if I edit quiz ID 6, and, on the editing quiz screen I click on Import, , then import.php echoes "HERE IS IMPORT PHP courseid = 2; cmid = 6".
As far as I can gather, $cmid contains the id of the quiz being currently edited, not the course id. So in import.php, the test $validcats = question_category_options( $cmid, false, true ) can't return a correct list of categories in the actual course. I maintain that it does work however with $validcats = question_category_options( $courseid, false, true );
Can anyone confirm this?
Joseph
Keep up the good work.