|
Moodle
2.2.1
http://www.collinsharper.com
|
Go to the source code of this file.
Include eventslib.php Include calendar/lib.php
| enum FEEDBACK_DECIMAL |
| enum FEEDBACK_THOUSAND |
| feedback_add_instance | ( | $ | feedback | ) |
this will create a new instance and return the id number of the new instance.
object
| object | $feedback | the object given by mod_feedback_mod_form |
Definition at line 77 of file lib.php.

| feedback_check_values | ( | $ | firstitem, |
| $ | lastitem | ||
| ) |
this function checks the correctness of values. the rules for this are implemented in the class of each item. it can be the required attribute or the value self e.g. numeric. the params first/lastitem are given to determine the visible range between pagebreaks.
object
| int | $firstitem | the position of firstitem for checking |
| int | $lastitem | the position of lastitem for checking |
Definition at line 2128 of file lib.php.

removes non existing courses or feedbacks from sitecourse_map. it shouldn't be called all too often a good place for it could be the mapcourse.php or unmapcourse.php
object
| feedback_compare_item_value | ( | $ | completedid, |
| $ | itemid, | ||
| $ | dependvalue, | ||
| $ | tmp = false |
||
| ) |
compares the value of the itemid related to the completedid with the dependvalue. this is used if a depend item is set. the value can come as temporary or as permanently value. the deciding is done by $tmp.
object object
| int | $completeid | |
| int | $itemid | |
| mixed | $dependvalue | |
| boolean | $tmp |
Definition at line 2104 of file lib.php.


| feedback_count_complete_users | ( | $ | cm, |
| $ | group = false |
||
| ) |
| feedback_count_incomplete_users | ( | $ | cm, |
| $ | group = false |
||
| ) |
| feedback_create_item | ( | $ | data | ) |
creates a new item-record
object
| object | $data | the data from edit_item_form |
Definition at line 1418 of file lib.php.

| feedback_create_pagebreak | ( | $ | feedbackid | ) |
| feedback_create_template | ( | $ | courseid, |
| $ | name, | ||
| $ | ispublic = 0 |
||
| ) |
| feedback_create_values | ( | $ | usrid, |
| $ | timemodified, | ||
| $ | tmp = false, |
||
| $ | guestid = false |
||
| ) |
this function create a complete-record and the related value-records. depending on the $tmp (true/false) the values are saved temporary or permanently
object
| int | $userid | |
| int | $timemodified | |
| boolean | $tmp | |
| string | $guestid | a unique identifier to save temporary data |
Definition at line 2184 of file lib.php.


| feedback_cron | ( | ) |
| feedback_delete_all_completeds | ( | $ | feedbackid | ) |
| feedback_delete_all_items | ( | $ | feedbackid | ) |
| feedback_delete_completed | ( | $ | completedid | ) |
| feedback_delete_completedtmp | ( | $ | tmpcplid | ) |
| feedback_delete_course | ( | $ | course | ) |
| feedback_delete_course_module | ( | $ | id | ) |
this function is called by feedback_delete_userdata() it drops the feedback-instance from the course_module table
object
| int | $id | the id from the coursemodule |
| feedback_delete_instance | ( | $ | id | ) |
| feedback_delete_item | ( | $ | itemid, |
| $ | renumber = true, |
||
| $ | template = false |
||
| ) |
deletes an item and also deletes all related values
object CONTEXT_MODULE
| int | $itemid | |
| boolean | $renumber | should the kept items renumbered Yes/No |
| object | $template | if the template is given so the items are bound to it |
Definition at line 1484 of file lib.php.


| feedback_delete_template | ( | $ | template | ) |
| feedback_encode_target_url | ( | $ | url | ) |
| feedback_extend_settings_navigation | ( | settings_navigation $ | settings, |
| navigation_node $ | feedbacknode | ||
| ) |
Adds module specific settings to the settings block
| settings_navigation | $settings | The settings navigation object |
| navigation_node | $feedbacknode | The node to add module settings to |
Definition at line 2992 of file lib.php.

| feedback_get_all_break_positions | ( | $ | feedbackid | ) |
| feedback_get_complete_users | ( | $ | cm, |
| $ | group = false, |
||
| $ | where = '', |
||
| array $ | params = null, |
||
| $ | sort = '', |
||
| $ | startpage = false, |
||
| $ | pagecount = false |
||
| ) |
get users which have completed a feedback
object CONTEXT_MODULE FEEDBACK_ANONYMOUS_NO
| object | $cm | |
| int | $group | single groupid |
| string | $where | a sql where condition (must end with " AND ") |
| array | parameters used in $where | |
| string | $sort | a table field |
| int | $startpage | |
| int | $pagecount |
Definition at line 927 of file lib.php.

