Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41924

Minimise questions included with quiz backups

    Details

    • Difficulty:
      Difficult
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE

      Description

      In MDL-12403 we addressed the ability to exclude the question bank entirely from backups. But people would also like it so that the entire question category is not included if a quiz uses a question from that category.

      For example, in the following hierarcy, all questions will be backed up:

      • System Question - IN QUIZ
      • System Question - NOT IN QUIZ
        • Course Cat Question - IN QUIZ
        • Course Cat Question - NOT IN QUIZ
          • Course Question - IN QUIZ
          • Course Question - NOT IN QUIZ
            • Quiz Question - IN QUIZ

      Ideally, only the ones in the quiz would be backed up. However, this is very tricky problem, because there can be cases like random questions where it can be any question from a category.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            poltawski Dan Poltawski added a comment -

            Note that a lot of discussion about this topic has taken place on MDL-12403, so please read the whole of that issue to get a full understanding of this issue.

            Show
            poltawski Dan Poltawski added a comment - Note that a lot of discussion about this topic has taken place on MDL-12403 , so please read the whole of that issue to get a full understanding of this issue.
            Hide
            hinkelman Don Hinkelman added a comment -

            Is the tricky part of this problem just random questions? If it is, and if we are trying to design a solution that would backup all possible random questions anywhere, then indeed I find it very difficult to imagine a fix. I do however, see a possible solution if random questions are manually regulated to be contained in an immediate parent category. As a question bank manager, I found it is not too hard to move large sets of questions up and down among categories. So this solution may work in combination with recommended manual quiz bank policy administration. Now, the current situation may be three basic cases (please correct me): 1) if questions are in a course category, just those questions will be backed up, 2) if any questions are in a higher level category, the whole question bank is backed up, and 3) if "no question bank" option is checked, nothing in the question bank will backed up (new MDL-12403). What if several options are built into #3? Instead of a yes/no checkbox, a dropdown menu gives us these options: a) backup entire question bank, b) backup immediate parent category questions with course questions, and c) backup course questions only. If random questions are detected in the backup process, there can be a warning message. The warning would say, that random questions are present and the whole question bank will be included. If a question bank manager has put all random questions in a specific category, then the manager can override the whole question bank being backed up and instead select the specific category where the random questions are contained.

            Show
            hinkelman Don Hinkelman added a comment - Is the tricky part of this problem just random questions? If it is, and if we are trying to design a solution that would backup all possible random questions anywhere, then indeed I find it very difficult to imagine a fix. I do however, see a possible solution if random questions are manually regulated to be contained in an immediate parent category. As a question bank manager, I found it is not too hard to move large sets of questions up and down among categories. So this solution may work in combination with recommended manual quiz bank policy administration. Now, the current situation may be three basic cases (please correct me): 1) if questions are in a course category, just those questions will be backed up, 2) if any questions are in a higher level category, the whole question bank is backed up, and 3) if "no question bank" option is checked, nothing in the question bank will backed up (new MDL-12403 ). What if several options are built into #3? Instead of a yes/no checkbox, a dropdown menu gives us these options: a) backup entire question bank, b) backup immediate parent category questions with course questions, and c) backup course questions only. If random questions are detected in the backup process, there can be a warning message. The warning would say, that random questions are present and the whole question bank will be included. If a question bank manager has put all random questions in a specific category, then the manager can override the whole question bank being backed up and instead select the specific category where the random questions are contained.
            Hide
            lkelly20 Louise Kelly (UNE) added a comment -

            I see only three Options required for backup or import. Ultimately this could be three radio button options (instead of a checkbox) with Option 1 selected by default

            Option 1) Exclude question bank
            Option 2) Include question bank
            Option 3) Include only used questions* (*if random questions are detected all questions will be included)

            This assumes all questions are saved at course level.

            A checkbox option to include/exclude question bank is now the subject of MDL-12403

            I don't see a need for the proposed option "b) backup immediate parent category questions with course questions". If the question bank is shared at a common parent category level for sharing among all courses in the parent category, then the default option should be sufficient to manage things (we don't want the process to copy all questions from a Parent category and dump it at course level. This defeats the purpose of having questions in a parent category.

            Some of our schools do utilise a large question bank saved at a parent category level. Their courses have no questions saved at course level. Can someone explain to me the use-case for the proposed option "b) backup immediate parent category questions with course questions" or am I not understanding something about the way question bank is treated in a backup or import?

            Show
            lkelly20 Louise Kelly (UNE) added a comment - I see only three Options required for backup or import. Ultimately this could be three radio button options (instead of a checkbox) with Option 1 selected by default Option 1) Exclude question bank Option 2) Include question bank Option 3) Include only used questions* (*if random questions are detected all questions will be included) This assumes all questions are saved at course level. A checkbox option to include/exclude question bank is now the subject of MDL-12403 I don't see a need for the proposed option "b) backup immediate parent category questions with course questions". If the question bank is shared at a common parent category level for sharing among all courses in the parent category, then the default option should be sufficient to manage things (we don't want the process to copy all questions from a Parent category and dump it at course level. This defeats the purpose of having questions in a parent category. Some of our schools do utilise a large question bank saved at a parent category level. Their courses have no questions saved at course level. Can someone explain to me the use-case for the proposed option "b) backup immediate parent category questions with course questions" or am I not understanding something about the way question bank is treated in a backup or import?
            Hide
            aolley Adam Olley added a comment -

            Louise: The need to have the parent category backed up becomes an issue when you want to restore the backup to a different instance of Moodle. If it's intended for use in the same instance of moodle, then that's where you'd pick C I guess.

            Show
            aolley Adam Olley added a comment - Louise: The need to have the parent category backed up becomes an issue when you want to restore the backup to a different instance of Moodle. If it's intended for use in the same instance of moodle, then that's where you'd pick C I guess.
            Hide
            emmarichardson Emma Richardson added a comment -

            I still see this as too "all or nothing". Just because I use a single category for random questions does not mean I need the entire question bank. If we were to encourage category use, could an option not be to "just include those categories used in this course". That way, random questions would be taken care of without the need for hundreds or thousands of unneeded questions. So perhaps the options could be:
            Just include the questions used in the course
            Just include the question categories used in the course (this would be regardless of category location - course or system)
            Include the entire question bank
            Exclude the question bank (no quizzes will be exported/imported)

            Show
            emmarichardson Emma Richardson added a comment - I still see this as too "all or nothing". Just because I use a single category for random questions does not mean I need the entire question bank. If we were to encourage category use, could an option not be to "just include those categories used in this course". That way, random questions would be taken care of without the need for hundreds or thousands of unneeded questions. So perhaps the options could be: Just include the questions used in the course Just include the question categories used in the course (this would be regardless of category location - course or system) Include the entire question bank Exclude the question bank (no quizzes will be exported/imported)
            Hide
            villalon Jorge Villalon added a comment -

            In our case (we use tons of random questions) Emma's option of "Just include the question categories used in the course" would fit our business case perfectly.

            Show
            villalon Jorge Villalon added a comment - In our case (we use tons of random questions) Emma's option of "Just include the question categories used in the course" would fit our business case perfectly.
            Hide
            hinkelman Don Hinkelman added a comment -

            These four options make sense. As a question bank manager, I notice a course often uses about 100 questions within a 500 question category. Thus option #2 is ideal for us. We do not the full 12,000 questions that are in our whole question bank (resulting in 1gb sized backups for a single course). The all-or-nothing solution for question bank backup forces us to consider setting up separate Moodle sites for every department in the university, which naturally is undesirable. For clarity, let's number the four options that Emma recommended.
            1. Just include the questions used in the course
            2. Just include the question categories used in the course (this would be regardless of category location - course or system)
            3. Include the entire question bank
            4. Exclude the question bank (no quizzes will be exported/imported)
            #3 and #4 are currently implemented as of Moodle 2.6, I believe. Also, is there a need for an option to backup all the questions in Course category+Parent category. Is this a fifth option?

            Show
            hinkelman Don Hinkelman added a comment - These four options make sense. As a question bank manager, I notice a course often uses about 100 questions within a 500 question category. Thus option #2 is ideal for us. We do not the full 12,000 questions that are in our whole question bank (resulting in 1gb sized backups for a single course). The all-or-nothing solution for question bank backup forces us to consider setting up separate Moodle sites for every department in the university, which naturally is undesirable. For clarity, let's number the four options that Emma recommended. 1. Just include the questions used in the course 2. Just include the question categories used in the course (this would be regardless of category location - course or system) 3. Include the entire question bank 4. Exclude the question bank (no quizzes will be exported/imported) #3 and #4 are currently implemented as of Moodle 2.6, I believe. Also, is there a need for an option to backup all the questions in Course category+Parent category. Is this a fifth option?
            Hide
            emmarichardson Emma Richardson added a comment -

            I think that when you start adding parent categories, you might be overcomplicating the issue. If the parent category contains questions being used, it would already be included in the category option. If not, why do you need it and when do you stop? What if categories are nested several levels down - does the process just jump up one level or all the way to the top? At that point, you can just select the whole bank option.

            Show
            emmarichardson Emma Richardson added a comment - I think that when you start adding parent categories, you might be overcomplicating the issue. If the parent category contains questions being used, it would already be included in the category option. If not, why do you need it and when do you stop? What if categories are nested several levels down - does the process just jump up one level or all the way to the top? At that point, you can just select the whole bank option.
            Hide
            hinkelman Don Hinkelman added a comment -

            I see. Sticking with these four options would handle the cases we are describing. Dan, does that strategy make sense to you?

            Show
            hinkelman Don Hinkelman added a comment - I see. Sticking with these four options would handle the cases we are describing. Dan, does that strategy make sense to you?
            Hide
            mebenson Melissa Benson added a comment -

            Just wondering if this will ever get looked into more?

            Show
            mebenson Melissa Benson added a comment - Just wondering if this will ever get looked into more?
            Hide
            hinkelman Don Hinkelman added a comment -

            I am looking forward to this significant issue being addressed. Tracing the discussion in MDL-12403, it has now been going on for over eight years.

            Show
            hinkelman Don Hinkelman added a comment - I am looking forward to this significant issue being addressed. Tracing the discussion in MDL-12403 , it has now been going on for over eight years.
            Hide
            emmarichardson Emma Richardson added a comment -

            Me too - I ended up rebuilding my whole site and losing my nice system level question bank because of the problems that it caused. Happy to help test any solutions.

            Show
            emmarichardson Emma Richardson added a comment - Me too - I ended up rebuilding my whole site and losing my nice system level question bank because of the problems that it caused. Happy to help test any solutions.
            Hide
            pmk Przemek Kaszubski added a comment -

            I second all the requests here. It is a security issue, too: if you want to share a quiz with someone, you need to be soooo careful not to give away the entirte question bank in your course.

            My own workaround is to try to only use quiz-level question banks, but it is not always a good solution.

            BTW the "Affects Version/s" shoiuld be post-edited - ALL the versions including the 2.8 series (not sure about 2.9 dev) are affected.

            Show
            pmk Przemek Kaszubski added a comment - I second all the requests here. It is a security issue, too: if you want to share a quiz with someone, you need to be soooo careful not to give away the entirte question bank in your course. My own workaround is to try to only use quiz-level question banks, but it is not always a good solution. BTW the "Affects Version/s" shoiuld be post-edited - ALL the versions including the 2.8 series (not sure about 2.9 dev) are affected.
            Hide
            mebenson Melissa Benson added a comment -

            Quick question - if we have set up a shared question bank (https://docs.moodle.org/28/en/Question_sharer) and have quiz questions under "system"...those aren't getting duplicated, right?

            Show
            mebenson Melissa Benson added a comment - Quick question - if we have set up a shared question bank ( https://docs.moodle.org/28/en/Question_sharer ) and have quiz questions under "system"...those aren't getting duplicated, right?
            Hide
            timhunt Tim Hunt added a comment -

            They should not be getting duplicated. If you check and find that they are, please let us know.

            Show
            timhunt Tim Hunt added a comment - They should not be getting duplicated. If you check and find that they are, please let us know.
            Hide
            sam.lambda Sam McCulough added a comment -

            Hi all,

            Has there been any additional thought to this issue? I've got a client whose course back up is only 50MB in mbz format, but the question bank has 120,000+ questions. It is timing out his restore. I've duplicated the issue with a backup provided by the client, as well as my own generated one from their site. The site they're trying to restore the backup to is on 2.7.4. But I have seen a Gateway Timeout or white screen in my own 2.9 sandbox. The issue is only present when the question bank is included. As soon as it is removed the backup can be restored on their and my internal site no problem.

            If the consensus is that is too risky to send quizzes with copies of questions from the bank, then perhaps changes to the question bank xml file could be made? I was thinking they could be split up into multiple xml files that are of a manageable parsing size for the site. Similar to how you can split a zip file up. Just an idea though, I'm not sure on the code changes needed to make something like this possible.

            Cheers,
            Sam

            Show
            sam.lambda Sam McCulough added a comment - Hi all, Has there been any additional thought to this issue? I've got a client whose course back up is only 50MB in mbz format, but the question bank has 120,000+ questions. It is timing out his restore. I've duplicated the issue with a backup provided by the client, as well as my own generated one from their site. The site they're trying to restore the backup to is on 2.7.4. But I have seen a Gateway Timeout or white screen in my own 2.9 sandbox. The issue is only present when the question bank is included. As soon as it is removed the backup can be restored on their and my internal site no problem. If the consensus is that is too risky to send quizzes with copies of questions from the bank, then perhaps changes to the question bank xml file could be made? I was thinking they could be split up into multiple xml files that are of a manageable parsing size for the site. Similar to how you can split a zip file up. Just an idea though, I'm not sure on the code changes needed to make something like this possible. Cheers, Sam
            Hide
            aressaissi Amir added a comment -

            i believe that this is why my back-up and restore doesn't work. However, restoring without the questions and quizzes is not an option. I have spent hundreds of hours in organizing and reorganizing my question categories during the last 6 years. This is a total disaster!!

            Since this seems to be a very difficult problem to solve, Is it possible to completely revamp how the questions are stored? Perhaps it could be how Google Docs used to be with only 1 location for all questions but where a 'pointer' to a questions could be put into individual folders. This would also allow a question to be in more than 1 folder at the same time without making copies of it.

            In any case, we would all be very grateful if this issue could be worked on as soon as possible. The people running into these problems are the one's that use Moodle the most.

            Thanks,
            Amir.

            Show
            aressaissi Amir added a comment - i believe that this is why my back-up and restore doesn't work. However, restoring without the questions and quizzes is not an option. I have spent hundreds of hours in organizing and reorganizing my question categories during the last 6 years. This is a total disaster!! Since this seems to be a very difficult problem to solve, Is it possible to completely revamp how the questions are stored? Perhaps it could be how Google Docs used to be with only 1 location for all questions but where a 'pointer' to a questions could be put into individual folders. This would also allow a question to be in more than 1 folder at the same time without making copies of it. In any case, we would all be very grateful if this issue could be worked on as soon as possible. The people running into these problems are the one's that use Moodle the most. Thanks, Amir.

              People

              • Votes:
                41 Vote for this issue
                Watchers:
                29 Start watching this issue

                Dates

                • Created:
                  Updated: