Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CipMap
CipMap
Commits
3c98ba91
Commit
3c98ba91
authored
Apr 22, 2019
by
Tom Kunze
Browse files
server: Fix missing temperatures in tutormode
parent
580592e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
django/server/static/server/js/cipmap-ui.js
View file @
3c98ba91
...
...
@@ -451,7 +451,13 @@ function fillTimetable(data){
function
setTemperature
(
data
)
{
var
room
=
getCurrentRoom
();
var
temperature
=
data
.
temperatures
[
room
];
var
temperature
=
'
N/A
'
;
if
(
data
.
temperatures
!==
undefined
&&
room
in
data
.
temperatures
)
{
temperature
=
data
.
temperatures
[
room
];
}
else
{
console
.
log
(
'
Room
'
+
room
+
'
has no temperature!
'
);
}
$
(
'
#current_temp
'
).
text
(
temperature
);
}
...
...
django/server/views.py
View file @
3c98ba91
...
...
@@ -303,6 +303,7 @@ def _requests(request, send_hostname=None):
data
[
'exercises'
]
=
_get_lectures_now
()
data
[
'exercises_today'
]
=
_get_lectures_today
()
data
[
'configuration'
]
=
_get_lecture_configuration
()
data
[
'temperatures'
]
=
_get_temperatures
()
indent
=
None
if
settings
.
DEBUG
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment