In this commit I removed redirects that potentially could break the Web
Services layer.
Instead doing redirect inside APIs I return a special flag that is
properly checked.
Some code that will be used by Web Services was moved, we created new
methods to avoid code duplication:
- To generate the lesson messages on page view
- To check the time restrictions in a current attempt
It was possible in the lesson module for a user to
answer a question, get the result, then click back
in the browser and re-answer it, even if they exceeded
the number of attempts allowed per question.
I added a deprecated method add_pretend_block that forwards to add_fake_block, so old code should be break. However, I aslo updated all the callers in core code.
- this fix allows the student to traverse the complete review paths. it only sets the continue button to go to the end of lesson when the page has no nextpage (last page).
The following are notable changes made in this commit
* Lesson page type are now class based and extend an abstract class. This includes a class for the page type and a class for the creating/editing a instance of this page.
* Converted all forms to mforms
* Action script located in mod/action/* were worked into the above so far less switch statements and the action directory will be removed.
* Implements a custom renderer
* Converted everything to use page, output, and custom renderer methods
* Replaced all deprecated methods incl. print_textarea conversions
* Tried to cut down on excessive DB calls.
Things worth noting:
* The focus of this patch was on cleaning up the module not rewriting it, as such I have organized NOT rewritten. There are still many areas in the module where the code could be greatly improved however to do so would require a rethink/rewrite