Non-core contributed modules

Fix question category creation

Details

  • Type: Sub-task Sub-task
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.4
  • Component/s: Tool: WebCTImport
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

With the current version of webctimport, questions imported using the script are not usable in Moodle. Even though they are added to the database, they don't appear in the imported course. This is because the current version of the script doesn't create a 'contextid' value for the question_category item.

The proposed patch creates a default context and assigns it via the contextid field to the question categories.

Activity

Hide
Anthony Borrow added a comment -

Moving to the Tool: WebCTImport Component and assigning to Ashley

Show
Anthony Borrow added a comment - Moving to the Tool: WebCTImport Component and assigning to Ashley
Hide
Ashley Holman added a comment -

In lib.php, function createcourse(), this line:

$form->category=3;//1;

I've changed that to make the category 1. If category ID 3 does not exist, the contexts get created with blank paths which causes the question categories to not work.

It would make sense to have a dropdown menu to choose which category to create the course in - thats on my list or things to do.

Show
Ashley Holman added a comment - In lib.php, function createcourse(), this line: $form->category=3;//1; I've changed that to make the category 1. If category ID 3 does not exist, the contexts get created with blank paths which causes the question categories to not work. It would make sense to have a dropdown menu to choose which category to create the course in - thats on my list or things to do.
Hide
Anthony Borrow added a comment -

Laia - I would not worry too much about this issue since it involves a 3rd party tool. I think your time is best spent investigating issues that pertain to Moodle core. Peace - Anthony

Show
Anthony Borrow added a comment - Laia - I would not worry too much about this issue since it involves a 3rd party tool. I think your time is best spent investigating issues that pertain to Moodle core. Peace - Anthony
Hide
Ashley Holman added a comment -

Latest CVS revisions have addressed this issue.

Show
Ashley Holman added a comment - Latest CVS revisions have addressed this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: