ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSEContent Class Reference

Representation of ECS EContent. More...

+ Collaboration diagram for ilECSEContent:

Public Member Functions

 __construct ($a_eid=0)
 Constructor.
 getEContentId ()
 get econtent id
 setObjId ($a_id)
 set ILIAS obj_id
 getObjId ()
 get obj_id
 getOrganization ()
 get organization
 getTimePlace ()
 get time place
 setTitle ($a_title)
 set title
 getTitle ()
 get title
 setInfo ($a_info)
 set info
 getInfo ()
 getInfo
 setURL ($a_url)
 set url
 getURL ()
 get URL
 setLanguage ($a_key)
 set language
 getLanguage ()
 get language
 getOwner ()
 get owner
 setOwner ($a_owner)
 set owner
 setStatus ($a_status)
 set status
 getStatus ()
 get Status
 isOnline ()
 is online
 setCredits ($a_credits)
 set credits
 getCredits ()
 get credits
 setSemesterHours ($a_semester_hours)
 set semester hours
 getSemesterHours ()
 get semester hours
 setLecturers ($a_lecturer)
 set Lecturer In ILIAS lecturers are stored in AdvancedMetaData.
 getLecturers ()
 get Lecturer
 setStudyCourses ($a_courses)
 setStudyCourses In ILIAS study_courses are stored in AdvancedMetaData.
 getStudyCourses ()
 get study courses
 setCourseType ($a_type)
 set course type
 getCourseType ()
 get courseType
 setCourseID ($a_id)
 set course ID
 getCourseID ()
 get course id
 setTerm ($a_term)
 set term
 getTerm ()
 get Term
 getAbstract ()
 GEt abstract.
 loadFromJSON ($a_json)
 Load from JSON object.

Data Fields

 $url = ''
 $title = ''
 $etype = 'application/ecs-course'
 $status = 'offline'
 $lang = 'en_EN'
 $abstract = ''
 $study_courses = array()
 $credits = ''
 $semesterHours = ''
 $lecturer = array()
 $courseType = ''
 $courseID = ''
 $eid = 0
 $term = ''
 $timePlace = null

Private Attributes

 $obj_id
 $owner = 0

Detailed Description

Representation of ECS EContent.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 33 of file class.ilECSEContent.php.

Constructor & Destructor Documentation

ilECSEContent::__construct (   $a_eid = 0)

Constructor.

public

Parameters

Definition at line 66 of file class.ilECSEContent.php.

{
include_once('./Services/WebServices/ECS/classes/class.ilECSTimePlace.php');
if($a_eid)
{
$this->eid = $a_eid;
}
$this->timePlace = new ilECSTimePlace();
}

Member Function Documentation

ilECSEContent::getAbstract ( )

GEt abstract.

Returns
string

Definition at line 482 of file class.ilECSEContent.php.

References $abstract.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getCourseID ( )

get course id

public

Definition at line 450 of file class.ilECSEContent.php.

References $courseID.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getCourseType ( )

get courseType

public

Definition at line 427 of file class.ilECSEContent.php.

References $courseType.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getCredits ( )

get credits

public

Definition at line 319 of file class.ilECSEContent.php.

References $credits.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getEContentId ( )

get econtent id

public

Definition at line 83 of file class.ilECSEContent.php.

References $eid.

Referenced by ilObjRemoteCourse\_createFromECSEContent(), and ilECSTaskScheduler\handleUpdate().

{
return $this->eid;
}

+ Here is the caller graph for this function:

ilECSEContent::getInfo ( )

getInfo

public

Definition at line 176 of file class.ilECSEContent.php.

References $abstract.

{
}
ilECSEContent::getLanguage ( )

get language

public

Definition at line 225 of file class.ilECSEContent.php.

{
if(strlen($this->lang))
{
return substr($this->lang,0,2);
}
}
ilECSEContent::getLecturers ( )

get Lecturer

public

Returns
string string presentation of lecturers (comma seperated)

Definition at line 373 of file class.ilECSEContent.php.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return implode(', ',$this->lecturer);
}

+ Here is the caller graph for this function:

ilECSEContent::getObjId ( )

get obj_id

public

Parameters

Definition at line 107 of file class.ilECSEContent.php.

References $obj_id.

{
return $this->obj_id;
}
ilECSEContent::getOrganization ( )

get organization

public

Definition at line 118 of file class.ilECSEContent.php.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->organisation;
}

+ Here is the caller graph for this function:

ilECSEContent::getOwner ( )

