MDL-59030 analytics: Expand community of inquiry mods public API
authorDavid Monllao <davidm@moodle.com>
Mon, 28 Aug 2017 18:21:46 +0000 (20:21 +0200)
committerDavid Monllao <davidm@moodle.com>
Tue, 29 Aug 2017 04:19:37 +0000 (06:19 +0200)
45 files changed:
analytics/classes/local/indicator/community_of_inquiry_activity.php
course/classes/analytics/indicator/no_teacher.php
lang/en/moodle.php
mod/assign/classes/analytics/indicator/cognitive_depth.php
mod/assign/classes/analytics/indicator/social_breadth.php
mod/book/classes/analytics/indicator/cognitive_depth.php
mod/book/classes/analytics/indicator/social_breadth.php
mod/chat/classes/analytics/indicator/cognitive_depth.php
mod/chat/classes/analytics/indicator/social_breadth.php
mod/choice/classes/analytics/indicator/cognitive_depth.php
mod/choice/classes/analytics/indicator/social_breadth.php
mod/data/classes/analytics/indicator/cognitive_depth.php
mod/data/classes/analytics/indicator/social_breadth.php
mod/feedback/classes/analytics/indicator/cognitive_depth.php
mod/feedback/classes/analytics/indicator/social_breadth.php
mod/folder/classes/analytics/indicator/cognitive_depth.php
mod/folder/classes/analytics/indicator/social_breadth.php
mod/forum/classes/analytics/indicator/cognitive_depth.php
mod/forum/classes/analytics/indicator/social_breadth.php
mod/glossary/classes/analytics/indicator/cognitive_depth.php
mod/glossary/classes/analytics/indicator/social_breadth.php
mod/imscp/classes/analytics/indicator/cognitive_depth.php
mod/imscp/classes/analytics/indicator/social_breadth.php
mod/label/classes/analytics/indicator/cognitive_depth.php
mod/label/classes/analytics/indicator/social_breadth.php
mod/lesson/classes/analytics/indicator/cognitive_depth.php
mod/lesson/classes/analytics/indicator/social_breadth.php
mod/lti/classes/analytics/indicator/cognitive_depth.php
mod/lti/classes/analytics/indicator/social_breadth.php
mod/page/classes/analytics/indicator/cognitive_depth.php
mod/page/classes/analytics/indicator/social_breadth.php
mod/quiz/classes/analytics/indicator/cognitive_depth.php
mod/quiz/classes/analytics/indicator/social_breadth.php
mod/resource/classes/analytics/indicator/cognitive_depth.php
mod/resource/classes/analytics/indicator/social_breadth.php
mod/scorm/classes/analytics/indicator/cognitive_depth.php
mod/scorm/classes/analytics/indicator/social_breadth.php
mod/survey/classes/analytics/indicator/cognitive_depth.php
mod/survey/classes/analytics/indicator/social_breadth.php
mod/url/classes/analytics/indicator/cognitive_depth.php
mod/url/classes/analytics/indicator/social_breadth.php
mod/wiki/classes/analytics/indicator/cognitive_depth.php
mod/wiki/classes/analytics/indicator/social_breadth.php
mod/workshop/classes/analytics/indicator/cognitive_depth.php
mod/workshop/classes/analytics/indicator/social_breadth.php

