Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/feedback/lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  mod
 

Local Library of functions for module scorm.


Enumerations

enum  FEEDBACK_ANONYMOUS_YES
enum  FEEDBACK_ANONYMOUS_NO
enum  FEEDBACK_MIN_ANONYMOUS_COUNT_IN_GROUP
enum  FEEDBACK_DECIMAL
enum  FEEDBACK_THOUSAND
enum  FEEDBACK_RESETFORM_RESET
enum  FEEDBACK_RESETFORM_DROP
enum  FEEDBACK_MAX_PIX_LENGTH
enum  FEEDBACK_DEFAULT_PAGE_COUNT

Functions

 feedback_supports ($feature)
 feedback_add_instance ($feedback)
 feedback_update_instance ($feedback)
 feedback_pluginfile ($course, $cm, $context, $filearea, $args, $forcedownload)
 feedback_delete_instance ($id)
 feedback_delete_course ($course)
 feedback_user_outline ($course, $user, $mod, $feedback)
 feedback_get_recent_mod_activity (&$activities, &$index, $timemodified, $courseid, $cmid, $userid="", $groupid="")
 feedback_print_recent_mod_activity ($activity, $courseid, $detail, $modnames)
 feedback_get_completion_state ($course, $cm, $userid, $type)
 feedback_user_complete ($course, $user, $mod, $feedback)
 feedback_cron ()
 feedback_get_participants ($feedbackid)
 feedback_scale_used ($feedbackid, $scaleid)
 feedback_scale_used_anywhere ($scaleid)
 feedback_get_view_actions ()
 feedback_get_post_actions ()
 feedback_reset_userdata ($data)
 feedback_reset_course_form_definition (&$mform)
 feedback_reset_course_form_defaults ($course)
 feedback_reset_course_form ($course)
 feedback_set_events ($feedback)
 feedback_delete_course_module ($id)
 feedback_get_context ($cmid)
 feedback_check_is_switchrole ()
 feedback_get_incomplete_users ($cm, $group=false, $sort= '', $startpage=false, $pagecount=false)
 feedback_count_incomplete_users ($cm, $group=false)
 feedback_count_complete_users ($cm, $group=false)
 feedback_get_complete_users ($cm, $group=false, $where= '', array $params=null, $sort= '', $startpage=false, $pagecount=false)
 feedback_get_viewreports_users ($cmid, $groups=false)
 feedback_get_receivemail_users ($cmid, $groups=false)
 feedback_create_template ($courseid, $name, $ispublic=0)
 feedback_save_as_template ($feedback, $name, $ispublic=0)
 feedback_delete_template ($template)
 feedback_items_from_template ($feedback, $templateid, $deleteold=false)
 feedback_get_template_list ($course, $onlyownorpublic= '')
 feedback_get_item_class ($typ)
 feedback_load_feedback_items ($dir= 'mod/feedback/item')
 feedback_load_feedback_items_options ()
 feedback_get_depend_candidates_for_item ($feedback, $item)
 feedback_create_item ($data)
 feedback_update_item ($item)
 feedback_delete_item ($itemid, $renumber=true, $template=false)
 feedback_delete_all_items ($feedbackid)
 feedback_switch_item_required ($item)
 feedback_renumber_items ($feedbackid)
 feedback_moveup_item ($item)
 feedback_movedown_item ($item)
 feedback_move_item ($moveitem, $pos)
 feedback_print_item_preview ($item)
 feedback_print_item_complete ($item, $value=false, $highlightrequire=false)
 feedback_print_item_show_value ($item, $value=false)
 feedback_set_tmp_values ($feedbackcompleted)
 feedback_save_tmp_values ($feedbackcompletedtmp, $feedbackcompleted, $userid)
 feedback_delete_completedtmp ($tmpcplid)
 feedback_create_pagebreak ($feedbackid)
 feedback_get_all_break_positions ($feedbackid)
 feedback_get_last_break_position ($feedbackid)
 feedback_get_page_to_continue ($feedbackid, $courseid=false, $guestid=false)
 feedback_save_values ($usrid, $tmp=false)
 feedback_save_guest_values ($guestid)
 feedback_get_item_value ($completedid, $itemid, $tmp=false)
 feedback_compare_item_value ($completedid, $itemid, $dependvalue, $tmp=false)
 feedback_check_values ($firstitem, $lastitem)
 feedback_create_values ($usrid, $timemodified, $tmp=false, $guestid=false)
 feedback_update_values ($completed, $tmp=false)
 feedback_get_group_values ($item, $groupid=false, $courseid=false, $ignore_empty=false)
 feedback_is_already_submitted ($feedbackid, $courseid=false)
 feedback_get_current_completed ($feedbackid, $tmp=false, $courseid=false, $guestid=false)
 feedback_get_completeds_group ($feedback, $groupid=false, $courseid=false)
 feedback_get_completeds_group_count ($feedback, $groupid=false, $courseid=false)
 feedback_delete_all_completeds ($feedbackid)
 feedback_delete_completed ($completedid)
 feedback_is_course_in_sitecourse_map ($feedbackid, $courseid)
 feedback_is_feedback_in_sitecourse_map ($feedbackid)
 feedback_get_feedbacks_from_sitecourse_map ($courseid)
 feedback_get_courses_from_sitecourse_map ($feedbackid)
 feedback_clean_up_sitecourse_map ()
 feedback_print_numeric_option_list ($startval, $endval, $selectval= '', $interval=1)
 feedback_send_email ($cm, $feedback, $course, $userid)
 feedback_send_email_anonym ($cm, $feedback, $course)
 feedback_send_email_text ($info, $course)
 feedback_send_email_html ($info, $course, $cm)
 feedback_encode_target_url ($url)
 feedback_extend_settings_navigation (settings_navigation $settings, navigation_node $feedbacknode)
 feedback_init_feedback_session ()
 feedback_page_type_list ($pagetype, $parentcontext, $currentcontext)

