ILIAS
trunk Revision v11.0_alpha-1769-g99a433fe2dc
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
class.ilECSCourseConnector.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
24
class
ilECSCourseConnector
extends
ilECSConnector
25
{
30
public
function
getCourse
($course_id, $a_details =
false
)
31
{
32
$this->path_postfix =
'/campusconnect/courses/'
. (
int
) $course_id;
33
34
if
($a_details && $course_id) {
35
$this->path_postfix .=
'/details'
;
36
}
37
38
try
{
39
$this->
prepareConnection
();
40
$this->
setHeader
([]);
41
if
($a_details) {
42
$this->
addHeader
(
'Accept'
,
'application/json'
);
43
}
else
{
44
$this->
addHeader
(
'Accept'
,
'text/uri-list'
);
45
}
46
$this->curl->setOpt(CURLOPT_HTTPHEADER, $this->
getHeader
());
47
$res
= $this->
call
();
48
49
if
(strpos(
$res
,
'http'
) === 0) {
50
$json = file_get_contents(
$res
);
51
$ecs_result =
new
ilECSResult
($json);
52
}
else
{
53
$ecs_result =
new
ilECSResult
(
$res
);
54
}
55
56
// Return ECSEContentDetails for details switch
57
if
($a_details) {
58
$details =
new
ilECSEContentDetails
();
59
$details->loadFromJson($ecs_result->getResult());
60
return
$details;
61
}
62
// Return json result
63
return
$ecs_result->getResult();
64
}
catch
(
ilCurlConnectionException
$e
) {
65
$this->
logger
->error(
'Error calling ECS service: '
. $e->getMessage());
66
throw
new
ilECSConnectorException
(
'Error calling ECS service: '
. $e->getMessage());
67
}
68
}
69
}
$res
$res
Definition:
ltiservices.php:66
ilCurlConnectionException
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
class.ilCurlConnectionException.php:26
ilECSConnector\getHeader
getHeader()
Definition:
class.ilECSConnector.php:68
ilECSResult
Definition:
class.ilECSResult.php:24
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
ilECSConnector\addHeader
addHeader(string $a_name, string $a_value)
Add Header.
Definition:
class.ilECSConnector.php:63
ilECSEContentDetails
Presentation of ecs content details (http://...campusconnect/courselinks/id/details) ...
Definition:
class.ilECSEContentDetails.php:26
ilECSConnectorException
Definition:
class.ilECSConnectorException.php:24
ilECSCourseConnector
Definition:
class.ilECSCourseConnector.php:24
ILIAS\Repository\logger
logger()
Definition:
trait.GlobalDICDomainServices.php:71
ilECSConnector\call
call()
call peer
Definition:
class.ilECSConnector.php:520
ilECSConnector
Definition:
class.ilECSConnector.php:25
ilECSConnector\setHeader
setHeader(array $a_header_strings)
Definition:
class.ilECSConnector.php:73
ilECSConnector\prepareConnection
prepareConnection()
prepare connection
Definition:
class.ilECSConnector.php:471
ilECSCourseConnector\getCourse
getCourse($course_id, $a_details=false)
Get single directory tree.
Definition:
class.ilECSCourseConnector.php:30
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
WebServices
ECS
classes
Course
class.ilECSCourseConnector.php
Generated on Sun Apr 13 2025 23:04:24 for ILIAS by
1.8.13 (using
Doxyfile
)