Skip to content

Commit

Permalink
Update code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvu committed Jan 17, 2024
1 parent 7f9978d commit 857d81c
Show file tree
Hide file tree
Showing 32 changed files with 146 additions and 865 deletions.
42 changes: 21 additions & 21 deletions classes/condition/studentquiz_condition.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
*/

namespace mod_studentquiz\condition;
defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot . '/mod/studentquiz/classes/local/db.php');
use mod_studentquiz\local\db;
if (!class_exists('\core_question\local\bank\condition')) {
class_alias('\core_question\bank\search\condition', '\core_question\local\bank\condition');
}

/**
* Conditionally modify question bank queries.
Expand All @@ -36,6 +36,24 @@
*/
class studentquiz_condition extends \core_question\local\bank\condition {

/**
* Return title of the condition
*
* @return string title of the condition
*/
public function get_title() {
return get_string('showhidden', 'core_question');
}

/**
* Return filter class associated with this condition
*
* @return string filter class
*/
public function get_filter_class() {
return 'qbank_deletequestion/datafilter/filtertypes/hidden';
}

/**
* Due to fix_sql_params not accepting repeated use of named params,
* we need to get unique names for params that will be used more than
Expand Down Expand Up @@ -67,24 +85,6 @@ public function __construct($cm, $filterform, $report, $studentquiz) {
$this->init();
}

/**
* Return title of the condition
*
* @return string title of the condition
*/
public function get_title() {
return get_string('showhidden', 'core_question');
}

/**
* Return filter class associated with this condition
*
* @return string filter class
*/
public function get_filter_class() {
return 'qbank_deletequestion/datafilter/filtertypes/hidden';
}

/** @var stdClass */
protected $cm;

Expand Down
251 changes: 0 additions & 251 deletions classes/condition/studentquiz_condition_pre_43.php

This file was deleted.

2 changes: 1 addition & 1 deletion classes/question/bank/anonym_creator_name_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace mod_studentquiz\bank;
namespace mod_studentquiz\question\bank;

/**
* A column type for the name of the question creator.
Expand Down
2 changes: 1 addition & 1 deletion classes/question/bank/attempts_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace mod_studentquiz\bank;
namespace mod_studentquiz\question\bank;

/**
* Represent performances column in studentquiz_bank_view
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace mod_studentquiz\bank;
namespace mod_studentquiz\question\bank;

use mod_studentquiz\utils;

Expand Down
2 changes: 1 addition & 1 deletion classes/question/bank/difficulty_level_column.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

namespace mod_studentquiz\bank;
namespace mod_studentquiz\question\bank;

/**
* Representing difficulty level column in studentquiz_bank_view
Expand Down
Loading

0 comments on commit 857d81c

Please sign in to comment.