Enumeration Type Documentation

Definition at line 32 of file lib.php.

Include eventslib.php Include calendar/lib.php

Definition at line 31 of file lib.php.

Definition at line 34 of file lib.php.

Definition at line 39 of file lib.php.

Definition at line 38 of file lib.php.

Definition at line 33 of file lib.php.

Definition at line 37 of file lib.php.

Definition at line 36 of file lib.php.

Definition at line 35 of file lib.php.


Function Documentation

feedback_add_instance ( feedback)

this will create a new instance and return the id number of the new instance.

object

Parameters:
object$feedbackthe object given by mod_feedback_mod_form
Returns:
int

Definition at line 77 of file lib.php.

Here is the call graph for this function:

returns true if the current role is faked by switching role feature

object

Returns:
boolean

Definition at line 800 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

Parameters:
int$firstitemthe position of firstitem for checking
int$lastitemthe position of lastitem for checking
Returns:
boolean

Definition at line 2128 of file lib.php.

Here is the call graph for this function:

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

Returns:
void

Definition at line 2727 of file lib.php.

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

Parameters:
int$completeid
int$itemid
mixed$dependvalue
boolean$tmp
Returns:
bool

Definition at line 2104 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_count_complete_users ( cm,
group = false 
)

count users which have completed a feedback

object FEEDBACK_ANONYMOUS_NO

Parameters:
object$cm
int$groupsingle groupid
Returns:
int count of userrecords

Definition at line 891 of file lib.php.

feedback_count_incomplete_users ( cm,
group = false 
)

count users which have not completed the feedback

object

Parameters:
object$cm
int$groupsingle groupid
Returns:
int count of userrecords

Definition at line 875 of file lib.php.

Here is the call graph for this function:

feedback_create_item ( data)

creates a new item-record

object

Parameters:
object$datathe data from edit_item_form
Returns:
int the new itemid

Definition at line 1418 of file lib.php.

Here is the call graph for this function:

feedback_create_pagebreak ( feedbackid)

this creates a pagebreak. a pagebreak is a special kind of item

object

Parameters:
int$feedbackid
Returns:
mixed false if there already is a pagebreak on last position or the id of the pagebreak-item

