Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge request #97 #114

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
-

## [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
Loading