ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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  }
29 
34  public function setCmsLectureId($a_id)
35  {
36  $this->cms_lecture_id = $a_id;
37  }
38 
43  public function setECSId($a_id)
44  {
45  $this->ecs_course_url = self::COURSE_URL_PREFIX.$a_id;
46  }
47 
52  public function addLmsCourseUrls(ilECSCourseLmsUrl $lms_url = null)
53  {
54  $this->lms_course_urls[] = $lms_url;
55  }
56 
60  public function send(ilECSSetting $setting, $ecs_receiver_mid)
61  {
62  include_once './Services/WebServices/ECS/classes/Course/class.ilECSCourseUrlConnector.php';
63  try
64  {
65  $con = new ilECSCourseUrlConnector($setting);
66  $url_id = $con->addUrl($this, $ecs_receiver_mid);
67 
68  $GLOBALS['ilLog']->write(__METHOD__.': Received new url id ' . $url_id);
69  }
70  catch(Exception $e)
71  {
72  $GLOBALS['ilLog']->write(__METHOD__.': '.$e->getMessage());
73  }
74  }
75 }
76 ?>