Protected Member Functions | |
processSave ($oldCM) | |
Processes user input from editor. | |
showEditor ($cm, $failed) | |
Displays editor for content. |
INSERT FULL DESCRIPTION HERE
TKSnapInteractivateLessonEditor::processSave | ( | $ | oldCM | ) | [protected] |
Processes user input from editor.
This method should gather user input from the submitted form, process it and create a new content module based on that input. If that fails, false should be returned. Otherwise, return the new content module. The current content module is provided as the $oldCM parameter, if some values from it are needed
$oldCM | [SnapContent]: latest content module associated with content in database |
Reimplemented from TKSnapEditor.
TKSnapInteractivateLessonEditor::showEditor | ( | $ | cm, | |
$ | failed | |||
) | [protected] |
Displays editor for content.
The $cm passed in is the content module representing the current content in the version and it should be used, if possible or need be, to pre-fill form fields when editing an existing version. If $failed is true, then that means the last save action failed. In this case, it would be useful to prefill the form with what the user had just entered. However, this may not make sense in all cases. This method should not return anything. Rather, any form that is created should be add()ed to $this, since $this is a toolkit container.
$cm | [SnapContent]: content module from version representing latest stored content | |
$failed | [boolean]: whether the editor is being displayed again because the last save attempt failed (due to bad input or some other error) |
Reimplemented from TKSnapEditor.