Skip to content

Commit

Permalink
Merge pull request #112 from KQMATH/bug/#97
Browse files Browse the repository at this point in the history
Hotfix of swapped columns in attendance list csv export
  • Loading branch information
hgeorgsch authored Jul 6, 2023
2 parents 630856c + c3e8eaa commit b4e7da8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org).
### Changed
-

## [1.2.1] - 2023-06-26

- Swapped the order of firstname and lastname in csv export of attendance list


## [1.2.1] - 2023-06-08

- Improvement of guest user feedback upon trying to attend a quiz which doesn't allow guests to attend
Expand Down
4 changes: 2 additions & 2 deletions classes/exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ public function export_attendance_csv(jazzquiz_session $session) {
$idnumber = $attendance['idnumber'];
$userFirstLastName = explode(', ', $attendance['name']);
if (count($userFirstLastName) >= 2) {
$lastName = $userFirstLastName[0];
$firstName = $userFirstLastName[1];
$lastName = $userFirstLastName[1];
$firstName = $userFirstLastName[0];
} else {
$lastName = $userFirstLastName[0];
$firstName = $userFirstLastName[0]; //for anonymous, but it doesn't even make sense since if it's anon, no name should display
Expand Down
3 changes: 2 additions & 1 deletion edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function jazzquiz_edit() {
$pagevars) = question_edit_setup('editq', '/mod/jazzquiz/edit.php', true);

$jazzquiz = new jazzquiz($cmid);
$renderer = $jazzquiz->renderer;
$renderer = $jazzquiz->renderer; // Todo: Flytt ned til hvor variabelen blir brukt

$modulename = get_string('modulename', 'jazzquiz');
$quizname = format_string($jazzquiz->data->name, true);
Expand All @@ -182,6 +182,7 @@ function jazzquiz_edit() {

// Process moving, deleting and unhiding questions...
$questionbank = new \core_question\local\bank\view($contexts, $url, $COURSE, $cm);


switch ($action) {
case 'order':
Expand Down

0 comments on commit b4e7da8

Please sign in to comment.