| feedback_get_completeds_group | ( | $ | feedback, |
| $ | groupid = false, |
||
| $ | courseid = false |
||
| ) |
| feedback_get_completeds_group_count | ( | $ | feedback, |
| $ | groupid = false, |
||
| $ | courseid = false |
||
| ) |
| feedback_get_completion_state | ( | $ | course, |
| $ | cm, | ||
| $ | userid, | ||
| $ | type | ||
| ) |
Obtains the automatic completion state for this feedback based on the condition in feedback settings.
| object | $course | Course |
| object | $cm | Course-module |
| int | $userid | User ID |
| bool | $type | Type of comparison (or/and; can be used as return value if no conditions) |
| feedback_get_context | ( | $ | cmid | ) |
| feedback_get_courses_from_sitecourse_map | ( | $ | feedbackid | ) |
| feedback_get_current_completed | ( | $ | feedbackid, |
| $ | tmp = false, |
||
| $ | courseid = false, |
||
| $ | guestid = false |
||
| ) |
if the completion of a feedback will be continued eg. by pagebreak or by multiple submit so the complete must be found. if the param $tmp is set true so all things are related to temporary completeds
object object object
| int | $feedbackid | |
| boolean | $tmp | |
| int | $courseid | |
| string | $guestid |
| feedback_get_depend_candidates_for_item | ( | $ | feedback, |
| $ | item | ||
| ) |
load the available items for the depend item dropdown list shown in the edit_item form
object
| object | $feedback | |
| object | $item | the item of the edit_item form |
Definition at line 1385 of file lib.php.

| feedback_get_feedbacks_from_sitecourse_map | ( | $ | courseid | ) |
gets the feedbacks from table feedback_sitecourse_map. this is used to show the global feedbacks on the feedback block all feedbacks with the following criteria will be selected:
1) all feedbacks which id are listed together with the courseid in sitecoursemap and
2) all feedbacks which not are listed in sitecoursemap
object
| int | $courseid |
Definition at line 2653 of file lib.php.

| feedback_get_group_values | ( | $ | item, |
| $ | groupid = false, |
||
| $ | courseid = false, |
||
| $ | ignore_empty = false |
||
| ) |
get the values of an item depending on the given groupid. if the feedback is anonymous so the values are shuffled
object object
| object | $item | |
| int | $groupid | |
| int | $courseid | |
| bool | $ignore_empty | if this is set true so empty values are not delivered |
Definition at line 2326 of file lib.php.

| feedback_get_incomplete_users | ( | $ | cm, |
| $ | group = false, |
||
| $ | sort = '', |
||
| $ | startpage = false, |
||
| $ | pagecount = false |
||
| ) |
count users which have not completed the feedback
object CONTEXT_MODULE
| object | $cm | |
| int | $group | single groupid |
| string | $sort | |
| int | $startpage | |
| int | $pagecount |
Definition at line 823 of file lib.php.


| feedback_get_item_class | ( | $ | typ | ) |
| feedback_get_item_value | ( | $ | completedid, |
| $ | itemid, | ||
| $ | tmp = false |
||
| ) |
get the value from the given item related to the given completed. the value can come as temporary or as permanently value. the deciding is done by $tmp
object
| int | $completeid | |
| int | $itemid | |
| boolean | $tmp |
Definition at line 2083 of file lib.php.

| feedback_get_last_break_position | ( | $ | feedbackid | ) |
| feedback_get_page_to_continue | ( | $ | feedbackid, |
| $ | courseid = false, |
||
| $ | guestid = false |
||
| ) |
this returns the position where the user can continue the completing.
object object object
| int | $feedbackid | |
| int | $courseid | |
| string | $guestid | this id will be saved temporary and is unique |
Definition at line 1966 of file lib.php.

| feedback_get_participants | ( | $ | feedbackid | ) |
| feedback_get_receivemail_users | ( | $ | cmid, |
| $ | groups = false |
||
| ) |
get users which have the receivemail-capability
CONTEXT_MODULE
| int | $cmid | |
| mixed | $groups | single groupid or array of groupids - group(s) user is in |
Definition at line 1011 of file lib.php.


