Eloy Lafuente (stronk7) 2fe085b284 MDL-45296 tests: ensure all submissions exist
The changes performed with the change from
create_from_user() to create_from_submission()
in practice enforce a new restriction about
submissions having to exist in order to fire
their lock/unlock events.

This did not exist before the change and, also,
it seems that the assign api itself, submission->lock() ...
also accepts non existing submissions.

So I was not 100% sure about how to fix these events:

1) enforcing submission to exist.
2) firing them only if the submission exist.

I've gone with 1) for now, making tests to pass. But will
raise the question in the Tracker, just in case we have
to move to the 2) approach for any reason.
2014-05-08 20:03:34 +02:00
..
2014-05-07 16:28:59 +08:00

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

These are main modules in Moodle, allowing various activities.


Each of these modules contains a number of expected components:

  mod_form.php: a form to setup/update a module instance

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

  pix/icon.gif: a 16x16 icon for the module

  db/install.xml: 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