Differences Between: [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403]
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 * Helper class to to test column_base class. 19 * 20 * @package core_question 21 * @copyright 2018 Huong Nguyen <huongnv13@gmail.com> 22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 23 */ 24 25 defined('MOODLE_INTERNAL') || die(); 26 27 /** 28 * Helper class to to test column_base class. 29 * 30 * @package core_question 31 * @copyright 2018 Huong Nguyen <huongnv13@gmail.com> 32 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 33 */ 34 class testable_core_question_column extends \core_question\bank\column_base { 35 36 /** @var array sortable columns. */ 37 private $sortable = []; 38 39 /** 40 * Output the column header cell. 41 */ 42 public function is_sortable() { 43 return $this->sortable; 44 } 45 46 /** 47 * Set the sortable columns for testing. 48 * 49 * @param array $sortable 50 */ 51 public function set_sortable(array $sortable) { 52 $this->sortable = $sortable; 53 } 54 55 protected function display_content($question, $rowclasses) { 56 echo 'Test Column'; 57 } 58 59 public function get_name() { 60 return 'test_column'; 61 } 62 63 protected function get_title() { 64 return 'Test Column'; 65 } 66 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body