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

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

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