get owner

public

Definition at line 239 of file class.ilECSEContent.php.

Referenced by ilECSTaskScheduler\handleUpdate(), and ilObjRemoteCourse\updateFromECSContent().

{
return $this->owner ? $this->owner : 0;
}

+ Here is the caller graph for this function:

ilECSEContent::getSemesterHours ( )

get semester hours

public

Definition at line 342 of file class.ilECSEContent.php.

References $semesterHours.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getStatus ( )

get Status

public

Returns
string 'online' or 'offline'

Definition at line 285 of file class.ilECSEContent.php.

{
return $this->status == 'online' ? $this->status : 'offline';
}
ilECSEContent::getStudyCourses ( )

get study courses

public

Definition at line 404 of file class.ilECSEContent.php.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return implode(', ',$this->study_courses);
}

+ Here is the caller graph for this function:

ilECSEContent::getTerm ( )

get Term

public

Definition at line 473 of file class.ilECSEContent.php.

References $term.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->term;
}

+ Here is the caller graph for this function:

ilECSEContent::getTimePlace ( )

get time place

public

Parameters
ilECSTimePlace

Definition at line 130 of file class.ilECSEContent.php.

References $timePlace.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
}

+ Here is the caller graph for this function:

ilECSEContent::getTitle ( )

get title

public

Definition at line 153 of file class.ilECSEContent.php.

References $title.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->title;
}

+ Here is the caller graph for this function:

ilECSEContent::getURL ( )

get URL

public

Definition at line 199 of file class.ilECSEContent.php.

References $url.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->url;
}

+ Here is the caller graph for this function:

ilECSEContent::isOnline ( )

is online

public

Definition at line 296 of file class.ilECSEContent.php.

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->status == 'online' ? true : false;
}

+ Here is the caller graph for this function:

ilECSEContent::loadFromJSON (   $a_json)

Load from JSON object.

public

Parameters
objectJSON object
Exceptions
ilECSReaderException

Definition at line 494 of file class.ilECSEContent.php.

References $ilLog.

{
global $ilLog;
if(!is_object($a_json))
{
include_once('./Services/WebServices/ECS/classes/class.ilECSReaderException.php');
$ilLog->write(__METHOD__.': Cannot load from JSON. No object given.');
throw new ilECSReaderException('Cannot parse ECSContent.');
}
$this->organisation = $a_json->organisation;
$this->study_courses = $a_json->study_courses ? $a_json->study_courses : array();
$this->title = $a_json->title;
$this->abstract = $a_json->abstract;
$this->credits = $a_json->credits;
$this->semesterHours = $a_json->semesterHours;
$this->lecturer = $a_json->lecturer ? $a_json->lecturer : array();
$this->etype = $a_json->etype;
$this->status = $a_json->status;
$this->courseID = $a_json->courseID;
$this->courseType = $a_json->courseType;
#$this->eid = $a_json->eid;
$this->term = $a_json->term;
$this->url = $a_json->url;
$this->lang = $a_json->lang;
if(is_object($a_json->timePlace))
{
$this->timePlace = new ilECSTimePlace();
$this->timePlace->loadFromJSON($a_json->timePlace);
}
else
{
$this->timePlace = new ilECSTimePlace();
}
}
ilECSEContent::setCourseID (   $a_id)

set course ID

public

Parameters
stringcourse id

Definition at line 439 of file class.ilECSEContent.php.

{
$this->courseID = $a_id;
}
ilECSEContent::setCourseType (   $a_type)

set course type

public

Parameters
stringcourse type

Definition at line 416 of file class.ilECSEContent.php.

{
$this->courseType = $a_type;
}
ilECSEContent::setCredits (   $a_credits)

set credits

public

Parameters
stringcredits

Definition at line 308 of file class.ilECSEContent.php.

{
$this->credits = $a_credits;
}
ilECSEContent::setInfo (   $a_info)

set info

public

Parameters
stringinfo (ILIAS description)

Definition at line 165 of file class.ilECSEContent.php.

{
$this->abstract = $a_info;
}
ilECSEContent::setLanguage (   $a_key)

set language

public

Parameters
stringilias language key (e.g 'en')

Definition at line 211 of file class.ilECSEContent.php.

{
if(strlen($a_key))
{
$this->lang = ($a_key.'_'.strtoupper($a_key));
}
}
ilECSEContent::setLecturers (   $a_lecturer)

set Lecturer In ILIAS lecturers are stored in AdvancedMetaData.