Definition at line 1897 of file lib.php.

Here is the call graph for this function:

feedback_create_template ( courseid,
name,
ispublic = 0 
)

creates a new template-record.

object

Parameters:
int$courseid
string$namethe name of template shown in the templatelist
int$ispublic0:privat 1:public
Returns:
int the new templateid

Definition at line 1045 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
int$userid
int$timemodified
boolean$tmp
string$guestida unique identifier to save temporary data
Returns:
mixed false on error or the completedid

Definition at line 2184 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns:
bool true

Definition at line 516 of file lib.php.

feedback_delete_all_completeds ( feedbackid)

deletes all completed-recordsets from a feedback. all related data such as values also will be deleted

object

Parameters:
int$feedbackid
Returns:
void

Definition at line 2552 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_delete_all_items ( feedbackid)

deletes all items of the given feedbackid

object

Parameters:
int$feedbackid
Returns:
void

Definition at line 1545 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_delete_completed ( completedid)

deletes a completed given by completedid. all related data such values or tracking data also will be deleted

object

Parameters:
int$completedid
Returns:
boolean

Definition at line 2571 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

deletes the given temporary completed and all related temporary values

object

Parameters:
int$tmpcplid
Returns:
void

Definition at line 1876 of file lib.php.

feedback_delete_course ( course)

this is called after deleting all instances if the course will be deleted. only templates have to be deleted

object

Parameters:
object$course
Returns:
boolean

Definition at line 291 of file lib.php.

this function is called by feedback_delete_userdata() it drops the feedback-instance from the course_module table

object

Parameters:
int$idthe id from the coursemodule
Returns:
boolean

Definition at line 759 of file lib.php.

this will delete a given instance. all referenced data also will be deleted

object

Parameters:
int$idthe instanceid of feedback
Returns:
boolean

Definition at line 250 of file lib.php.

Here is the call graph for this function:

feedback_delete_item ( itemid,
renumber = true,
template = false 
)

deletes an item and also deletes all related values

object CONTEXT_MODULE

Parameters:
int$itemid
boolean$renumbershould the kept items renumbered Yes/No
object$templateif the template is given so the items are bound to it
Returns:
void

Definition at line 1484 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_delete_template ( template)

deletes all feedback_items related to the given template id

object CONTEXT_COURSE

Parameters:
object$templatethe template
Returns:
void

Definition at line 1149 of file lib.php.

Here is the call graph for this function:

Parameters:
string$url
Returns:
string

Definition at line 2977 of file lib.php.

Adds module specific settings to the settings block

Parameters:
settings_navigation$settingsThe settings navigation object
navigation_node$feedbacknodeThe node to add module settings to

Definition at line 2992 of file lib.php.

Here is the call graph for this function:

get all positions of pagebreaks in the given feedback

object

Parameters:
int$feedbackid
Returns:
array all ordered pagebreak positions

Definition at line 1931 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
object$cm
int$groupsingle groupid
string$wherea sql where condition (must end with " AND ")
arrayparameters used in $where
string$sorta table field
int$startpage
int$pagecount
Returns:
object the userrecords

Definition at line 927 of file lib.php.

Here is the call graph for this function:

feedback_get_completeds_group ( feedback,
groupid = false,
courseid = false 
)

get the completeds depending on the given groupid.

object object

Parameters:
object$feedback
int$groupid
int$courseid
Returns:
mixed array of found completeds otherwise false

Definition at line 2476 of file lib.php.

Here is the caller graph for this function:

feedback_get_completeds_group_count ( feedback,
groupid = false,
courseid = false 
)

get the count of completeds depending on the given groupid.

object object

Parameters:
object$feedback
int$groupid
int$courseid
Returns:
mixed count of completeds or false

Definition at line 2523 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_get_completion_state ( course,
cm,
userid,
type 
)

Obtains the automatic completion state for this feedback based on the condition in feedback settings.

Parameters:
object$courseCourse
object$cmCourse-module
int$useridUser ID
bool$typeType of comparison (or/and; can be used as return value if no conditions)
Returns:
bool True if completed, false if not, $type if conditions not set.

