Differences Between: [Versions 310 and 311] [Versions 311 and 402] [Versions 311 and 403]
mod_feedback data generator.
Copyright: | 2013 Ankit Agarwal |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 553 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_feedback_generator:: (14 methods):
create_instance()
create_question()
create_response()
create_item_info()
create_item_label()
create_item_multichoice()
create_item_multichoicerated()
create_item_numeric()
create_item_textarea()
create_item_textfield()
create_item_pagebreak()
format_item_values()
get_item_response_value()
get_choice_item_response_value()
Class: mod_feedback_generator - X-Ref
mod_feedback data generator class.create_instance($record = null, array $options = null) X-Ref |
No description |
create_question(array $data) X-Ref |
Create question. param: array $data Question data return: mixed Question instance |
create_response(array $data) X-Ref |
Create response. param: array $data Response data. return: stdClass feedback_completed response instance. |
create_item_info($feedback, $record = array() X-Ref |
Create info question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_label($feedback, $record = array() X-Ref |
Create label question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_multichoice($feedback, $record = array() X-Ref |
Create multichoice question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_multichoicerated($feedback, $record = array() X-Ref |
Create multichoicerated question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_numeric($feedback, $record = array() X-Ref |
Create numeric question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_textarea($feedback, $record = array() X-Ref |
Create textarea question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_textfield($feedback, $record = array() X-Ref |
Create textfield question item. param: object $feedback feedback record param: array $record (optional) to override default values return: int |
create_item_pagebreak($feedback) X-Ref |
Create pagebreak. param: object $feedback feedback record return: mixed false if there already is a pagebreak on last position or the id of the pagebreak-item |
format_item_values(string $questiontype, string $values) X-Ref |
Format feedback item values. This method will replace newline characters with the proper line separator for each question type. param: string $questiontype Question types param: string $values Values return: string Formatted values |
get_item_response_value($record, string $response) X-Ref |
Given a response to a feedback item, return its corresponding value. param: mixed $record Item record param: string $response Response name return: int|string Response value |
get_choice_item_response_value(feedback_item_base $item, $record, string $response, int $offset = 1) X-Ref |
Given a response to a feedback choice item, return its corresponding value. param: feedback_item_base $item Feedback item param: mixed $record Item record param: string $response Response param: int $offset Choice to start looking from return: int Response choice index |