Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-local_learning_analytics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LAIXMO
moodle-local_learning_analytics
Commits
11104438
Commit
11104438
authored
4 years ago
by
Thorben Laprell
Browse files
Options
Downloads
Patches
Plain Diff
add_little_info
parent
3b3d86e3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
reports/weekheatmap/classes/query_helper.php
+1
-4
1 addition, 4 deletions
reports/weekheatmap/classes/query_helper.php
with
1 addition
and
4 deletions
reports/weekheatmap/classes/query_helper.php
+
1
−
4
View file @
11104438
...
...
@@ -43,7 +43,7 @@ class query_helper {
$mondaytimestamp
=
$startdate
->
getTimestamp
();
$year
=
date
(
"Y"
);
$summertimestart
=
false
;
//bool if you are in summertime
$changedate
=
strtotime
(
"last Sunday"
,
mktime
(
0
,
0
,
0
,
4
,
1
,
$year
+
1
))
+
7200
;
$changedate
=
strtotime
(
"last Sunday"
,
mktime
(
0
,
0
,
0
,
4
,
1
,
$year
+
1
))
+
7200
;
//timestamp of the next Daylight saving date
if
((
strtotime
(
"last Sunday"
,
mktime
(
0
,
0
,
0
,
4
,
1
,
$year
))
+
7200
)
<
$mondaytimestamp
)
{
if
((
strtotime
(
"last Sunday"
,
mktime
(
0
,
0
,
0
,
11
,
1
,
$year
))
+
14400
)
>
$mondaytimestamp
)
{
$summertimestart
=
true
;
...
...
@@ -52,9 +52,6 @@ class query_helper {
}
else
{
$changedate
=
strtotime
(
"last Sunday"
,
mktime
(
0
,
0
,
0
,
4
,
1
,
$year
))
+
7200
;
}
// TODO Implement Daylight saving offeset
// This does not work very well if daylight saving comes into play, then all old
// dates will be shifted by 1 hour...
// returns points between 0 - 167 (24*7 data points), where 0 => Mon,0-1am; 1 => Mon,1-2am; ...
$query
=
<<<SQL
...
...
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