ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
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
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilECSCourseConnector.php
Go to the documentation of this file.
1
<?php
2
18
declare(strict_types=1);
19
23
class
ilECSCourseConnector
extends
ilECSConnector
24
{
29
public
function
getCourse
($course_id, $a_details =
false
)
30
{
31
$this->path_postfix =
'/campusconnect/courses/'
. (
int
) $course_id;
32
33
if
($a_details && $course_id) {
34
$this->path_postfix .=
'/details'
;
35
}
36
37
try
{
38
$this->
prepareConnection
();
39
$this->
setHeader
([]);
40
if
($a_details) {
41
$this->
addHeader
(
'Accept'
,
'application/json'
);
42
}
else
{
43
$this->
addHeader
(
'Accept'
,
'text/uri-list'
);
44
}
45
$this->curl->setOpt(CURLOPT_HTTPHEADER, $this->
getHeader
());
46
$res
= $this->
call
();
47
48
if
(strpos(
$res
,
'http'
) === 0) {
49
$json = file_get_contents(
$res
);
50
$ecs_result =
new
ilECSResult
($json);
51
}
else
{
52
$ecs_result =
new
ilECSResult
(
$res
);
53
}
54
55
// Return ECSEContentDetails for details switch
56
if
($a_details) {
57
$details
=
new
ilECSEContentDetails
();
58
$details
->loadFromJson($ecs_result->getResult());
59
return
$details
;
60
}
61
// Return json result
62
return
$ecs_result->getResult();
63
}
catch
(
ilCurlConnectionException
$e
) {
64
$this->
logger
->error(
'Error calling ECS service: '
. $e->getMessage());
65
throw
new
ilECSConnectorException
(
'Error calling ECS service: '
. $e->getMessage());
66
}
67
}
68
}
$res
$res
Definition:
ltiservices.php:69
ilCurlConnectionException
Definition:
class.ilCurlConnectionException.php:34
ilECSConnector\getHeader
getHeader()
Definition:
class.ilECSConnector.php:67
ilECSResult
Definition:
class.ilECSResult.php:23
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
ilECSConnector\addHeader
addHeader(string $a_name, string $a_value)
Add Header.
Definition:
class.ilECSConnector.php:62
ilECSEContentDetails
Presentation of ecs content details (http://...campusconnect/courselinks/id/details) ...
Definition:
class.ilECSEContentDetails.php:25
ILIAS\LTI\ToolProvider\$details
array $details
Details for error message relating to last request processed.
Definition:
System.php:109
ilECSConnectorException
Definition:
class.ilECSConnectorException.php:23
ilECSCourseConnector
Definition:
class.ilECSCourseConnector.php:23
ILIAS\Repository\logger
logger()
Definition:
trait.GlobalDICDomainServices.php:66
ilECSConnector\call
call()
call peer
Definition:
class.ilECSConnector.php:519
ilECSConnector
Definition:
class.ilECSConnector.php:24
ilECSConnector\setHeader
setHeader(array $a_header_strings)
Definition:
class.ilECSConnector.php:72
ilECSConnector\prepareConnection
prepareConnection()
prepare connection
Definition:
class.ilECSConnector.php:470
ilECSCourseConnector\getCourse
getCourse($course_id, $a_details=false)
Get single directory tree.
Definition:
class.ilECSCourseConnector.php:29
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Services
WebServices
ECS
classes
Course
class.ilECSCourseConnector.php
Generated on Thu Apr 10 2025 22:02:51 for ILIAS by
1.8.13 (using
Doxyfile
)