Moodle
  1. Moodle
  2. MDL-8946

Impossible to export questions from a category other than Default

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.8, 1.9
    • Fix Version/s: 1.8, 1.9
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE
    • Rank:
      28976

      Description

      In very recently updated versions of both Moodle 1.8 and 1.9 it is impossible to export questions from any category other than Default.
      I have several categories named, e.g. category one, category 2, etc.
      In category one I have a number of questions.
      From category one, I click on the Export button.
      In the Export questions to file window, curiously, the dropdown list has reverted to Default choice. I click on it to select Category one and click on the drop-down File format list. No matter what export format I select, no matter if I have ticked the "to file" box or not, the questions in Category one will not be exported. The questions from Default category (in any!) will be exported instead.
      This is a serious bug.
      Joseph

        Activity

        Hide
        Howard Miller added a comment -

        Tim - could you comment on this...

        http://moodle.cvs.sourceforge.net/moodle/moodle/question/export.php?r1=1.28&r2=1.29

        ...as far as I can see, you deleted the code that looks up the category so now it always selects the default category for the course. I don't see why.

        The other minor point about the selected category reverting to default on the form is that the two (pre tabs) links for import and export have recently been removed. The tabbed link does not maintain the state of the selected category and I don't think it ever did or can (without some fancy javascript).

        Show
        Howard Miller added a comment - Tim - could you comment on this... http://moodle.cvs.sourceforge.net/moodle/moodle/question/export.php?r1=1.28&r2=1.29 ...as far as I can see, you deleted the code that looks up the category so now it always selects the default category for the course. I don't see why. The other minor point about the selected category reverting to default on the form is that the two (pre tabs) links for import and export have recently been removed. The tabbed link does not maintain the state of the selected category and I don't think it ever did or can (without some fancy javascript).
        Hide
        Tim Hunt added a comment -

        Hmm. Looks like I screwed up while trying to clean up the code a bit while not completely understanding it. I'll endeavour fix it tomorrow.

        Show
        Tim Hunt added a comment - Hmm. Looks like I screwed up while trying to clean up the code a bit while not completely understanding it. I'll endeavour fix it tomorrow.
        Hide
        Tim Hunt added a comment -

        Yes, I did indeed mess up. Should be fixed now.

        Show
        Tim Hunt added a comment - Yes, I did indeed mess up. Should be fixed now.
        Hide
        Joseph Rézeau added a comment -

        This is to confirm I have tested the fix in both 1.8 beta and 1.9 dev and it's OK.
        Thanks
        Joseph

        Show
        Joseph Rézeau added a comment - This is to confirm I have tested the fix in both 1.8 beta and 1.9 dev and it's OK. Thanks Joseph

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: