Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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.

param: \core_analytics\analysable $analysable
return: void

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.

param: \cm_info $cm
return: int

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

param: \cm_info $cm
return: int

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.

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

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.

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

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.

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

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

This function must be fast.

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.
return: bool

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

This function must be fast.

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.
return: bool

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

This function must be fast.

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.
return: bool

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)

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

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

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

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

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

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

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

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.

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

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

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

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

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

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

param: \core_analytics\course $course
return: void

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

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

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

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

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.

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

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.

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

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

param: \cm_info $cm
return: void