Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
2b897359
Commit
2b897359
authored
1 year ago
by
Peter Thienel
Committed by
Moritz Strohm
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Resolve: "Ganztägige Termine über mehrere Tage werden nicht als Ganztagstermine dargestellt"
Closes #3875 Merge request
studip/studip!2731
parent
7f62272a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/calendar/EventData.class.php
+22
-8
22 additions, 8 deletions
lib/classes/calendar/EventData.class.php
lib/models/calendar/CalendarDateAssignment.class.php
+1
-2
1 addition, 2 deletions
lib/models/calendar/CalendarDateAssignment.class.php
with
23 additions
and
10 deletions
lib/classes/calendar/EventData.class.php
+
22
−
8
View file @
2b897359
...
@@ -69,15 +69,29 @@ class EventData
...
@@ -69,15 +69,29 @@ class EventData
public
function
toFullcalendarEvent
()
public
function
toFullcalendarEvent
()
{
{
//Note: The timezone must not be transmitted or
// Note: The timezone must not be transmitted or
//the events may be shifted when there is a timezone
// the events may be shifted when there is a timezone
//or daylight saving time difference between the server
// or daylight saving time difference between the server
//and the client!
// and the client!
return
[
// To display all-day events correctly in fullcalendar
// reduce the start and end to date without time and add one day
// to the end date...
if
(
$this
->
all_day
)
{
$fc_date
=
[
'allDay'
=>
true
,
'start'
=>
$this
->
begin
->
format
(
'Y-m-d'
),
'end'
=>
$this
->
end
->
modify
(
'+1 day'
)
->
format
(
'Y-m-d'
)
];
}
else
{
$fc_date
=
[
'allDay'
=>
false
,
'start'
=>
$this
->
begin
->
format
(
'Y-m-d\TH:i:s'
),
'end'
=>
$this
->
end
->
format
(
'Y-m-d\TH:i:s'
)
];
}
return
$fc_date
+
[
'resourceId'
=>
$this
->
range_id
,
'resourceId'
=>
$this
->
range_id
,
'start'
=>
$this
->
begin
->
format
(
'Y-m-d\TH:i:s'
),
'end'
=>
$this
->
end
->
format
(
'Y-m-d\TH:i:s'
),
'allDay'
=>
$this
->
all_day
,
'title'
=>
$this
->
title
,
'title'
=>
$this
->
title
,
'classNames'
=>
$this
->
event_classes
,
'classNames'
=>
$this
->
event_classes
,
'textColor'
=>
$this
->
text_colour
,
'textColor'
=>
$this
->
text_colour
,
...
...
This diff is collapsed.
Click to expand it.
lib/models/calendar/CalendarDateAssignment.class.php
+
1
−
2
View file @
2b897359
...
@@ -507,8 +507,7 @@ class CalendarDateAssignment extends SimpleORMap implements Event
...
@@ -507,8 +507,7 @@ class CalendarDateAssignment extends SimpleORMap implements Event
return
false
;
return
false
;
}
}
$end
=
$this
->
getEnd
();
$end
=
$this
->
getEnd
();
return
(
$end
->
format
(
'Ymd'
)
===
$begin
->
format
(
'Ymd'
)
return
$end
->
format
(
'His'
)
===
'235959'
;
&&
$end
->
format
(
'His'
)
===
'235959'
);
}
}
public
function
isWritable
(
string
$user_id
):
bool
public
function
isWritable
(
string
$user_id
):
bool
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment