MDL-71636 core_question : API changes for column_base

This commit implements methods visibility changes to column_base class
and its child classes.
This commit is contained in:
Marc-Alexandre Ghaly 2021-11-16 08:55:34 -05:00 committed by Tim Hunt
parent 9cd77c4130
commit 7c016b3451
17 changed files with 20 additions and 20 deletions

View File

@ -36,7 +36,7 @@ class question_name_column extends \core_question\local\bank\column_base {
return 'questionname';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('question');
}

View File

@ -43,7 +43,7 @@ class comment_count_column extends column_base {
*
* @return string
*/
protected function get_title(): string {
public function get_title(): string {
return get_string('commentplural', 'qbank_comment');
}

View File

@ -68,7 +68,7 @@ class custom_field_column extends column_base {
*
* @return string
*/
protected function get_title(): string {
public function get_title(): string {
return $this->field->get_formatted_name();
}

View File

@ -33,7 +33,7 @@ class question_status_column extends column_base {
return 'questionstatus';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('questionstatus', 'qbank_editquestion');
}

View File

@ -33,7 +33,7 @@ class discrimination_index extends column_base {
*
* @return string column title
*/
protected function get_title(): string {
public function get_title(): string {
return get_string('discrimination_index', 'qbank_statistics');
}

View File

@ -33,7 +33,7 @@ class discriminative_efficiency extends column_base {
*
* @return string column title
*/
protected function get_title(): string {
public function get_title(): string {
return get_string('discriminative_efficiency', 'qbank_statistics');
}

View File

@ -33,7 +33,7 @@ class facility_index extends column_base {
*
* @return string column title
*/
protected function get_title(): string {
public function get_title(): string {
return get_string('facility_index', 'qbank_statistics');
}

View File

@ -32,7 +32,7 @@ class question_usage_column extends column_base {
return 'questionusage';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('questionusage', 'qbank_usage');
}

View File

@ -32,7 +32,7 @@ class creator_name_column extends column_base {
return 'creatorname';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('createdby', 'question');
}

View File

@ -38,7 +38,7 @@ class viewquestionname_column_helper extends column_base {
return 'questionname';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('question');
}

View File

@ -44,7 +44,7 @@ class question_text_row extends row_base {
return 'questiontext';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('questiontext', 'question');
}

View File

@ -32,11 +32,11 @@ class question_type_column extends column_base {
return 'qtype';
}
protected function get_title(): string {
public function get_title(): string {
return get_string('qtypeveryshort', 'question');
}
protected function get_title_tip(): string {
public function get_title_tip(): string {
return get_string('questiontype', 'question');
}

View File

@ -33,7 +33,7 @@ namespace core_question\local\bank;
*/
abstract class action_column_base extends column_base {
protected function get_title(): string {
public function get_title(): string {
return ' ';
}

View File

@ -39,7 +39,7 @@ class checkbox_column extends column_base {
return 'checkbox';
}
protected function get_title() {
public function get_title() {
global $OUTPUT;
$mastercheckbox = new checkbox_toggleall('qbank', true, [
@ -53,7 +53,7 @@ class checkbox_column extends column_base {
return $OUTPUT->render($mastercheckbox);
}
protected function get_title_tip() {
public function get_title_tip() {
return get_string('selectquestionsforbulk', 'question');
}

View File

@ -133,7 +133,7 @@ abstract class column_base {
/**
* Title for this column. Not used if is_sortable returns an array.
*/
abstract protected function get_title();
abstract public function get_title();
/**
* Use this when get_title() returns
@ -141,7 +141,7 @@ abstract class column_base {
*
* @return string a fuller version of the name.
*/
protected function get_title_tip() {
public function get_title_tip() {
return '';
}

View File

@ -64,7 +64,7 @@ class edit_menu_column extends column_base {
return $remainingcolumns;
}
protected function get_title() {
public function get_title() {
return get_string('actions');
}

View File

@ -60,7 +60,7 @@ class testable_core_question_column extends \core_question\local\bank\column_bas
return 'test_column';
}
protected function get_title() {
public function get_title() {
return 'Test Column';
}
}