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

avoid displaying 01.01.1970 for `null` values, fixes #267

parent 48436e6b
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ class ApiController extends StudipController
'type' => $assignment->type,
'icon' => $assignment->getTypeIcon()->getShape(),
'start' => date('d.m.Y, H:i', strtotime($assignment->start)),
'end' => date('d.m.Y, H:i', strtotime($assignment->end)),
'end' => $assignment->end ? date('d.m.Y, H:i', strtotime($assignment->end)) : null,
'active' => $assignment->active,
'block' => $assignment->block_id ? $assignment->block->name : null
];
......@@ -67,7 +67,7 @@ class ApiController extends StudipController
'type' => $assignment->type,
'icon' => $assignment->getTypeIcon()->getShape(),
'start' => date('d.m.Y, H:i', strtotime($assignment->start)),
'end' => date('d.m.Y, H:i', strtotime($assignment->end)),
'end' => $assignment->end ? date('d.m.Y, H:i', strtotime($assignment->end)) : null,
'active' => $assignment->active,
'block' => $assignment->block_id ? $assignment->block->name : null,
'reset_allowed' => $assignment->isRunning($user_id) && $assignment->isResetAllowed(),
......
......@@ -77,19 +77,19 @@ const CoursewareTestBlock = {
class="cw-vs-select"
>
<template #open-indicator="selectAttributes">
<studip-icon shape="arr_1down" size="10"/>
<studip-icon shape="arr_1down" size="16"/>
</template>
<template #no-options="{}">
<translate>Es steht keine Auswahl zur Verfügung</translate>
</template>
<template #selected-option="{title, icon, start, end}">
<studip-icon :shape="icon" role="info"/>
{{title}} ({{start}} - {{end}})
<studip-icon v-if="icon" :shape="icon" role="info"/>
{{title}} ({{start}}{{ end ? ' - ' + end : '' }})
</template>
<template #option="{title, icon, start, end, block}">
<studip-icon :shape="icon" role="info"/>
<studip-icon v-if="icon" :shape="icon" role="info"/>
{{ block ? block + ' / ' + title : title }}<br>
<small>{{start}} - {{end}}</small>
<small>{{start}}{{ end ? ' - ' + end : '' }}</small>
</template>
</studip-select>
</label>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment