ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilECSCourseUrl.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseUrlConnector.php';
5 
13 {
14  const COURSE_URL_PREFIX = 'campusconnect/course/';
15 
16  // json fields
17  public $cms_lecture_id = '';
18  public $ecs_course_url = '';
19  public $lms_course_urls = null;
20 
21 
25  public function __construct()
26  {
27  }
28 
33  public function setCmsLectureId($a_id)
34  {
35  $this->cms_lecture_id = $a_id;
36  }
37 
42  public function setECSId($a_id)
43  {
44  $this->ecs_course_url = self::COURSE_URL_PREFIX . $a_id;
45  }
46 
51  public function addLmsCourseUrls(ilECSCourseLmsUrl $lms_url = null)
52  {
53  $this->lms_course_urls[] = $lms_url;
54  }
55 
59  public function send(ilECSSetting $setting, $ecs_receiver_mid)
60  {
61  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseUrlConnector.php';
62  try {
63  $con = new ilECSCourseUrlConnector($setting);
64  $url_id = $con->addUrl($this, $ecs_receiver_mid);
65 
66  $GLOBALS['ilLog']->write(__METHOD__ . ': Received new url id ' . $url_id);
67  } catch (Exception $e) {
68  $GLOBALS['ilLog']->write(__METHOD__ . ': ' . $e->getMessage());
69  }
70  }
71 }
setECSId($a_id)
Set ecs course id.
setCmsLectureId($a_id)
Set lecture id.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
__construct()
Constructor.
Connector for writing ecs course urls.
Represents a ecs course lms url.
addLmsCourseUrls(ilECSCourseLmsUrl $lms_url=null)
Add lms url.
Represents a ecs course url.
send(ilECSSetting $setting, $ecs_receiver_mid)
Send urls to ecs.