Definition at line 482 of file lib.php.

feedback_get_context ( cmid)

returns the context-id related to the given coursemodule-id

object $context

Parameters:
int$cmidthe coursemodule-id
Returns:
object $context

Definition at line 781 of file lib.php.

Here is the call graph for this function:

gets the courses from table feedback_sitecourse_map.

object

Parameters:
int$feedbackid
Returns:
array the course-records

Definition at line 2706 of file lib.php.

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

Parameters:
int$feedbackid
boolean$tmp
int$courseid
string$guestid
Returns:
int the id of the found completed

Definition at line 2419 of file lib.php.

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

Parameters:
object$feedback
object$itemthe item of the edit_item form
Returns:
array all items except the item $item, labels and pagebreaks

Definition at line 1385 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
int$courseid
Returns:
array the feedback-records

Definition at line 2653 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
object$item
int$groupid
int$courseid
bool$ignore_emptyif this is set true so empty values are not delivered
Returns:
array the value-records

Definition at line 2326 of file lib.php.

Here is the caller graph for this function:

feedback_get_incomplete_users ( cm,
group = false,
sort = '',
startpage = false,
pagecount = false 
)

count users which have not completed the feedback

object CONTEXT_MODULE

Parameters:
object$cm
int$groupsingle groupid
string$sort
int$startpage
int$pagecount
Returns:
object the userrecords

Definition at line 823 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load the lib.php from item-plugin-dir and returns the instance of the itemclass

object

Parameters:
object$item
Returns:
object the instanz of itemclass

Definition at line 1320 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
int$completeid
int$itemid
boolean$tmp
Returns:
mixed the value, the type depends on plugin-definition

Definition at line 2083 of file lib.php.

Here is the caller graph for this function:

get the position of the last pagebreak

Parameters:
int$feedbackid
Returns:
int the position of the last pagebreak

Definition at line 1948 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_get_page_to_continue ( feedbackid,
courseid = false,
guestid = false 
)

this returns the position where the user can continue the completing.

object object object

Parameters:
int$feedbackid
int$courseid
string$guestidthis id will be saved temporary and is unique
Returns:
int the position to continue

Definition at line 1966 of file lib.php.

Here is the call graph for this function:

feedback_get_participants ( feedbackid)
Todo:
: deprecated - to be deleted in 2.2
Returns:
bool false

Definition at line 524 of file lib.php.

Returns:
array

Definition at line 557 of file lib.php.

feedback_get_receivemail_users ( cmid,
groups = false 
)

get users which have the receivemail-capability

CONTEXT_MODULE

Parameters:
int$cmid
mixed$groupssingle groupid or array of groupids - group(s) user is in
Returns:
object the userrecords

Definition at line 1011 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Parameters:
array$activitiesPassed by reference
int$indexPassed by reference
int$timemodifiedTimestamp
int$courseid
int$cmid
int$userid
int$groupid
Returns:
void

Definition at line 333 of file lib.php.

Here is the call graph for this function:

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

Parameters:
object$course
string$onlyownorpublic
Returns:
array the template recordsets

Definition at line 1286 of file lib.php.

Here is the caller graph for this function:

Returns:
array

Definition at line 550 of file lib.php.

feedback_get_viewreports_users ( cmid,
groups = false 
)

get users which have the viewreports-capability

CONTEXT_MODULE

Parameters:
int$cmid
mixed$groupssingle groupid or array of groupids - group(s) user is in
Returns:
object the userrecords

Definition at line 983 of file lib.php.

Here is the call graph for this function:

Definition at line 3047 of file lib.php.

feedback_is_already_submitted ( feedbackid,
courseid = false 
)

check for multiple_submit = false. if the feedback is global so the courseid must be given

object object

Parameters:
int$feedbackid
int$courseid
Returns:
boolean true if the feedback already is submitted otherwise false

Definition at line 2387 of file lib.php.

feedback_is_course_in_sitecourse_map ( feedbackid,
courseid 
)

