mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
question bank: MDL-18215 select all checkbox does not always work.
This commit is contained in:
parent
24350e0625
commit
2d1e69d37b
1 changed files with 6 additions and 2 deletions
|
@ -382,6 +382,7 @@ abstract class question_bank_column_base {
|
|||
*/
|
||||
class question_bank_checkbox_column extends question_bank_column_base {
|
||||
protected $strselect;
|
||||
protected $firstrow = true;
|
||||
|
||||
public function init() {
|
||||
$this->strselect = get_string('select', 'quiz');
|
||||
|
@ -402,8 +403,11 @@ class question_bank_checkbox_column extends question_bank_column_base {
|
|||
protected function display_content($question, $rowclasses) {
|
||||
echo '<input title="' . $this->strselect . '" type="checkbox" name="q' .
|
||||
$question->id . '" id="checkq' . $question->id . '" value="1"/>';
|
||||
print_js_call('question_bank.init_checkbox_column', array(get_string('selectall'),
|
||||
get_string('deselectall'), 'checkq' . $question->id));
|
||||
if ($this->firstrow) {
|
||||
print_js_call('question_bank.init_checkbox_column', array(get_string('selectall'),
|
||||
get_string('deselectall'), 'checkq' . $question->id));
|
||||
$this->firstrow = false;
|
||||
}
|
||||
}
|
||||
|
||||
public function get_required_fields() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue