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
f5061b58
Commit
f5061b58
authored
2 years ago
by
Felix Pahlow
Committed by
David Siegfried
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Skip recursive lookup if no modules are chosen from ILIAS #1615
Closes #1615 Merge request
studip/studip!1040
parent
17b375d7
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
lib/elearning/Ilias4ConnectedCMS.class.php
+2
-1
2 additions, 1 deletion
lib/elearning/Ilias4ConnectedCMS.class.php
lib/ilias_interface/ConnectedIlias.class.php
+22
-18
22 additions, 18 deletions
lib/ilias_interface/ConnectedIlias.class.php
with
24 additions
and
19 deletions
lib/elearning/Ilias4ConnectedCMS.class.php
+
2
−
1
View file @
f5061b58
...
...
@@ -41,7 +41,8 @@ class Ilias4ConnectedCMS extends Ilias3ConnectedCMS
}
/**
* Helper function to fetch childs including objects in folders
* Helper function to fetch children including objects in folders
* The typo in the function name, 'childs', is intentional to reflect the name of the ILIAS-SOAP call.
*
* @access public
* @param string $parent_id
...
...
This diff is collapsed.
Click to expand it.
lib/ilias_interface/ConnectedIlias.class.php
+
22
−
18
View file @
f5061b58
...
...
@@ -687,7 +687,8 @@ class ConnectedIlias
}
/**
* Helper function to fetch childs including objects in folders
* Helper function to fetch children including objects in folders
* The typo in the function name, 'childs', is intentional to reflect the name of the ILIAS-SOAP call.
*
* @access public
* @param string $parent_id
...
...
@@ -695,28 +696,31 @@ class ConnectedIlias
*/
public
function
getChilds
(
$parent_id
)
{
$types
[]
=
'fold'
;
foreach
(
$this
->
ilias_config
[
'modules'
]
as
$type
=>
$name
)
{
$types
[]
=
$type
;
}
$result
=
$this
->
soap_client
->
getTreeChilds
(
$parent_id
,
$types
);
$user_result
=
$this
->
soap_client
->
getTreeChilds
(
$parent_id
,
$types
,
$this
->
user
->
getId
());
if
(
$result
)
{
foreach
(
$result
as
$ref_id
=>
$data
)
{
if
(
$data
[
'type'
]
==
'fold'
)
{
unset
(
$result
[
$ref_id
]);
$result
=
$result
+
$this
->
getChilds
(
$ref_id
);
}
else
{
$result
[
$ref_id
][
'accessInfo'
]
=
$user_result
[
$ref_id
][
'accessInfo'
];
$result
[
$ref_id
][
'references'
][
$ref_id
]
=
$user_result
[
$ref_id
][
'references'
][
$ref_id
];
if
(
isset
(
$this
->
ilias_config
[
'modules'
])
&&
$this
->
ilias_config
[
'modules'
])
{
foreach
(
$this
->
ilias_config
[
'modules'
]
as
$type
=>
$name
)
{
$types
[]
=
$type
;
}
$result
=
$this
->
soap_client
->
getTreeChilds
(
$parent_id
,
$types
);
$user_result
=
$this
->
soap_client
->
getTreeChilds
(
$parent_id
,
$types
,
$this
->
user
->
getId
());
if
(
$result
)
{
foreach
(
$result
as
$ref_id
=>
$data
)
{
if
(
$data
[
'type'
]
==
'fold'
)
{
unset
(
$result
[
$ref_id
]);
$result
=
$result
+
$this
->
getChilds
(
$ref_id
);
}
else
{
$result
[
$ref_id
][
'accessInfo'
]
=
$user_result
[
$ref_id
][
'accessInfo'
];
$result
[
$ref_id
][
'references'
][
$ref_id
]
=
$user_result
[
$ref_id
][
'references'
][
$ref_id
];
}
}
}
}
if
(
is_array
(
$result
))
if
(
isset
(
$result
)
&&
is_array
(
$result
))
{
return
$result
;
else
return
[];
}
else
{
return
[];
}
}
/**
...
...
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