Skip to content

Commit

Permalink
Merge pull request #114 from KQMATH/bug/#97
Browse files Browse the repository at this point in the history
Merge request #97
  • Loading branch information
hgeorgsch committed Aug 7, 2023
2 parents 4fcf383 + 9dbdfad commit 4178821
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org).
### Changed
- Submission button for student answer changed from Save to Submit.

## [1.2.2] - 2023-07-28

- Added column in qbank view for displaying question text/media

## [1.2.1] - 2023-06-26

- Swapped the order of firstname and lastname in csv export of attendance list
Expand Down
22 changes: 21 additions & 1 deletion classes/bank/jazzquiz_question_bank_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,28 @@ protected function wanted_columns(): array {
'core_question\\local\\bank\\checkbox_column',
'qbank_viewquestiontype\\question_type_column',
'qbank_viewquestionname\\viewquestionname_column_helper',
'qbank_previewquestion\\preview_action_column'
'qbank_previewquestion\\preview_action_column',
];

// Needs to check qbshowtext parameter manually from baseurl in order
// to determine whether to display the question text row below questions
$queryparams = explode(';', $this->baseurl);

foreach ($queryparams as $value) {
$value = str_replace('&', '', $value);
$value = str_replace('amp', '', $value);
$param = explode('=', $value);

if ($param[0] == 'qbshowtext') {
if ((int)$param[1] != 0) {
array_push($columns, 'qbank_viewquestiontext\\question_text_row');
}
break;
}
}



foreach ($columns as $column) {
$this->requiredcolumns[$column] = new $column($this);
}
Expand Down

0 comments on commit 4178821

Please sign in to comment.