checks if the course and the feedback is in the table feedback_sitecourse_map.

object

Parameters:
int$feedbackid
int$courseid
Returns:
int the count of records

Definition at line 2623 of file lib.php.

checks if the feedback is in the table feedback_sitecourse_map.

object

Parameters:
int$feedbackid
Returns:
boolean

Definition at line 2636 of file lib.php.

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

Parameters:
object$feedback
int$templateid
boolean$deleteold

Definition at line 1173 of file lib.php.

Here is the call graph for this function:

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

Parameters:
string$dirthe subdir
Returns:
array pluginnames as string

Definition at line 1340 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

load the available item plugins to use as dropdown-options

object

Returns:
array pluginnames as string

Definition at line 1360 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_move_item ( moveitem,
pos 
)

here the position of the given item will be set to the value in $pos

object

Parameters:
object$moveitem
int$pos
Returns:
boolean

Definition at line 1697 of file lib.php.

Here is the call graph for this function:

this increased the position of the given item

object

Parameters:
object$item
Returns:
bool

Definition at line 1666 of file lib.php.

Here is the call graph for this function:

feedback_moveup_item ( item)

this decreases the position of the given item

object

Parameters:
object$item
Returns:
bool

Definition at line 1629 of file lib.php.

Here is the call graph for this function:

feedback_page_type_list ( pagetype,
parentcontext,
currentcontext 
)

Return a list of page types

Parameters:
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block

Definition at line 3063 of file lib.php.

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

Parameters:
object$course
object$cm
object$context
string$filearea
array$args
bool$forcedownload
Returns:
bool false if file not found, does not return if found - justsend the file

Definition at line 151 of file lib.php.

Here is the call graph for this function:

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.

Parameters:
object$itemthe item what we want to print out
mixed$valuethe value
boolean$highlightrequireif this set true and the value are false on completing so the item will be highlighted
Returns:
void

Definition at line 1751 of file lib.php.

Here is the call graph for this function:

prints the given item as a preview. each item-class has an own print_item_preview function implemented.

object

Parameters:
object$itemthe item what we want to print out
Returns:
void

Definition at line 1732 of file lib.php.

Here is the call graph for this function:

feedback_print_item_show_value ( item,
value = false 
)

prints the given item in the show entries page. each item-class has an own print_item_show_value function implemented.

Parameters:
object$itemthe item what we want to print out
mixed$value
Returns:
void

Definition at line 1770 of file lib.php.

Here is the call graph for this function:

feedback_print_numeric_option_list ( startval,
endval,
selectval = '',
interval = 1 
)

prints the option items of a selection-input item (dropdownlist).

Parameters:
int$startvalthe first value of the list
int$endvalthe last value of the list
int$selectvalwhich item should be selected
int$intervalthe stepsize from the first to the last value
Returns:
void

Definition at line 2760 of file lib.php.

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

Parameters:
object$activity
int$courseid
string$detail
array$modnames
Returns:
void Output is echo'd

Definition at line 441 of file lib.php.

Here is the call graph for this function:

feedback_renumber_items ( feedbackid)

renumbers all items of the given feedbackid

object

Parameters:
int$feedbackid
Returns:
void

Definition at line 1609 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
object$course
Returns:
void

Definition at line 670 of file lib.php.

Here is the call graph for this function:

Course reset form defaults.

object FEEDBACK_RESETFORM_RESET

Parameters:
object$course

Definition at line 644 of file lib.php.

Called by course/reset.php

object FEEDBACK_RESETFORM_RESET

Parameters:
object$mformform passed by reference

Definition at line 622 of file lib.php.

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

Parameters:
object$datathe data submitted from the reset course.
Returns:
array status array

Definition at line 573 of file lib.php.

Here is the call graph for this function:

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

Parameters:
object$feedback
string$namethe name of template shown in the templatelist
int$ispublic0:privat 1:public
Returns:
boolean

Definition at line 1070 of file lib.php.

Here is the call graph for this function:

this saves the values from anonymous user such as guest on the main-site

object

