Skip to content

Commit

Permalink
fix: add missing file extension when exporting excel file
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-heinrich committed Dec 13, 2024
1 parent 3b2058c commit a00d139
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ public function __construct(
private readonly \ilLanguage $lng,
private readonly \ilObjUser $current_user,
private readonly \ilObjTest $test_obj,
private readonly string $filename = '',
private string $filename = '',
private readonly bool $scoredonly = true,
) {
$this->user_date_format = $this->current_user->getDateTimeFormat();
$this->aggregated_data = $test_obj->getAggregatedResultsData();
$this->worksheet = new \ilExcel();

if (!str_contains($this->filename, '.xlsx')) {
$this->filename .= '.xlsx';
}
}

public function withFilterByActiveId(int $active_id): self
Expand Down

0 comments on commit a00d139

Please sign in to comment.