Add code to cope with detecting and moving associated files
Need code to check for files in the current course / at the site level that need to be moved when a question is moved. Questions can be moved either :
- when a whole category is moved in the Edit Category page
- or when an individual question is moved in the edit question form by using the select box there.
The default question type object will have a new method to deal with things that need doing when a question is removed default_questiontype::move_to_category() this can be overriden by child classes for extra specific stuff to be done for special question types.
We will check for linked course files and site files in question text and other text using a regular expression. List associated files for user and allow user the choice to move files to the same context as the question. So if a question is shared at the :
- course level or module level associated files will be stored in the course files area.
- course category or site level associated files will be stored in the site files area.