Skip to content
Snippets Groups Projects
Commit eedbfd6d authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

switch default for `files_hidden` option to 1, fixes #65

parent fe66e4b7
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,7 @@ abstract class Exercise extends SimpleORMap ...@@ -118,7 +118,7 @@ abstract class Exercise extends SimpleORMap
$this->options['comment'] = 1; $this->options['comment'] = 1;
} }
if ($request['file_ids'] && !$request['files_visible']) { if (!$request['files_visible']) {
$this->options['files_hidden'] = 1; $this->options['files_hidden'] = 1;
} }
} }
...@@ -662,6 +662,10 @@ abstract class Exercise extends SimpleORMap ...@@ -662,6 +662,10 @@ abstract class Exercise extends SimpleORMap
*/ */
public function includeFilesForExport() public function includeFilesForExport()
{ {
if (count($this->files) == 0) {
$this->options['files_hidden'] = 1;
}
$this->description = $this->rewriteLinksForExport($this->description); $this->description = $this->rewriteLinksForExport($this->description);
$this->options['hint'] = $this->rewriteLinksForExport($this->options['hint']); $this->options['hint'] = $this->rewriteLinksForExport($this->options['hint']);
$this->task = $this->rewriteLinksForExport($this->task); $this->task = $this->rewriteLinksForExport($this->task);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment