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
Terraform modules
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
Jakob Diel
Stud.IP
Commits
9c5505ff
Commit
9c5505ff
authored
2 years ago
by
Moritz Strohm
Browse files
Options
Downloads
Patches
Plain Diff
show course details for booking on the same conditions like in the booking plan, closes #1411
Closes #1411 Merge request
studip/studip!889
parent
3c260696
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
app/controllers/resources/booking.php
+12
-0
12 additions, 0 deletions
app/controllers/resources/booking.php
app/views/resources/booking/index.php
+1
-1
1 addition, 1 deletion
app/views/resources/booking/index.php
with
13 additions
and
1 deletion
app/controllers/resources/booking.php
+
12
−
0
View file @
9c5505ff
...
...
@@ -91,6 +91,18 @@ class Resources_BookingController extends AuthenticatedController
)
||
$this
->
make_comment_editable
);
$this
->
user_may_see_course_data
=
false
;
if
(
$this
->
booking
->
getAssignedUserType
()
===
'course'
)
{
$course
=
$this
->
booking
->
assigned_course_date
->
course
;
if
(
$course
instanceof
Course
)
{
$has_perms
=
$GLOBALS
[
'perm'
]
->
have_studip_perm
(
'user'
,
$course
->
id
,
$user
->
id
);
$vis_perms
=
$GLOBALS
[
'perm'
]
->
have_perm
(
Config
::
get
()
->
SEM_VISIBILITY_PERM
,
$user
->
id
);
if
(
$has_perms
||
$vis_perms
||
$course
->
visible
)
{
$this
->
user_may_see_course_data
=
true
;
}
}
Seminar_Perm
::
get
()
->
have_studip_perm
(
'user'
,
$this
->
booking
->
getAssignedUser
()
->
id
);
}
if
(
$this
->
make_comment_editable
&&
Request
::
submitted
(
'save'
))
{
CSRFProtection
::
verifyUnsafeRequest
();
...
...
This diff is collapsed.
Click to expand it.
app/views/resources/booking/index.php
+
1
−
1
View file @
9c5505ff
...
...
@@ -80,7 +80,7 @@
<?
endif
?>
<?
endif
?>
<?
endif
?>
<?
if
(
$
booking
->
getAssignedUserType
()
===
'
course
'
)
:
?>
<?
if
(
$
user_may_see_
course
_data
)
:
?>
<h3>
<?=
_
(
'Gebucht für:'
)
?>
</h3>
<a
href=
"
<?=
URLHelper
::
getScriptLink
(
'dispatch.php/course/details/index/'
...
...
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