Uploaded image for project: '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
    • Status: Closed
    • Priority: 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:

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              timhunt 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
              timhunt 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
              timhunt Tim Hunt added a comment -

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

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

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

              Show
              nikhilgupta0901 Nikhil Gupta added a comment - Yes,they are not same..there is difference between two..cant be called duplicate..
              Hide
              nikhilgupta0901 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
              nikhilgupta0901 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
              p0953490 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
              p0953490 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
              nikhilgupta0901 Nikhil Gupta added a comment -

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

              Thnx
              Nikhil

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

              commit to blame: 20d891228f2fb3c95cd6ed2ee0252d3dcd9fe40f

              the patch could be shorter:

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

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

              I will try to look at this tomorrow.

              Show
              timhunt Tim Hunt added a comment - I will try to look at this tomorrow.
              Hide
              stronk7 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
              stronk7 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
              samhemelryk Sam Hemelryk added a comment -

              Thanks Tim - this has been integrated now

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

              This is working great.

              Show
              rwijaya Rossiani Wijaya added a comment - This is working great.
              Hide
              stronk7 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
              stronk7 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:
                    Fix Release Date:
                    9/Jan/12