Parameters:
string$guestidthe unique guestidentifier
Returns:
mixed false on error or the completeid

Definition at line 2059 of file lib.php.

Here is the call graph for this function:

feedback_save_tmp_values ( feedbackcompletedtmp,
feedbackcompleted,
userid 
)

this saves the temporary saved values permanently

object

Parameters:
object$feedbackcompletedtmpthe temporary completed
object$feedbackcompletedthe target completed
int$userid
Returns:
int the id of the completed

Definition at line 1821 of file lib.php.

Here is the call graph for this function:

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

Parameters:
int$userid
boolean$tmp
Returns:
mixed false on error or the completeid

Definition at line 2031 of file lib.php.

Here is the call graph for this function:

feedback_scale_used ( feedbackid,
scaleid 
)
Returns:
bool false

Definition at line 532 of file lib.php.

Checks if scale is being used by any instance of feedback

This is used to find out if scale used anywhere

Parameters:
$scaleidint
Returns:
boolean True if the scale is used by any assignment

Definition at line 543 of file lib.php.

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

Parameters:
object$cmthe coursemodule-record
object$feedback
object$course
int$userid
Returns:
void

Definition at line 2784 of file lib.php.

Here is the call graph for this function:

feedback_send_email_anonym ( cm,
feedback,
course 
)

sends an email to the teachers of the course where the given feedback is placed.

object FORMAT_PLAIN

Parameters:
object$cmthe coursemodule-record
object$feedback
object$course
Returns:
void

Definition at line 2882 of file lib.php.

Here is the call graph for this function:

feedback_send_email_html ( info,
course,
cm 
)

send the html-part of the email

object

Parameters:
object$infoincludes some infos about the feedback you want to send
object$course
Returns:
string the text you want to post

Definition at line 2955 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_send_email_text ( info,
course 
)

send the text-part of the email

Parameters:
object$infoincludes some infos about the feedback you want to send
object$course
Returns:
string the text you want to post

Definition at line 2935 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_set_events ( feedback)

This creates new events given as timeopen and closeopen by $feedback.

object

Parameters:
object$feedback
Returns:
void

Definition at line 699 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_set_tmp_values ( feedbackcompleted)

if the user completes a feedback and there is a pagebreak so the values are saved temporary. the values are not saved permanently until the user click on save button

object

Parameters:
object$feedbackcompleted
Returns:
object temporary saved completed-record

Definition at line 1789 of file lib.php.

feedback_supports ( feature)

FEATURE_GROUPS FEATURE_GROUPINGS FEATURE_GROUPMEMBERSONLY FEATURE_MOD_INTRO FEATURE_COMPLETION_TRACKS_VIEWS FEATURE_GRADE_HAS_GRADE FEATURE_GRADE_OUTCOMES

Parameters:
string$featureFEATURE_xx constant for requested feature
Returns:
mixed True if module supports feature, null if doesn't know

Definition at line 52 of file lib.php.

this function toggled the item-attribute required (yes/no)

object

Parameters:
object$item
Returns:
boolean

Definition at line 1589 of file lib.php.

Here is the call graph for this function:

feedback_update_instance ( feedback)

this will update a given instance

object

Parameters:
object$feedbackthe object given by mod_feedback_mod_form
Returns:
boolean

Definition at line 111 of file lib.php.

Here is the call graph for this function:

feedback_update_item ( item)

save the changes of a given item.

object

Parameters:
object$item
Returns:
boolean

Definition at line 1469 of file lib.php.

Here is the caller graph for this function:

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

Parameters:
object$completed
boolean$tmp
Returns:
int the completedid

Definition at line 2252 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

feedback_user_complete ( course,
user,
mod,
feedback 
)

Print a detailed representation of what a user has done with a given particular instance of this module, for user activity reports.

Parameters:
object$course
object$user
object$mod
object$feedback
Returns:
bool

Definition at line 509 of file lib.php.

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

Parameters:
object$course
object$user
object$mod
object$feedback
Returns:
object

Definition at line 311 of file lib.php.

 All Data Structures Namespaces Files Functions Variables Enumerations