Commit 86bdf879 authored by safatshahin's avatar safatshahin Committed by Safat Shahin
Browse files

MDL-71516 core_question: Class movement for moodle autoloading

Movement of classes to classes/local/bank and additional
todo addition to all the existing ones to align with
future tracker for class renaming. This commit does not
contain any class renaming of the old or deprecated
classes. MDL-72004 will be used to rename, remove or
deprecate old classes after integrating all the qbank
plugins.
parent 036800d9
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
abstract class action_column_base extends column_base {
......
......@@ -32,6 +32,7 @@ use core\output\checkbox_toggleall;
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
class checkbox_column extends column_base {
......
......@@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Base class for representing a column in a {@link question_bank_view}.
* Base class for representing a column in a {@see question_bank_view}.
*
* @package core_question
* @copyright 1999 onwards Martin Dougiamas and others {@link http://moodle.com}
......@@ -27,12 +27,14 @@ defined('MOODLE_INTERNAL') || die();
/**
* Base class for representing a column in a {@link question_bank_view}.
* Base class for representing a column in a {@see question_bank_view}.
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
abstract class column_base {
/**
* @var view $qbank the question bank view we are helping to render.
*/
......@@ -42,10 +44,10 @@ abstract class column_base {
protected $isheading = false;
/**
* Constructor.
* @param view $qbank the question bank view we are helping to render.
* Constructor for the question bank view we are helping to render.
* @param view $qbank
*/
public function __construct(view $qbank) {
public function __construct($qbank) {
$this->qbank = $qbank;
$this->init();
}
......@@ -68,6 +70,27 @@ abstract class column_base {
return false;
}
/**
* Check if the row has an extra preference to view/hide.
*/
public function has_preference(): bool {
return false;
}
/**
* Get if the preference key of the row.
*/
public function get_preference_key(): string {
return '';
}
/**
* Get if the preference of the row.
*/
public function get_preference(): bool {
return false;
}
/**
* Output the column header cell.
*/
......@@ -272,7 +295,7 @@ abstract class column_base {
/**
* Load the tags for each question.
*
* Helper that can be used from {@link load_additional_data()};
* Helper that can be used from {@see load_additional_data()};
*
* @param array $questions
*/
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2013 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class copy_action_column extends menu_action_column_base {
/** @var string avoids repeated calls to get_string('duplicate'). */
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class creator_name_column extends column_base {
public function get_name() {
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class delete_action_column extends menu_action_column_base {
protected $strdelete;
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class edit_action_column extends menu_action_column_base {
protected $stredit;
......
......@@ -36,6 +36,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2019 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
class edit_menu_column extends column_base {
/**
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2019 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class export_xml_action_column extends menu_action_column_base {
/** @var string avoids repeated calls to get_string('duplicate'). */
......
......@@ -36,6 +36,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2019 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
abstract class menu_action_column_base extends action_column_base implements menuable_action {
......
......@@ -43,6 +43,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2019 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
interface menuable_action {
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class modifier_name_column extends column_base {
public function get_name() {
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class preview_action_column extends action_column_base implements menuable_action {
/**
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class question_name_column extends column_base {
protected $checkboxespresent = null;
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2019 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class question_name_idnumber_tags_column extends question_name_column {
public function get_name() {
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class question_text_row extends row_base {
protected $formatoptions;
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class question_type_column extends column_base {
public function get_name() {
......
......@@ -41,6 +41,7 @@ namespace core_question\bank;
*
* @copyright 2015 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
class random_question_loader {
/** @var \qubaid_condition which usages to consider previous attempts from. */
......
......@@ -31,6 +31,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2009 Tim Hunt
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to core_question/local/bank
*/
abstract class row_base extends column_base {
public function is_extra_row() {
......
......@@ -30,6 +30,7 @@ defined('MOODLE_INTERNAL') || die();
*
* @copyright 2018 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @todo MDL-72004 delete the class and add it to lib/db/renameclasses.php pointing to the plugin
*/
class tags_action_column extends action_column_base implements menuable_action {
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment