stronk7 9ea6ac5105 Complete refactor of quiz_delete_course()
Now this function works following this:
- Iterate over every quiz category in the course (following parent-child relationships).
- If the category is being used*, move it to site level (under a container category) and
      mark it as published.
- If the category isn't being used, remove** it completely (questions, instances...) and
      re-parent its child categories.
- Feedback is shown in a table detailing all the changes performed.

* One category is being used if it has one question that is being used in any quiz,
  independently of its publish status.
** Removal of categories (and associated questions) has benn improved but, it won't
  be perfect until bug 3366 was solved.

Tested against some large courses with reused questions and multiple levels of
categories. Seems to work but

PLEASE TEST IT AND SEND ANY FEEDBACK TO BUG 2459
(http://moodle.org/bugs/bug.php?op=show&bugid=2459)

Exactly this function is going to be used in the upgrade script to solve
the orphan categories issue and it must work perfectly!

Merged from MOODLE_15_STABLE
2005-05-31 22:35:04 +00:00
..
2005-05-16 22:22:31 +00:00
2005-05-16 22:22:31 +00:00
2005-05-23 22:13:15 +00:00
2005-05-16 22:22:31 +00:00
2005-05-16 22:22:31 +00:00
2005-05-27 14:58:15 +00:00
2005-05-27 22:28:55 +00:00
2005-05-16 23:42:48 +00:00
2005-05-27 09:05:04 +00:00
2005-05-16 23:42:48 +00:00
2005-05-03 08:16:12 +00:00

ACTIVITY MODULES
----------------

These are main modules in Moodle, allowing various activities.


Each of these modules contains a number of expected components:

  mod.html: a form to setup/update a module instance

  version.php: defines some meta-info and provides upgrading code

  icon.gif: a 16x16 icon for the module

  db/mysql.sql: an SQL dump of all the required db tables and data
 
  index.php: a page to list all instances in a course

  view.php: a page to view a particular instance

  lib.php: any/all functions defined by the module should be in here.
         constants should be defined using MODULENAME_xxxxxx
         functions should be defined using modulename_xxxxxx

         There are a number of standard functions:

         modulename_add_instance()
         modulename_update_instance()
         modulename_delete_instance()

         modulename_user_complete()
         modulename_user_outline()

         modulename_cron()

         modulename_print_recent_activity()


If you are a developer and interested in developing new Modules see:
  
   Moodle Documentation:  http://moodle.org/doc
   Moodle Community:      http://moodle.org/community