From cf81447c74889368fdfb7de345562ee5b26b24ae Mon Sep 17 00:00:00 2001 From: Simey Lameze Date: Tue, 13 Feb 2018 10:10:11 +0800 Subject: [PATCH] MDL-61135 mod_quiz: deprecate unused fragment_view class --- mod/quiz/classes/question/bank/fragment_view.php | 77 ------------------------ 1 file changed, 77 deletions(-) delete mode 100644 mod/quiz/classes/question/bank/fragment_view.php diff --git a/mod/quiz/classes/question/bank/fragment_view.php b/mod/quiz/classes/question/bank/fragment_view.php deleted file mode 100644 index 45e3b54a50b..00000000000 --- a/mod/quiz/classes/question/bank/fragment_view.php +++ /dev/null @@ -1,77 +0,0 @@ -. - -/** - * Defines the custom question bank view used in the question bank modal. - * - * @package mod_quiz - * @category question - * @copyright 2018 Ryan Wyllie - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - -namespace mod_quiz\question\bank; -defined('MOODLE_INTERNAL') || die(); - - -/** - * Subclass to customise the view of the question bank for a fragment. - * - * This view is to be used when returning the question bank as part of - * a fragment. - * - * @copyright 2018 Ryan Wyllie - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ -class fragment_view extends custom_view { - /** - * Override the base implementation in \core_question\bank\view - * because we don't want to print the headers in the fragment - * for the modal. - */ - protected function display_question_bank_header() { - } - - /** - * Override the base implementation in \core_question\bank\view - * because we don't want it to read from the $_POST global variables - * for the sort parameters since they are not present in a fragment. - * - * Unfortunately the best we can do is to look at the URL for - * those parameters (only marginally better really). - */ - protected function init_sort_from_params() { - $this->sort = []; - for ($i = 1; $i <= self::MAX_SORTS; $i++) { - if (!$sort = $this->baseurl->param('qbs' . $i)) { - break; - } - // Work out the appropriate order. - $order = 1; - if ($sort[0] == '-') { - $order = -1; - $sort = substr($sort, 1); - if (!$sort) { - break; - } - } - // Deal with subsorts. - list($colname, $subsort) = $this->parse_subsort($sort); - $this->requiredcolumns[$colname] = $this->get_column_type($colname); - $this->sort[$sort] = $order; - } - } -} -- 2.11.4.GIT