| feedback_get_recent_mod_activity | ( | &$ | activities, |
| &$ | index, | ||
| $ | timemodified, | ||
| $ | courseid, | ||
| $ | cmid, | ||
| $ | userid = "", |
||
| $ | groupid = "" |
||
| ) |
Returns all users who has completed a specified feedback since a given time many thanks to Manolescu Dorel, who contributed these two functions
object object object object CONTEXT_MODULE
| array | $activities | Passed by reference |
| int | $index | Passed by reference |
| int | $timemodified | Timestamp |
| int | $courseid | |
| int | $cmid | |
| int | $userid | |
| int | $groupid |
Definition at line 333 of file lib.php.

| feedback_get_template_list | ( | $ | course, |
| $ | onlyownorpublic = '' |
||
| ) |
get the list of available templates. if the $onlyown param is set true so only templates from own course will be served this is important for droping templates
object
| object | $course | |
| string | $onlyownorpublic |
Definition at line 1286 of file lib.php.

| feedback_get_viewreports_users | ( | $ | cmid, |
| $ | groups = false |
||
| ) |
| feedback_is_already_submitted | ( | $ | feedbackid, |
| $ | courseid = false |
||
| ) |
| feedback_is_course_in_sitecourse_map | ( | $ | feedbackid, |
| $ | courseid | ||
| ) |
| feedback_is_feedback_in_sitecourse_map | ( | $ | feedbackid | ) |
| feedback_items_from_template | ( | $ | feedback, |
| $ | templateid, | ||
| $ | deleteold = false |
||
| ) |
creates new feedback_item-records from template. if $deleteold is set true so the existing items of the given feedback will be deleted if $deleteold is set false so the new items will be appanded to the old items
object CONTEXT_COURSE CONTEXT_MODULE
| object | $feedback | |
| int | $templateid | |
| boolean | $deleteold |
Definition at line 1173 of file lib.php.

| feedback_load_feedback_items | ( | $ | dir = 'mod/feedback/item' | ) |
load the available item plugins from given subdirectory of $CFG->dirroot the default is "mod/feedback/item"
object
| string | $dir | the subdir |
Definition at line 1340 of file lib.php.


| feedback_move_item | ( | $ | moveitem, |
| $ | pos | ||
| ) |
| feedback_movedown_item | ( | $ | item | ) |
| feedback_moveup_item | ( | $ | item | ) |
| feedback_page_type_list | ( | $ | pagetype, |
| $ | parentcontext, | ||
| $ | currentcontext | ||
| ) |
| feedback_pluginfile | ( | $ | course, |
| $ | cm, | ||
| $ | context, | ||
| $ | filearea, | ||
| $ | args, | ||
| $ | forcedownload | ||
| ) |
Serves the files included in feedback items like label. Implements needed access control ;-)
There are two situations in general where the files will be sent. 1) filearea = item, 2) filearea = template
| object | $course | |
| object | $cm | |
| object | $context | |
| string | $filearea | |
| array | $args | |
| bool | $forcedownload |
Definition at line 151 of file lib.php.

| feedback_print_item_complete | ( | $ | item, |
| $ | value = false, |
||
| $ | highlightrequire = false |
||
| ) |
prints the given item in the completion form. each item-class has an own print_item_complete function implemented.
| object | $item | the item what we want to print out |
| mixed | $value | the value |
| boolean | $highlightrequire | if this set true and the value are false on completing so the item will be highlighted |
Definition at line 1751 of file lib.php.

| feedback_print_item_preview | ( | $ | item | ) |
| feedback_print_item_show_value | ( | $ | item, |
| $ | value = false |
||
| ) |
| feedback_print_numeric_option_list | ( | $ | startval, |
| $ | endval, | ||
| $ | selectval = '', |
||
| $ | interval = 1 |
||
| ) |
prints the option items of a selection-input item (dropdownlist).
| int | $startval | the first value of the list |
| int | $endval | the last value of the list |
| int | $selectval | which item should be selected |
| int | $interval | the stepsize from the first to the last value |
| feedback_print_recent_mod_activity | ( | $ | activity, |
| $ | courseid, | ||
| $ | detail, | ||
| $ | modnames | ||
| ) |
Prints all users who has completed a specified feedback since a given time many thanks to Manolescu Dorel, who contributed these two functions
object
| object | $activity | |
| int | $courseid | |
| string | $detail | |
| array | $modnames |
Definition at line 441 of file lib.php.

