See Release Notes
Long Term Support Release
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Test static target. 19 * 20 * @package core_analytics 21 * @copyright 2017 David MonllaĆ³ {@link http://www.davidmonllao.com} 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 25 defined('MOODLE_INTERNAL') || die(); 26 27 require_once (__DIR__ . '/test_target_shortname.php'); 28 29 /** 30 * Test static target. 31 * 32 * Testing target extension to make it static and to use a different analyser 33 * just to try a different one. Method calculate_sample is exactly the same. 34 * 35 * @package core_analytics 36 * @copyright 2017 David MonllaĆ³ {@link http://www.davidmonllao.com} 37 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 38 */ 39 class test_static_target_shortname extends test_target_shortname { 40 41 /** 42 * Returns a lang_string object representing the name for the indicator. 43 * 44 * Used as column identificator. 45 * 46 * If there is a corresponding '_help' string this will be shown as well. 47 * 48 * @return \lang_string 49 */ 50 public static function get_name() : \lang_string { 51 // Using a string that exists and contains a corresponding '_help' string. 52 return new \lang_string('allowstealthmodules'); 53 } 54 55 /** 56 * based_on_assumptions 57 * 58 * @return bool 59 */ 60 public static function based_on_assumptions() { 61 return true; 62 } 63 64 /** 65 * Everything yep, this is just for testing. 66 * 67 * @param \core_analytics\local\time_splitting\base $timesplitting 68 * @return bool 69 */ 70 public function can_use_timesplitting(\core_analytics\local\time_splitting\base $timesplitting): bool { 71 return true; 72 } 73 74 /** 75 * Different analyser just to test a different one. 76 * 77 * @return string 78 */ 79 public function get_analyser_class() { 80 return '\core\analytics\analyser\courses'; 81 } 82 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body