Multiple lecturers should be comma seperated.

public

Parameters

Definition at line 356 of file class.ilECSEContent.php.

References $lecturer.

{
$lecturer_arr = explode(',',$a_lecturer);
$this->lecturer = array();
foreach($lecturer_arr as $lecturer)
{
$this->lecturer[] = trim($lecturer);
}
return true;
}
ilECSEContent::setObjId (   $a_id)

set ILIAS obj_id

public

Parameters
intobj_id

Definition at line 95 of file class.ilECSEContent.php.

{
$this->obj_id = $a_id;
}
ilECSEContent::setOwner (   $a_owner)

set owner

public

Parameters
intmid (publish as)

Definition at line 251 of file class.ilECSEContent.php.

{
$this->owner = (int) $a_owner;
}
ilECSEContent::setSemesterHours (   $a_semester_hours)

set semester hours

public

Parameters
stringsemester hours

Definition at line 331 of file class.ilECSEContent.php.

{
$this->semesterHours = $a_semester_hours;
}
ilECSEContent::setStatus (   $a_status)

set status

public

Parameters
stringstatus 'online' or 'offline'

Definition at line 264 of file class.ilECSEContent.php.

{
switch($a_status)
{
case 'online':
$this->status = 'online';
break;
default:
$this->status = 'offline';
break;
}
}
ilECSEContent::setStudyCourses (   $a_courses)

setStudyCourses In ILIAS study_courses are stored in AdvancedMetaData.

Multiple courses should be comma seperated.

public

Parameters
stringcomma seperated study courses

Definition at line 387 of file class.ilECSEContent.php.

{
$courses_arr = explode(',',$a_courses);
$this->study_courses = array();
foreach($courses_arr as $course)
{
$this->study_courses[] = trim($course);
}
return true;
}
ilECSEContent::setTerm (   $a_term)

set term

public

Parameters
stringterm

Definition at line 462 of file class.ilECSEContent.php.

{
$this->term = $a_term;
}
ilECSEContent::setTitle (   $a_title)

set title

public

Parameters
stringtitle

Definition at line 142 of file class.ilECSEContent.php.

{
$this->title = $a_title;
}
ilECSEContent::setURL (   $a_url)

set url

public

Parameters
stringurl to resource

Definition at line 188 of file class.ilECSEContent.php.

{
$this->url = $a_url;
}

Field Documentation

ilECSEContent::$abstract = ''

Definition at line 47 of file class.ilECSEContent.php.

Referenced by getAbstract(), and getInfo().

ilECSEContent::$courseID = ''

Definition at line 53 of file class.ilECSEContent.php.

Referenced by getCourseID().

ilECSEContent::$courseType = ''

Definition at line 52 of file class.ilECSEContent.php.

Referenced by getCourseType().

ilECSEContent::$credits = ''

Definition at line 49 of file class.ilECSEContent.php.

Referenced by getCredits().

ilECSEContent::$eid = 0

Definition at line 54 of file class.ilECSEContent.php.

Referenced by getEContentId().

ilECSEContent::$etype = 'application/ecs-course'

Definition at line 44 of file class.ilECSEContent.php.

ilECSEContent::$lang = 'en_EN'

Definition at line 46 of file class.ilECSEContent.php.

ilECSEContent::$lecturer = array()

Definition at line 51 of file class.ilECSEContent.php.

Referenced by setLecturers().

ilECSEContent::$obj_id
private

Definition at line 35 of file class.ilECSEContent.php.

Referenced by getObjId().

ilECSEContent::$owner = 0
private

Definition at line 36 of file class.ilECSEContent.php.

ilECSEContent::$semesterHours = ''

Definition at line 50 of file class.ilECSEContent.php.

Referenced by getSemesterHours().

ilECSEContent::$status = 'offline'

Definition at line 45 of file class.ilECSEContent.php.

ilECSEContent::$study_courses = array()

Definition at line 48 of file class.ilECSEContent.php.

ilECSEContent::$term = ''

Definition at line 55 of file class.ilECSEContent.php.

Referenced by getTerm().

ilECSEContent::$timePlace = null

Definition at line 56 of file class.ilECSEContent.php.

Referenced by getTimePlace().

ilECSEContent::$title = ''

Definition at line 42 of file class.ilECSEContent.php.

Referenced by getTitle().

ilECSEContent::$url = ''

Definition at line 41 of file class.ilECSEContent.php.

Referenced by getURL().


The documentation for this class was generated from the following file: