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
60e93bc4
Commit
60e93bc4
authored
2 years ago
by
David Siegfried
Browse files
Options
Downloads
Patches
Plain Diff
prevent php-warnings, refs #2358
Merge request
studip/studip!1543
parent
af952774
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
lib/classes/MyRealmModel.php
+8
-8
8 additions, 8 deletions
lib/classes/MyRealmModel.php
with
8 additions
and
8 deletions
lib/classes/MyRealmModel.php
+
8
−
8
View file @
60e93bc4
...
...
@@ -31,9 +31,9 @@ class MyRealmModel
/**
* Check the voting system
* @param
$my_obj
* @param
$user_id
* @param
null $modules
* @param
string
$my_obj
* @param
string
$user_id
* @param
$object_id
*/
public
static
function
checkVote
(
&
$my_obj
,
$user_id
,
$object_id
)
{
...
...
@@ -320,8 +320,8 @@ class MyRealmModel
if
(
$group_field
===
'sem_tree_id'
)
{
$_course
[
'sem_tree'
]
=
$course
->
study_areas
->
toArray
();
}
$user_status
=
@
$member_ships
[
$course
->
id
][
'status'
];
$deputy
=
null
;
$user_status
=
$member_ships
[
$course
->
id
][
'status'
]
??
null
;
if
(
!
$user_status
&&
Config
::
get
()
->
DEPUTIES_ENABLE
&&
Deputy
::
isDeputy
(
$GLOBALS
[
'user'
]
->
id
,
$course
->
id
))
{
$user_status
=
'dozent'
;
$deputy
=
Deputy
::
findOneBySQL
(
'range_id = ? AND user_id = ?'
,
[
$course
->
id
,
$GLOBALS
[
'user'
]
->
id
]);
...
...
@@ -341,7 +341,7 @@ class MyRealmModel
$_course
[
'last_visitdate'
]
=
$visits
[
$course
->
id
][
0
][
'last_visitdate'
];
$_course
[
'visitdate'
]
=
$visits
[
$course
->
id
][
0
][
'visitdate'
];
$_course
[
'user_status'
]
=
$user_status
;
$_course
[
'gruppe'
]
=
!
$is_deputy
?
@
$member_ships
[
$course
->
id
][
'gruppe'
]
:
$deputy
->
gruppe
;
$_course
[
'gruppe'
]
=
!
$is_deputy
?
$member_ships
[
$course
->
id
][
'gruppe'
]
??
null
:
(
$deputy
?
$deputy
->
gruppe
:
null
)
;
$_course
[
'sem_number_end'
]
=
$course
->
isOpenEnded
()
?
$max_sem_key
:
Semester
::
getIndexById
(
$course
->
end_semester
->
id
);
$_course
[
'sem_number'
]
=
Semester
::
getIndexById
(
$course
->
start_semester
->
id
);
$_course
[
'tools'
]
=
$course
->
tools
;
...
...
@@ -541,7 +541,7 @@ class MyRealmModel
/**
* Returns a list of all the courses the user is in the waiting list for.
*
* @param $user_id Id of the user
* @param
string
$user_id Id of the user
* @return array
*/
public
static
function
getWaitingList
(
$user_id
)
...
...
@@ -897,7 +897,7 @@ class MyRealmModel
/**
* Trims an array from it's null value from the right.
*
* @param
A
rray $array The array to trim
* @param
a
rray $array The array to trim
* @return array The trimmed array
* @author tlx
*/
...
...
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