Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Community of inquiry abstract indicator.

Copyright: 2017 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 1002 lines (36 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: community_of_inquiry_activity  - X-Ref

Community of inquire abstract indicator.

fill_per_analysable_caches(\core_analytics\analysable $analysable)   X-Ref
Fetch the course grades of this activity type instances.

return: void
param: \core_analytics\analysable $analysable

get_activity_type()   X-Ref
Returns the activity type. No point in changing this class in children classes.


get_cognitive_depth_level(\cm_info $cm)   X-Ref
Returns the potential level of cognitive depth.

return: int
param: \cm_info $cm

get_social_breadth_level(\cm_info $cm)   X-Ref
Returns the potential level of social breadth.

return: int
param: \cm_info $cm

required_sample_data()   X-Ref
required_sample_data

return: string[]

any_log($contextid, $user)   X-Ref
Do activity logs contain any log of user in this context?

If user is empty we look for any log in this context.

return: bool
param: int $contextid
param: \stdClass|false $user

any_write_log($contextid, $user)   X-Ref
Do activity logs contain any write log of user in this context?

If user is empty we look for any write log in this context.

return: bool
param: int $contextid
param: \stdClass|false $user

any_feedback($action, \cm_info $cm, $contextid, $user)   X-Ref
Is there any feedback activity log for this user in this context?

This method returns true if $user is empty and there is any feedback activity logs.

return: bool
param: string $action
param: \cm_info $cm
param: int $contextid
param: \stdClass|false $user

feedback_viewed(\cm_info $cm, $contextid, $userid, $after = null)   X-Ref
$cm is used for this method overrides.

This function must be fast.

return: bool
param: \cm_info $cm
param: mixed $contextid
param: mixed $userid
param: int $after Timestamp, defaults to the graded date or false if we don't check the date.

feedback_replied(\cm_info $cm, $contextid, $userid, $after = null)   X-Ref
$cm is used for this method overrides.

This function must be fast.

return: bool
param: \cm_info $cm
param: mixed $contextid
param: mixed $userid
param: int $after Timestamp, defaults to the graded date or false if we don't check the date.

feedback_submitted(\cm_info $cm, $contextid, $userid, $after = null)   X-Ref
$cm is used for this method overrides.

This function must be fast.

return: bool
param: \cm_info $cm
param: mixed $contextid
param: mixed $userid
param: int $after Timestamp, defaults to the graded date or false if we don't check the date.

feedback_viewed_events()   X-Ref
Returns the list of events that involve viewing feedback from other users.

return: string[]

feedback_replied_events()   X-Ref
Returns the list of events that involve replying to feedback from other users.

return: string[]

feedback_submitted_events()   X-Ref
Returns the list of events that involve submitting something after receiving feedback from other users.

return: string[]

feedback_post_action(\cm_info $cm, $contextid, $userid, $eventnames, $after = null)   X-Ref
Whether this user in this context did any of the provided actions (events)

return: bool
param: \cm_info $cm
param: int $contextid
param: int $userid
param: string[] $eventnames
param: int|false $after

get_graded_date($contextid, $userid, $checkfeedback = false)   X-Ref
Returns the date a user was graded.

return: int|false
param: int $contextid
param: int $userid
param: bool $checkfeedback Check that the student was graded or check that feedback was given

get_student_activities($sampleid, $tablename, $starttime, $endtime)   X-Ref
Returns the activities the user had access to between a time period.

return: array
param: int $sampleid
param: string $tablename
param: int $starttime
param: int $endtime

fetch_activity_logs($activities, $starttime = false, $endtime = false)   X-Ref
Fetch acitivity logs from database

return: array
param: array $activities
param: int $starttime
param: int $endtime

feedback_check_grades()   X-Ref
Whether grades should be checked or not when looking for feedback.

return: bool

cognitive_calculate_sample($sampleid, $tablename, $starttime = false, $endtime = false)   X-Ref
Calculates the cognitive depth of a sample.

return: float|int|null
param: int $sampleid
param: string $tablename
param: int $starttime
param: int $endtime

social_calculate_sample($sampleid, $tablename, $starttime = false, $endtime = false)   X-Ref
Calculates the social breadth of a sample.

return: float|int|null
param: int $sampleid
param: string $tablename
param: int $starttime
param: int $endtime

calculate_sample($sampleid, $tablename, $starttime = false, $endtime = false)   X-Ref
calculate_sample

return: float|int|null
param: int $sampleid
param: string $tablename
param: int $starttime
param: int $endtime

fetch_student_grades(\core_analytics\course $course)   X-Ref
Gets the course student grades.

return: void
param: \core_analytics\course $course

get_activities($starttime, $endtime, $student = false)   X-Ref
Guesses all activities that were available during a period of time.

return: array
param: int $starttime
param: int $endtime
param: \stdClass|false $student

activity_completed_by(\cm_info $activity, $starttime, $endtime, $student = false)   X-Ref
Was the activity supposed to be completed during the provided time range?.

return: bool
param: \cm_info $activity
param: int $starttime
param: int $endtime
param: \stdClass|false $student

activity_type_completed_by(\cm_info $activity, $starttime, $endtime, $student = false)   X-Ref
True if the activity is due or it has been closed during this period, false if during another period, null if no due time.

It can be overwritten by activities that allow teachers to set a due date or a time close separately
from Moodle availability system. Note that in most of the cases overwriting get_timeclose_field should
be enough.

Returns true or false if the time close date falls into the provided time range. Null otherwise.

return: null
param: \cm_info $activity
param: int $starttime
param: int $endtime
param: \stdClass|false $student

get_timeclose_field()   X-Ref
Returns the name of the field that controls activity availability.

Should be overwritten by activities that allow teachers to set a due date or a time close separately
from Moodle availability system.

Just 1 field will not be enough for all cases, but for the most simple ones without
overrides and stuff like that.

return: null|string

availability_completed_by(\core_availability\info $info, $starttime, $endtime)   X-Ref
Check if the activity/section should have been completed during the provided period according to its availability rules.

return: bool|null
param: \core_availability\info $info
param: int $starttime
param: int $endtime

fill_instance_data(\cm_info $cm)   X-Ref
Fills in activity instance data.

return: void
param: \cm_info $cm