| feedback_renumber_items | ( | $ | feedbackid | ) |
| feedback_reset_course_form | ( | $ | course | ) |
Called by course/reset.php and shows the formdata by coursereset. it prints checkboxes for each feedback available at the given course there are two checkboxes: 1) delete userdata and keep the feedback 2) delete userdata and drop the feedback
object FEEDBACK_RESETFORM_RESET FEEDBACK_RESETFORM_DROP
| object | $course |
Definition at line 670 of file lib.php.

| feedback_reset_course_form_defaults | ( | $ | course | ) |
| feedback_reset_course_form_definition | ( | &$ | mform | ) |
Called by course/reset.php
object FEEDBACK_RESETFORM_RESET
| object | $mform | form passed by reference |
| feedback_reset_userdata | ( | $ | data | ) |
This function is used by the reset_course_userdata function in moodlelib. This function will remove all responses from the specified feedback and clean up any related data.
object object FEEDBACK_RESETFORM_RESET FEEDBACK_RESETFORM_DROP
| object | $data | the data submitted from the reset course. |
Definition at line 573 of file lib.php.

| feedback_save_as_template | ( | $ | feedback, |
| $ | name, | ||
| $ | ispublic = 0 |
||
| ) |
creates new template items. all items will be copied and the attribute feedback will be set to 0 and the attribute template will be set to the new templateid
object CONTEXT_MODULE CONTEXT_COURSE
| object | $feedback | |
| string | $name | the name of template shown in the templatelist |
| int | $ispublic | 0:privat 1:public |
Definition at line 1070 of file lib.php.

| feedback_save_guest_values | ( | $ | guestid | ) |
| feedback_save_tmp_values | ( | $ | feedbackcompletedtmp, |
| $ | feedbackcompleted, | ||
| $ | userid | ||
| ) |
| feedback_save_values | ( | $ | usrid, |
| $ | tmp = false |
||
| ) |
this saves the values of an completed. if the param $tmp is set true so the values are saved temporary in table feedback_valuetmp. if there is already a completed and the userid is set so the values are updated. on all other things new value records will be created.
object
| int | $userid | |
| boolean | $tmp |
Definition at line 2031 of file lib.php.

| feedback_scale_used | ( | $ | feedbackid, |
| $ | scaleid | ||
| ) |
| feedback_scale_used_anywhere | ( | $ | scaleid | ) |
| feedback_send_email | ( | $ | cm, |
| $ | feedback, | ||
| $ | course, | ||
| $ | userid | ||
| ) |
sends an email to the teachers of the course where the given feedback is placed.
object object FEEDBACK_ANONYMOUS_NO FORMAT_PLAIN
| object | $cm | the coursemodule-record |
| object | $feedback | |
| object | $course | |
| int | $userid |
Definition at line 2784 of file lib.php.

| feedback_send_email_anonym | ( | $ | cm, |
| $ | feedback, | ||
| $ | course | ||
| ) |
| feedback_send_email_html | ( | $ | info, |
| $ | course, | ||
| $ | cm | ||
| ) |
| feedback_send_email_text | ( | $ | info, |
| $ | course | ||
| ) |
| feedback_set_events | ( | $ | feedback | ) |
| feedback_set_tmp_values | ( | $ | feedbackcompleted | ) |
| feedback_supports | ( | $ | feature | ) |
FEATURE_GROUPS FEATURE_GROUPINGS FEATURE_GROUPMEMBERSONLY FEATURE_MOD_INTRO FEATURE_COMPLETION_TRACKS_VIEWS FEATURE_GRADE_HAS_GRADE FEATURE_GRADE_OUTCOMES
| string | $feature | FEATURE_xx constant for requested feature |
| feedback_switch_item_required | ( | $ | item | ) |
| feedback_update_instance | ( | $ | feedback | ) |
this will update a given instance
object
| object | $feedback | the object given by mod_feedback_mod_form |
Definition at line 111 of file lib.php.

| feedback_update_item | ( | $ | item | ) |
| feedback_update_values | ( | $ | completed, |
| $ | tmp = false |
||
| ) |
this function updates a complete-record and the related value-records. depending on the $tmp (true/false) the values are saved temporary or permanently
object
| object | $completed | |
| boolean | $tmp |
Definition at line 2252 of file lib.php.


| feedback_user_complete | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | feedback | ||
| ) |
| feedback_user_outline | ( | $ | course, |
| $ | user, | ||
| $ | mod, | ||
| $ | feedback | ||
| ) |
Return a small object with summary information about what a user has done with a given particular instance of this module Used for user activity reports. $return->time = the time they did it $return->info = a short text description
| object | $course | |
| object | $user | |
| object | $mod | |
| object | $feedback |