Well, I've finished doing the class diagram for the plugin I developed for Moodle:
Explanations
Previously in moodle existed a class called Moodleform. This class is intended to be subclassed, as it works as a template for all forms in Moodle. So I subclassed it in order to make my own form for OpenSyllabus plugin. The functions (all their sequence diagrams will be posted in my next post) I needed to redefine were:
- definition(): this operation is called by the constructor and builds the form with the fields you define on it
- definition_after_data: for making some validations or instructions after data is submitted.
- getFileValue(): this operation retrieves the name of the uploaded file.
- validation(): this operation makes some validations before the form is accepted. In my case, as I only had to make a prototype, I redefined it empty.
- add_action_buttons(): adds the "submit" and cancel buttons to the form.
As I said, I will provide sequence diagrams later. Once I defined the form, now only we must bind this form to our Main process and the logics of our problem is finished. It's easy to understand, it isn't?
hi. you have class diagramm for moodle? i'm interesting for that.