index 60d5e0f..067ca7b 100644 (file)
@@ -60,12 +60,22 @@ abstract class community_of_inquiry_activity extends linear {
      */
     const INDICATOR_SOCIAL = "social";
 
+    /**
+     * Max cognitive depth level accepted.
+     */
+    const MAX_COGNITIVE_LEVEL = 5;
+
+    /**
+     * Max social breadth level accepted.
+     */
+    const MAX_SOCIAL_LEVEL = 2;
+
     /**
      * Returns the activity type. No point in changing this class in children classes.
      *
      * @var string The activity name (e.g. assign or quiz)
      */
-    protected final function get_activity_type() {
+    public final function get_activity_type() {
         $class = get_class($this);
         $package = stristr($class, "\\", true);
         $type = str_replace("mod_", "", $package);
@@ -81,7 +91,7 @@ abstract class community_of_inquiry_activity extends linear {
      * @param \cm_info $cm
      * @return int
      */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         throw new \coding_exception('Overwrite get_cognitive_depth_level method to set your activity potential cognitive ' .
             'depth level');
     }
@@ -92,7 +102,7 @@ abstract class community_of_inquiry_activity extends linear {
      * @param \cm_info $cm
      * @return int
      */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         throw new \coding_exception('Overwrite get_social_breadth_level method to set your activity potential social ' .
             'breadth level');
     }
@@ -506,7 +516,7 @@ 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 > 5 || $potentiallevel < 1) {
+            if (!is_int($potentiallevel) || $potentiallevel > self::MAX_COGNITIVE_LEVEL || $potentiallevel < 1) {
                 throw new \coding_exception('Activities\' potential cognitive depth go from 1 to 5.');
             }
             $scoreperlevel = $scoreperactivity / $potentiallevel;
@@ -593,8 +603,10 @@ 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 > 2 || $potentiallevel < 1) {
-                throw new \coding_exception('Activities\' potential social breadth go from 1 to 2.');
+            if (!is_int($potentiallevel) || $potentiallevel > self::MAX_SOCIAL_LEVEL || $potentiallevel < 1) {
+                throw new \coding_exception('Although social breadth levels can go from 1 to 5 at the moment Moodle core ' .
+                    'can only accept social breadth levels between 1 and ' . self::MAX_SOCIAL_LEVEL . '. Sorry for the ' .
+                    'inconvenience. This will change in future releases.');
             }
             $scoreperlevel = $scoreperactivity / $potentiallevel;
             switch ($potentiallevel) {
@@ -650,5 +662,5 @@ abstract class community_of_inquiry_activity extends linear {
      *
      * @return string
      */
-    abstract protected function get_indicator_type();
+    abstract public function get_indicator_type();
 }
index 99051c7..a2d7833 100644 (file)
@@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die();
 /**
  * No teacher indicator.
  *
- * @package   core_analytics
+ * @package   core_course
  * @copyright 2016 David Monllao {@link http://www.davidmonllao.com}
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
index e0f3592..6c18422 100644 (file)
@@ -1031,8 +1031,14 @@ $string['indicator:anywrite'] = 'Any write action';
 $string['indicator:anywrite_help'] = '';
 $string['indicator:completeduserprofile'] = 'User profile is completed';
 $string['indicator:completeduserprofile_help'] = '';
+$string['indicator:completionenabled'] = 'Completion enabled';
+$string['indicator:completionenabled_help'] = '';
 $string['indicator:noteacher'] = 'There are no teachers';
 $string['indicator:noteacher_help'] = '';
+$string['indicator:potentialcognitive'] = 'Potential cognitive depth';
+$string['indicator:potentialcognitive_help'] = '';
+$string['indicator:potentialsocial'] = 'Potential social breadth';
+$string['indicator:potentialsocial_help'] = '';
 $string['indicator:readactions'] = 'Read actions amount';
 $string['indicator:readactions_help'] = '';
 $string['indicator:userforumstracking'] = 'User is tracking forums';
index 98aa899..f75dd47 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_assign');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 5;
     }
 
index 7874285..66f0d48 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_assign');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index 705a537..0fdf7c9 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_book');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 }
index 45ec925..e58e6a0 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_book');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 4cfaa82..4890052 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_chat');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 4;
     }
index 4d92426..620e6a8 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_chat');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index f325b02..6517393 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_choice');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         $this->fill_choice_data($cm);
 
         if ($this->choicedata[$cm->instance]->showresults == 0 || $this->choicedata[$cm->instance]->showresults == 4) {
index 0afd601..8d119ca 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_choice');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         $this->fill_choice_data($cm);
         return 2;
     }
index 29b6fbb..a527838 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_data');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 2;
     }
index 0c2da04..2309c69 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_data');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 93bb252..cf5403f 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_feedback');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         $this->fill_publishstats($cm);
 
         if (!empty($this->publishstats[$cm->instance])) {
index 0ad198e..64ba678 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_feedback');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         $this->fill_publishstats($cm);
 
         return 2;
index b3f49da..39d6207 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_folder');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 }
index 932e162..5572822 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_folder');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 8696dfb..3641ccf 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_forum');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 4;
     }
index a7508b2..e74c272 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_forum');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index f7f1b2c..312f153 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_glossary');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 2;
     }
index b1e64b7..b47bf00 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_glossary');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 39fa772..c7388d2 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_imscp');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 
index 953875f..50ffd0a 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_imscp');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 3daa74b..adacede 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_label');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 
index 18afd3f..86452ec 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_label');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 012d420..838f30d 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_lesson');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 5;
     }
 
index 83fd27a..cd3c970 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_lesson');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index bcfe466..a600f88 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_lti');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 3;
     }
index 24e7c5f..bd20137 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_lti');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index b988204..4e3eaca 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_page');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 }
index 852d348..1d27c5c 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_page');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 86d5155..3c7d0a9 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_quiz');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 5;
     }
index b110426..4dd2a5c 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_quiz');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index 28b4a66..995b63b 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_resource');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 }
index dd62403..4dad871 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_resource');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 2ea656c..4dc11eb 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_scorm');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 3;
     }
index c45096a..1ea6049 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_scorm');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }
index b991e1b..f2958f6 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_survey');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 2;
     }
 }
index b1bc1fd..958c088 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_survey');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 46c256b..784510e 100644 (file)
@@ -46,22 +46,11 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_url');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_cognitive_depth_level(\cm_info $cm) {
+    public function get_cognitive_depth_level(\cm_info $cm) {
         return 1;
     }
 }
index d4038a8..28020b1 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_url');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index c84a33a..973a25d 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_wiki');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 2;
     }
index 44269f3..ec5874c 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_wiki');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 1;
     }
 }
index 90f64c8..85d35d0 100644 (file)
@@ -46,21 +46,10 @@ class cognitive_depth extends activity_base {
         return new \lang_string('indicator:cognitivedepth', 'mod_workshop');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_COGNITIVE;
     }
 
-    /**
-     * get_cognitive_depth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
     public function get_cognitive_depth_level(\cm_info $cm) {
         return 5;
     }
index 0f5d748..6bc70d7 100644 (file)
@@ -46,22 +46,11 @@ class social_breadth extends activity_base {
         return new \lang_string('indicator:socialbreadth', 'mod_workshop');
     }
 
-    /**
-     * get_indicator_type
-     *
-     * @return string
-     */
-    protected function get_indicator_type() {
+    public function get_indicator_type() {
         return self::INDICATOR_SOCIAL;
     }
 
-    /**
-     * get_social_breadth_level
-     *
-     * @param \cm_info $cm
-     * @return int
-     */
-    protected function get_social_breadth_level(\cm_info $cm) {
+    public function get_social_breadth_level(\cm_info $cm) {
         return 2;
     }
 }