Moodle
  1. Moodle
  2. MDL-27143

When deleting a categorie containing question, we are asked where we want to tranfer these questions but they are deleted.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.7, 2.1.4, 2.2.1
    • Component/s: Questions
    • Labels:
    • Environment:
      Internet Explorer 8.x
      Windows 7
    • Testing Instructions:
      Hide

      1. Create a new course

      2. Create two question categories, category 1 and category 2

      3. Create some questions in category 1

      4. Delete category 1, choosing to move the quetsions to category 2.

      Verify that happens.

      Show
      1. Create a new course 2. Create two question categories, category 1 and category 2 3. Create some questions in category 1 4. Delete category 1, choosing to move the quetsions to category 2. Verify that happens.
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      16783

      Description

      -Go in the course administration menu, in the Question Bank
      -Create a categorie
      -Create a question in this categorie
      -Delete the categorie

      You are then asked where you want to tranfer the question in the categorie you are about to delete but once you finish the process, the question are erased with the categorie.

      If it was a subcategorie, all the question are lost
      If it was a categorie containing subcategorie, the question in the deleted categorie are lost but the subcategorie remain with their questions

      Date: 2011/04/11

      1. patch
        0.5 kB
        Nikhil Gupta

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          I am almost certain this is a duplicate. Please search for the original bug report and add your comments there.

          Show
          Tim Hunt added a comment - I am almost certain this is a duplicate. Please search for the original bug report and add your comments there.
          Hide
          Tim Hunt added a comment -

          This bug is very simiar to MDL-26718, but I guess they are not exact duplicates.

          Show
          Tim Hunt added a comment - This bug is very simiar to MDL-26718 , but I guess they are not exact duplicates.
          Hide
          Nikhil Gupta added a comment -

          Yes,they are not same..there is difference between two..cant be called duplicate..

          Show
          Nikhil Gupta added a comment - Yes,they are not same..there is difference between two..cant be called duplicate..
          Hide
          Nikhil Gupta added a comment -

          TimHunt,

          I have fixed the moving part but have a doubt that if the category is deleted then its subcategories should also be deleted??or it should remain as it is..

          Show
          Nikhil Gupta added a comment - TimHunt, I have fixed the moving part but have a doubt that if the category is deleted then its subcategories should also be deleted??or it should remain as it is..
          Hide
          Francis Hébert Roy added a comment -

          I also believe it should remain as it is with the subcategories. I only described what happened under different circumstances.

          Show
          Francis Hébert Roy added a comment - I also believe it should remain as it is with the subcategories. I only described what happened under different circumstances.
          Hide
          Nikhil Gupta added a comment -

          Hello,
          I have solved the problem and attaching patch with it..

          Thnx
          Nikhil

          Show
          Nikhil Gupta added a comment - Hello, I have solved the problem and attaching patch with it.. Thnx Nikhil
          Hide
          Huy Hoang added a comment -

          commit to blame: 20d891228f2fb3c95cd6ed2ee0252d3dcd9fe40f

          the patch could be shorter:

          question_move_questions_to_category(array_keys($questionids), $newcat);

          Show
          Huy Hoang added a comment - commit to blame: 20d891228f2fb3c95cd6ed2ee0252d3dcd9fe40f the patch could be shorter: question_move_questions_to_category(array_keys($questionids), $newcat);
          Hide
          Tim Hunt added a comment -

          I will try to look at this tomorrow.

          Show
          Tim Hunt added a comment - I will try to look at this tomorrow.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks Tim - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Tim - this has been integrated now
          Hide
          Rossiani Wijaya added a comment -

          This is working great.

          Show
          Rossiani Wijaya added a comment - This is working great.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks!

          Now... disconnect, relax and enjoy the next days, yay!

          Closing...ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks! Now... disconnect, relax and enjoy the next days, yay! Closing...ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: