diff --git a/analytics/classes/local/indicator/community_of_inquiry_activity.php b/analytics/classes/local/indicator/community_of_inquiry_activity.php index 8a886eb69fe..1e7da1dbd03 100644 --- a/analytics/classes/local/indicator/community_of_inquiry_activity.php +++ b/analytics/classes/local/indicator/community_of_inquiry_activity.php @@ -60,6 +60,56 @@ abstract class community_of_inquiry_activity extends linear { */ const INDICATOR_SOCIAL = "social"; + /** + * Constant for this cognitive level. + */ + const COGNITIVE_LEVEL_1 = 1; + + /** + * Constant for this cognitive level. + */ + const COGNITIVE_LEVEL_2 = 2; + + /** + * Constant for this cognitive level. + */ + const COGNITIVE_LEVEL_3 = 3; + + /** + * Constant for this cognitive level. + */ + const COGNITIVE_LEVEL_4 = 4; + + /** + * Constant for this cognitive level. + */ + const COGNITIVE_LEVEL_5 = 5; + + /** + * Constant for this social level. + */ + const SOCIAL_LEVEL_1 = 1; + + /** + * Constant for this social level. + */ + const SOCIAL_LEVEL_2 = 2; + + /** + * Constant for this social level. + */ + const SOCIAL_LEVEL_3 = 3; + + /** + * Constant for this social level. + */ + const SOCIAL_LEVEL_4 = 4; + + /** + * Constant for this social level. + */ + const SOCIAL_LEVEL_5 = 5; + /** * Max cognitive depth level accepted. */ @@ -530,13 +580,15 @@ abstract class community_of_inquiry_activity extends linear { foreach ($useractivities as $contextid => $cm) { $potentiallevel = $this->get_cognitive_depth_level($cm); - if (!is_int($potentiallevel) || $potentiallevel > self::MAX_COGNITIVE_LEVEL || $potentiallevel < 1) { + if (!is_int($potentiallevel) + || $potentiallevel > self::MAX_COGNITIVE_LEVEL + || $potentiallevel < self::COGNITIVE_LEVEL_1) { throw new \coding_exception('Activities\' potential cognitive depth go from 1 to 5.'); } $scoreperlevel = $scoreperactivity / $potentiallevel; switch ($potentiallevel) { - case 5: + case self::COGNITIVE_LEVEL_5: // Cognitive level 5 is to submit after feedback. if ($this->any_feedback('submitted', $cm, $contextid, $user)) { $score += $scoreperlevel * 5; @@ -544,7 +596,7 @@ abstract class community_of_inquiry_activity extends linear { } // The user didn't reach the activity max cognitive depth, continue with level 2. - case 4: + case self::COGNITIVE_LEVEL_4: // Cognitive level 4 is to comment on feedback. if ($this->any_feedback('replied', $cm, $contextid, $user)) { $score += $scoreperlevel * 4; @@ -552,7 +604,7 @@ abstract class community_of_inquiry_activity extends linear { } // The user didn't reach the activity max cognitive depth, continue with level 2. - case 3: + case self::COGNITIVE_LEVEL_3: // Cognitive level 3 is to view feedback. if ($this->any_feedback('viewed', $cm, $contextid, $user)) { @@ -562,7 +614,7 @@ abstract class community_of_inquiry_activity extends linear { } // The user didn't reach the activity max cognitive depth, continue with level 2. - case 2: + case self::COGNITIVE_LEVEL_2: // Cognitive depth level 2 is to submit content. if ($this->any_write_log($contextid, $user)) { @@ -571,7 +623,7 @@ abstract class community_of_inquiry_activity extends linear { } // The user didn't reach the activity max cognitive depth, continue with level 1. - case 1: + case self::COGNITIVE_LEVEL_1: // Cognitive depth level 1 is just accessing the activity. if ($this->any_log($contextid, $user)) { @@ -617,16 +669,18 @@ abstract class community_of_inquiry_activity extends linear { foreach ($useractivities as $contextid => $cm) { $potentiallevel = $this->get_social_breadth_level($cm); - if (!is_int($potentiallevel) || $potentiallevel > self::MAX_SOCIAL_LEVEL || $potentiallevel < 1) { + if (!is_int($potentiallevel) + || $potentiallevel > self::MAX_SOCIAL_LEVEL + || $potentiallevel < self::SOCIAL_LEVEL_1) { throw new \coding_exception('Activities\' potential social breadth go from 1 to ' . community_of_inquiry_activity::MAX_SOCIAL_LEVEL . '.'); } $scoreperlevel = $scoreperactivity / $potentiallevel; switch ($potentiallevel) { - case 2: - case 3: - case 4: - case 5: + case self::SOCIAL_LEVEL_2: + case self::SOCIAL_LEVEL_3: + case self::SOCIAL_LEVEL_4: + case self::SOCIAL_LEVEL_5: // Core activities social breadth only reaches level 2, until core activities social // breadth do not reach level 5 we limit it to what we currently support, which is level 2. @@ -639,7 +693,7 @@ abstract class community_of_inquiry_activity extends linear { } // The user didn't reach the activity max social breadth, continue with level 1. - case 1: + case self::SOCIAL_LEVEL_1: // Social breadth level 1 is just accessing the activity. if ($this->any_log($contextid, $user)) { $score += $scoreperlevel; diff --git a/mod/assign/classes/analytics/indicator/cognitive_depth.php b/mod/assign/classes/analytics/indicator/cognitive_depth.php index f75dd47a5a8..08fbf49bd62 100644 --- a/mod/assign/classes/analytics/indicator/cognitive_depth.php +++ b/mod/assign/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 5; + return self::COGNITIVE_LEVEL_5; } /** diff --git a/mod/assign/classes/analytics/indicator/social_breadth.php b/mod/assign/classes/analytics/indicator/social_breadth.php index 66f0d48fbf6..fa3790564a8 100644 --- a/mod/assign/classes/analytics/indicator/social_breadth.php +++ b/mod/assign/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/book/classes/analytics/indicator/cognitive_depth.php b/mod/book/classes/analytics/indicator/cognitive_depth.php index 0fdf7c99828..ff5dc909c15 100644 --- a/mod/book/classes/analytics/indicator/cognitive_depth.php +++ b/mod/book/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/book/classes/analytics/indicator/social_breadth.php b/mod/book/classes/analytics/indicator/social_breadth.php index e58e6a0eb16..279fa0306f2 100644 --- a/mod/book/classes/analytics/indicator/social_breadth.php +++ b/mod/book/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/chat/classes/analytics/indicator/cognitive_depth.php b/mod/chat/classes/analytics/indicator/cognitive_depth.php index 48900528714..dc25e0befc4 100644 --- a/mod/chat/classes/analytics/indicator/cognitive_depth.php +++ b/mod/chat/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 4; + return self::COGNITIVE_LEVEL_4; } } diff --git a/mod/chat/classes/analytics/indicator/social_breadth.php b/mod/chat/classes/analytics/indicator/social_breadth.php index 620e6a8d50d..97b2cf4ba48 100644 --- a/mod/chat/classes/analytics/indicator/social_breadth.php +++ b/mod/chat/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/choice/classes/analytics/indicator/cognitive_depth.php b/mod/choice/classes/analytics/indicator/cognitive_depth.php index 6517393cffe..48cec079cfa 100644 --- a/mod/choice/classes/analytics/indicator/cognitive_depth.php +++ b/mod/choice/classes/analytics/indicator/cognitive_depth.php @@ -55,9 +55,9 @@ class cognitive_depth extends activity_base { if ($this->choicedata[$cm->instance]->showresults == 0 || $this->choicedata[$cm->instance]->showresults == 4) { // Results are not shown to students or are always shown. - return 2; + return self::COGNITIVE_LEVEL_2; } - return 3; + return self::COGNITIVE_LEVEL_3; } } diff --git a/mod/choice/classes/analytics/indicator/social_breadth.php b/mod/choice/classes/analytics/indicator/social_breadth.php index 8d119ca3b7b..26c0a7dd4bb 100644 --- a/mod/choice/classes/analytics/indicator/social_breadth.php +++ b/mod/choice/classes/analytics/indicator/social_breadth.php @@ -52,6 +52,6 @@ class social_breadth extends activity_base { public function get_social_breadth_level(\cm_info $cm) { $this->fill_choice_data($cm); - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/data/classes/analytics/indicator/cognitive_depth.php b/mod/data/classes/analytics/indicator/cognitive_depth.php index a5278388be6..8ac7fdbe475 100644 --- a/mod/data/classes/analytics/indicator/cognitive_depth.php +++ b/mod/data/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 2; + return self::COGNITIVE_LEVEL_2; } } diff --git a/mod/data/classes/analytics/indicator/social_breadth.php b/mod/data/classes/analytics/indicator/social_breadth.php index 2309c698912..3f3cce2c517 100644 --- a/mod/data/classes/analytics/indicator/social_breadth.php +++ b/mod/data/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/feedback/classes/analytics/indicator/cognitive_depth.php b/mod/feedback/classes/analytics/indicator/cognitive_depth.php index cf5403fec06..0890982e329 100644 --- a/mod/feedback/classes/analytics/indicator/cognitive_depth.php +++ b/mod/feedback/classes/analytics/indicator/cognitive_depth.php @@ -55,8 +55,8 @@ class cognitive_depth extends activity_base { if (!empty($this->publishstats[$cm->instance])) { // If stats are published we count that the user viewed feedback. - return 3; + return self::COGNITIVE_LEVEL_3; } - return 2; + return self::COGNITIVE_LEVEL_2; } } diff --git a/mod/feedback/classes/analytics/indicator/social_breadth.php b/mod/feedback/classes/analytics/indicator/social_breadth.php index 64ba6783e8a..d1c7e276f73 100644 --- a/mod/feedback/classes/analytics/indicator/social_breadth.php +++ b/mod/feedback/classes/analytics/indicator/social_breadth.php @@ -53,6 +53,6 @@ class social_breadth extends activity_base { public function get_social_breadth_level(\cm_info $cm) { $this->fill_publishstats($cm); - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/folder/classes/analytics/indicator/cognitive_depth.php b/mod/folder/classes/analytics/indicator/cognitive_depth.php index 39d6207875f..6b1f5582a02 100644 --- a/mod/folder/classes/analytics/indicator/cognitive_depth.php +++ b/mod/folder/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/folder/classes/analytics/indicator/social_breadth.php b/mod/folder/classes/analytics/indicator/social_breadth.php index 55728222704..2d84c0a474e 100644 --- a/mod/folder/classes/analytics/indicator/social_breadth.php +++ b/mod/folder/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/forum/classes/analytics/indicator/cognitive_depth.php b/mod/forum/classes/analytics/indicator/cognitive_depth.php index 3641ccf5870..eddfa7e7a81 100644 --- a/mod/forum/classes/analytics/indicator/cognitive_depth.php +++ b/mod/forum/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 4; + return self::COGNITIVE_LEVEL_4; } /** diff --git a/mod/forum/classes/analytics/indicator/social_breadth.php b/mod/forum/classes/analytics/indicator/social_breadth.php index e74c2720a0a..d1d1d13b260 100644 --- a/mod/forum/classes/analytics/indicator/social_breadth.php +++ b/mod/forum/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/glossary/classes/analytics/indicator/cognitive_depth.php b/mod/glossary/classes/analytics/indicator/cognitive_depth.php index 312f1538ab2..379dd8673f1 100644 --- a/mod/glossary/classes/analytics/indicator/cognitive_depth.php +++ b/mod/glossary/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 2; + return self::COGNITIVE_LEVEL_2; } } diff --git a/mod/glossary/classes/analytics/indicator/social_breadth.php b/mod/glossary/classes/analytics/indicator/social_breadth.php index b47bf0026f9..4c669aa0026 100644 --- a/mod/glossary/classes/analytics/indicator/social_breadth.php +++ b/mod/glossary/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/imscp/classes/analytics/indicator/cognitive_depth.php b/mod/imscp/classes/analytics/indicator/cognitive_depth.php index c7388d2e5f4..5c85527b667 100644 --- a/mod/imscp/classes/analytics/indicator/cognitive_depth.php +++ b/mod/imscp/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/imscp/classes/analytics/indicator/social_breadth.php b/mod/imscp/classes/analytics/indicator/social_breadth.php index 50ffd0acee9..c93351039c1 100644 --- a/mod/imscp/classes/analytics/indicator/social_breadth.php +++ b/mod/imscp/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/label/classes/analytics/indicator/cognitive_depth.php b/mod/label/classes/analytics/indicator/cognitive_depth.php index adacede7199..fc1f3c41b18 100644 --- a/mod/label/classes/analytics/indicator/cognitive_depth.php +++ b/mod/label/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/label/classes/analytics/indicator/social_breadth.php b/mod/label/classes/analytics/indicator/social_breadth.php index 86452ec6744..a59263e03af 100644 --- a/mod/label/classes/analytics/indicator/social_breadth.php +++ b/mod/label/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/lesson/classes/analytics/indicator/cognitive_depth.php b/mod/lesson/classes/analytics/indicator/cognitive_depth.php index 838f30dc0a6..24ca8e23328 100644 --- a/mod/lesson/classes/analytics/indicator/cognitive_depth.php +++ b/mod/lesson/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 5; + return self::COGNITIVE_LEVEL_5; } /** diff --git a/mod/lesson/classes/analytics/indicator/social_breadth.php b/mod/lesson/classes/analytics/indicator/social_breadth.php index cd3c970398b..f0737151be3 100644 --- a/mod/lesson/classes/analytics/indicator/social_breadth.php +++ b/mod/lesson/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/lti/classes/analytics/indicator/cognitive_depth.php b/mod/lti/classes/analytics/indicator/cognitive_depth.php index a600f88d049..feb31ffaaec 100644 --- a/mod/lti/classes/analytics/indicator/cognitive_depth.php +++ b/mod/lti/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 3; + return self::COGNITIVE_LEVEL_3; } } diff --git a/mod/lti/classes/analytics/indicator/social_breadth.php b/mod/lti/classes/analytics/indicator/social_breadth.php index bd201376b22..896d294698e 100644 --- a/mod/lti/classes/analytics/indicator/social_breadth.php +++ b/mod/lti/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/page/classes/analytics/indicator/cognitive_depth.php b/mod/page/classes/analytics/indicator/cognitive_depth.php index 4e3eaca6d6f..0874f77c4c0 100644 --- a/mod/page/classes/analytics/indicator/cognitive_depth.php +++ b/mod/page/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/page/classes/analytics/indicator/social_breadth.php b/mod/page/classes/analytics/indicator/social_breadth.php index 1d27c5c8464..b9542e9cc85 100644 --- a/mod/page/classes/analytics/indicator/social_breadth.php +++ b/mod/page/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/quiz/classes/analytics/indicator/cognitive_depth.php b/mod/quiz/classes/analytics/indicator/cognitive_depth.php index 3c7d0a9719b..7e3fbfd667c 100644 --- a/mod/quiz/classes/analytics/indicator/cognitive_depth.php +++ b/mod/quiz/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 5; + return self::COGNITIVE_LEVEL_5; } /** diff --git a/mod/quiz/classes/analytics/indicator/social_breadth.php b/mod/quiz/classes/analytics/indicator/social_breadth.php index 4dd2a5c180c..14b45b673b0 100644 --- a/mod/quiz/classes/analytics/indicator/social_breadth.php +++ b/mod/quiz/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/resource/classes/analytics/indicator/cognitive_depth.php b/mod/resource/classes/analytics/indicator/cognitive_depth.php index 995b63b7a29..e91986c6d5d 100644 --- a/mod/resource/classes/analytics/indicator/cognitive_depth.php +++ b/mod/resource/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/resource/classes/analytics/indicator/social_breadth.php b/mod/resource/classes/analytics/indicator/social_breadth.php index 4dad871bae7..33fbbcbc6a6 100644 --- a/mod/resource/classes/analytics/indicator/social_breadth.php +++ b/mod/resource/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/scorm/classes/analytics/indicator/cognitive_depth.php b/mod/scorm/classes/analytics/indicator/cognitive_depth.php index 4dc11eb7026..42f37e22e1f 100644 --- a/mod/scorm/classes/analytics/indicator/cognitive_depth.php +++ b/mod/scorm/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 3; + return self::COGNITIVE_LEVEL_3; } } diff --git a/mod/scorm/classes/analytics/indicator/social_breadth.php b/mod/scorm/classes/analytics/indicator/social_breadth.php index 1ea6049ab55..a4ba3a6be6c 100644 --- a/mod/scorm/classes/analytics/indicator/social_breadth.php +++ b/mod/scorm/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } } diff --git a/mod/survey/classes/analytics/indicator/cognitive_depth.php b/mod/survey/classes/analytics/indicator/cognitive_depth.php index f2958f6eda2..1065cd25fd1 100644 --- a/mod/survey/classes/analytics/indicator/cognitive_depth.php +++ b/mod/survey/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 2; + return self::COGNITIVE_LEVEL_2; } } diff --git a/mod/survey/classes/analytics/indicator/social_breadth.php b/mod/survey/classes/analytics/indicator/social_breadth.php index 958c088b5fd..5673b0e4137 100644 --- a/mod/survey/classes/analytics/indicator/social_breadth.php +++ b/mod/survey/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/url/classes/analytics/indicator/cognitive_depth.php b/mod/url/classes/analytics/indicator/cognitive_depth.php index 784510e91d8..8bcfca1650a 100644 --- a/mod/url/classes/analytics/indicator/cognitive_depth.php +++ b/mod/url/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 1; + return self::COGNITIVE_LEVEL_1; } } diff --git a/mod/url/classes/analytics/indicator/social_breadth.php b/mod/url/classes/analytics/indicator/social_breadth.php index 28020b148f9..458a2d88353 100644 --- a/mod/url/classes/analytics/indicator/social_breadth.php +++ b/mod/url/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/wiki/classes/analytics/indicator/cognitive_depth.php b/mod/wiki/classes/analytics/indicator/cognitive_depth.php index 973a25d0942..343ebec0480 100644 --- a/mod/wiki/classes/analytics/indicator/cognitive_depth.php +++ b/mod/wiki/classes/analytics/indicator/cognitive_depth.php @@ -51,6 +51,6 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 2; + return self::COGNITIVE_LEVEL_2; } } diff --git a/mod/wiki/classes/analytics/indicator/social_breadth.php b/mod/wiki/classes/analytics/indicator/social_breadth.php index ec5874c9865..aaf590f4ae4 100644 --- a/mod/wiki/classes/analytics/indicator/social_breadth.php +++ b/mod/wiki/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 1; + return self::SOCIAL_LEVEL_1; } } diff --git a/mod/workshop/classes/analytics/indicator/cognitive_depth.php b/mod/workshop/classes/analytics/indicator/cognitive_depth.php index 85d35d08c43..0f0b437b57a 100644 --- a/mod/workshop/classes/analytics/indicator/cognitive_depth.php +++ b/mod/workshop/classes/analytics/indicator/cognitive_depth.php @@ -51,7 +51,7 @@ class cognitive_depth extends activity_base { } public function get_cognitive_depth_level(\cm_info $cm) { - return 5; + return self::COGNITIVE_LEVEL_5; } /** diff --git a/mod/workshop/classes/analytics/indicator/social_breadth.php b/mod/workshop/classes/analytics/indicator/social_breadth.php index 6bc70d760dc..45a3d2d85d8 100644 --- a/mod/workshop/classes/analytics/indicator/social_breadth.php +++ b/mod/workshop/classes/analytics/indicator/social_breadth.php @@ -51,6 +51,6 @@ class social_breadth extends activity_base { } public function get_social_breadth_level(\cm_info $cm) { - return 2; + return self::SOCIAL_LEVEL_2; } }