Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Vips
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
Vips
Commits
04c153a0
Commit
04c153a0
authored
Jul 6, 2023
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
don't trigger exam mode when vips is hidden, fixes
#205
parent
919c0f51
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/vips_common.inc.php
+2
-1
2 additions, 1 deletion
lib/vips_common.inc.php
views/exam_mode/index.php
+17
-15
17 additions, 15 deletions
views/exam_mode/index.php
with
19 additions
and
16 deletions
lib/vips_common.inc.php
+
2
−
1
View file @
04c153a0
...
@@ -310,8 +310,9 @@ function get_courses_with_running_exams($user_id)
...
@@ -310,8 +310,9 @@ function get_courses_with_running_exams($user_id)
foreach
(
$stmt
as
$row
)
{
foreach
(
$stmt
as
$row
)
{
$assignment
=
VipsAssignment
::
find
(
$row
[
'id'
]);
$assignment
=
VipsAssignment
::
find
(
$row
[
'id'
]);
$ip_range
=
$assignment
->
options
[
'ip_range'
];
$ip_range
=
$assignment
->
options
[
'ip_range'
];
$settings
=
CourseConfig
::
get
(
$row
[
'Seminar_id'
]);
if
(
$assignment
->
isVisible
(
$user_id
))
{
if
(
$assignment
->
isVisible
(
$user_id
)
&&
$settings
->
VIPS_TAB_VISIBLE
)
{
if
(
strlen
(
$ip_range
)
>
0
&&
$assignment
->
checkIPAccess
(
$_SERVER
[
'REMOTE_ADDR'
]))
{
if
(
strlen
(
$ip_range
)
>
0
&&
$assignment
->
checkIPAccess
(
$_SERVER
[
'REMOTE_ADDR'
]))
{
$courses
[
$row
[
'Seminar_id'
]]
=
$row
[
'Name'
];
$courses
[
$row
[
'Seminar_id'
]]
=
$row
[
'Name'
];
}
}
...
...
This diff is collapsed.
Click to expand it.
views/exam_mode/index.php
+
17
−
15
View file @
04c153a0
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
<tbody>
<tbody>
<?
foreach
(
$courses
as
$course_id
=>
$course_name
)
:
?>
<?
foreach
(
$courses
as
$course_id
=>
$course_name
)
:
?>
<?
$nav
=
VipsPlugin
::
$instance
->
getIconNavigation
(
$course_id
,
null
,
null
)
?>
<?
$nav
=
VipsPlugin
::
$instance
->
getIconNavigation
(
$course_id
,
null
,
null
)
?>
<?
if
(
$nav
)
:
?>
<tr>
<tr>
<td>
<td>
<?=
CourseAvatar
::
getAvatar
(
$course_id
)
->
getImageTag
(
Avatar
::
SMALL
)
?>
<?=
CourseAvatar
::
getAvatar
(
$course_id
)
->
getImageTag
(
Avatar
::
SMALL
)
?>
...
@@ -30,6 +31,7 @@
...
@@ -30,6 +31,7 @@
</a>
</a>
</td>
</td>
</tr>
</tr>
<?
endif
?>
<?
endforeach
?>
<?
endforeach
?>
</tbody>
</tbody>
</table>
</table>
...
...
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