ILIAS  eassessment Revision 61809
 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
 setEligibleMembers ($a_members)
 set eligible members
 getEligibleMembers ()
 get eligible members
 getOwner ()
 get owner
 setOwner ($a_owner)
 set owner
 getParticipants ()
 get participants
 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
 loadFromJSON ($a_json)
 Load from JSON object.

Data Fields

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

Private Attributes

 $obj_id

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 65 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::getCourseID ( )

get course id

public

Definition at line 484 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 461 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 353 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 82 of file class.ilECSEContent.php.

References $eid.

Referenced by ilObjRemoteCourse\_createFromECSEContent().

{
return $this->eid;
}

+ Here is the caller graph for this function:

ilECSEContent::getEligibleMembers ( )

get eligible members

public

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

Referenced by getParticipants().

{
return $this->eligibleMembers ? $this->eligibleMembers : array();
}

+ Here is the caller graph for this function:

ilECSEContent::getInfo ( )

getInfo

public

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

References $abstract.

{
}
ilECSEContent::getLanguage ( )

get language

public

Definition at line 224 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 407 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 106 of file class.ilECSEContent.php.

References $obj_id.

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

get organization

public

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

Referenced by ilObjRemoteCourse\updateFromECSContent().

{
return $this->organization;
}

+ Here is the caller graph for this function:

ilECSEContent::getOwner ( )

get owner

public

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

Referenced by ilObjRemoteCourse\updateFromECSContent().

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

+ Here is the caller graph for this function:

ilECSEContent::getParticipants ( )

get participants

public

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

References getEligibleMembers().

{
return $this->getEligibleMembers();
}

+ Here is the call graph for this function:

ilECSEContent::getSemesterHours ( )

get semester hours

public

Definition at line 376 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 319 of file class.ilECSEContent.php.

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

get study courses

public

Definition at line 438 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 507 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 129 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 152 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 198 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 330 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 519 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->organization = $a_json->organization;
$this->study_courses = $a_json->study_courses ? $a_json->study_courses : array();
$this->owner = $a_json->owner;
$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();
}
$this->eligibleMembers = $a_json->eligibleMembers ? $a_json->eligibleMembers : array();
}
ilECSEContent::setCourseID (   $a_id)

set course ID

public

Parameters
stringcourse id

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

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

set course type

public

Parameters
stringcourse type

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

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

set credits

public

Parameters
stringcredits

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

{
$this->credits = $a_credits;
}
ilECSEContent::setEligibleMembers (   $a_members)

set eligible members

public

Parameters
arrayarray of mids

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

{
$this->eligibleMembers = array();
foreach($a_members as $member)
{
$this->eligibleMembers[] = (int) $member;
}
}
ilECSEContent::setInfo (   $a_info)

set info

public

Parameters
stringinfo (ILIAS description)

Definition at line 164 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 210 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 390 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 94 of file class.ilECSEContent.php.

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

set owner

public

Parameters
intmid (publish as)

Definition at line 275 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 365 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 298 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 421 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 496 of file class.ilECSEContent.php.

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

set title

public

Parameters
stringtitle

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

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

set url

public

Parameters
stringurl to resource

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

{
$this->url = $a_url;
}

Field Documentation

ilECSEContent::$abstract = ''

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

Referenced by getInfo().

ilECSEContent::$courseID = ''

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

Referenced by getCourseID().

ilECSEContent::$courseType = ''

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

Referenced by getCourseType().

ilECSEContent::$credits = ''

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

Referenced by getCredits().

ilECSEContent::$eid = 0

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

Referenced by getEContentId().

ilECSEContent::$eligibleMembers = array()

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

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

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

ilECSEContent::$lang = 'en_EN'

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

ilECSEContent::$lecturer = array()

Definition at line 50 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

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

ilECSEContent::$semesterHours = ''

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

Referenced by getSemesterHours().

ilECSEContent::$status = 'offline'

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

ilECSEContent::$study_courses = array()

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

ilECSEContent::$term = ''

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

Referenced by getTerm().

ilECSEContent::$timePlace = null

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

Referenced by getTimePlace().

ilECSEContent::$title = ''

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

Referenced by getTitle().

ilECSEContent::$url = ''

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

Referenced by getURL().


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