| [ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Contains class mod_feedback_structure
| Copyright: | 2016 Marina Glancy |
| License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
| File Size: | 329 lines (11 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
mod_feedback_structure:: (16 methods):
__construct()
get_feedback()
get_cm()
get_courseid()
get_templateid()
is_open()
get_items()
is_empty()
is_anonymous()
page_after_submit()
can_view_analysis()
is_already_submitted()
check_course_is_mapped()
shuffle_anonym_responses()
count_completed_responses()
get_completed_courses()
Class: mod_feedback_structure - X-Ref
Stores and manipulates the structure of the feedback or template (items, pages, etc.)| __construct($feedback, $cm, $courseid = 0, $templateid = null) X-Ref |
| Constructor param: stdClass $feedback feedback object, in case of the template param: cm_info $cm course module object corresponding to the $feedback param: int $courseid current course (for site feedbacks only) param: int $templateid template id if this class represents the template structure |
| get_feedback() X-Ref |
| Current feedback return: stdClass |
| get_cm() X-Ref |
| Current course module return: stdClass |
| get_courseid() X-Ref |
| Id of the current course (for site feedbacks only) return: stdClass |
| get_templateid() X-Ref |
| Template id return: int |
| is_open() X-Ref |
| Is this feedback open (check timeopen and timeclose) return: bool |
| get_items($hasvalueonly = false) X-Ref |
| Get all items in this feedback or this template param: bool $hasvalueonly only count items with a value. return: array of objects from feedback_item with an additional attribute 'itemnr' |
| is_empty() X-Ref |
| Is the items list empty? return: bool |
| is_anonymous() X-Ref |
| Is this feedback anonymous? return: bool |
| page_after_submit() X-Ref |
| Returns the formatted text of the page after submit or null if it is not set return: string|null |
| can_view_analysis() X-Ref |
| Checks if current user is able to view feedback on this course. return: bool |
| is_already_submitted($anycourseid = false) X-Ref |
| check for multiple_submit = false. if the feedback is global so the courseid must be given param: bool $anycourseid if true checks if this feedback was submitted in any course, otherwise checks $this->courseid . return: bool true if the feedback already is submitted otherwise false |
| check_course_is_mapped() X-Ref |
| Check whether the feedback is mapped to the given courseid. |
| shuffle_anonym_responses() X-Ref |
| If there are any new responses to the anonymous feedback, re-shuffle all responses and assign response number to each of them. |
| count_completed_responses($groupid = 0) X-Ref |
| Counts records from {feedback_completed} table for a given feedback If $groupid or $this->courseid is set, the records are filtered by the group/course param: int $groupid return: mixed array of found completeds otherwise false |
| get_completed_courses() X-Ref |
| For the frontpage feedback returns the list of courses with at least one completed feedback return: array id=>name pairs of courses |
| Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |