Inheritance diagram for ilObjiLincClassroom:
Collaboration diagram for ilObjiLincClassroom:Public Member Functions | |
| ilObjiLincClassroom ($a_icla_id, $a_icrs_id) | |
| Constructor public. | |
| _lookupiCourseId ($a_ref_id) | |
| read () | |
| private | |
| joinClass (&$a_user_obj, $a_ilinc_class_id) | |
| findUser (&$a_user_obj) | |
| update () | |
| update object data | |
| delete () | |
| delete object and all related data | |
| getDocentList () | |
| _getDocent ($a_ilinc_user_id) | |
| _setFullname ($a_title="", $a_firstname="", $a_lastname="") | |
| setDocentId ($a_ilinc_user_id) | |
| getDocentName () | |
| getDocentId () | |
| setStatus ($a_status) | |
| getStatus () | |
| getErrorMsg () | |
Definition at line 37 of file class.ilObjiLincClassroom.php.
| ilObjiLincClassroom::_getDocent | ( | $ | a_ilinc_user_id | ) |
Definition at line 222 of file class.ilObjiLincClassroom.php.
References ilObject::$lng, $q, $row, and _setFullname().
Referenced by getDocentName(), and ilObjiLincClassroomListGUI::getProperties().
{
global $ilDB, $lng;
$fullname = false;
$q = "SELECT title,firstname,lastname FROM usr_data WHERE ilinc_id = '".$a_ilinc_user_id."' LIMIT 1";
$r = $ilDB->query($q);
while ($row = $r->fetchRow(DB_FETCHMODE_OBJECT))
{
$fullname = ilObjiLincClassroom::_setFullname($row->title,$row->firstname,$row->lastname);
}
return $fullname;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjiLincClassroom::_lookupiCourseId | ( | $ | a_ref_id | ) |
Definition at line 73 of file class.ilObjiLincClassroom.php.
References $q.
Referenced by getDocentList(), and ilObjiLincClassroomGUI::saveObject().
{
global $ilDB;
$q = "SELECT course_id FROM ilinc_data ".
"LEFT JOIN object_reference ON object_reference.obj_id=ilinc_data.obj_id ".
"WHERE object_reference.ref_id = '".$a_ref_id."'";
$obj_set = $ilDB->query($q);
$obj_rec = $obj_set->fetchRow(DB_FETCHMODE_ASSOC);
return $obj_rec["course_id"];
}
Here is the caller graph for this function:| ilObjiLincClassroom::_setFullname | ( | $ | a_title = "", |
|
| $ | a_firstname = "", |
|||
| $ | a_lastname = "" | |||
| ) |
Definition at line 239 of file class.ilObjiLincClassroom.php.
Referenced by _getDocent().
{
$fullname = "";
if ($a_title)
{
$fullname = $a_title." ";
}
if ($a_firstname)
{
$fullname .= $a_firstname." ";
}
if ($a_lastname)
{
return $fullname.$a_lastname;
}
}
Here is the caller graph for this function:| ilObjiLincClassroom::delete | ( | ) |
delete object and all related data
public
Reimplemented from ilObject.
Definition at line 184 of file class.ilObjiLincClassroom.php.
{
$this->ilincAPI->removeClass($this->id);
$response = $this->ilincAPI->sendRequest();
if ($response->isError())
{
if (!$response->getErrorMsg())
{
$this->error_msg = "err_delete_classroom";
}
else
{
$this->error_msg = $response->getErrorMsg();
}
return false;
}
return true;
}
| ilObjiLincClassroom::findUser | ( | &$ | a_user_obj | ) |
Definition at line 141 of file class.ilObjiLincClassroom.php.
References exit.
{
$this->ilincAPI->findUser($a_user_obj);
$response = $this->ilincAPI->sendRequest();
var_dump($response->data);
exit;
}
| ilObjiLincClassroom::getDocentId | ( | ) |
Definition at line 274 of file class.ilObjiLincClassroom.php.
Referenced by update().
{
return $this->docent_id;
}
Here is the caller graph for this function:| ilObjiLincClassroom::getDocentList | ( | ) |
Definition at line 207 of file class.ilObjiLincClassroom.php.
References _lookupiCourseId().
{
$ilinc_crs_id = ilObjiLincClassroom::_lookupiCourseId($this->parent);
$this->ilincAPI->findRegisteredUsersByRole($ilinc_crs_id,true);
$response = $this->ilincAPI->sendRequest();
if (is_array($response->data['users']))
{
return $response->data['users'];
}
return array();
}
Here is the call graph for this function:| ilObjiLincClassroom::getDocentName | ( | ) |
Definition at line 264 of file class.ilObjiLincClassroom.php.
References _getDocent().
{
if (!$this->docent_name)
{
$this->docent_name = $this->_getDocent($this->docent_id);
}
return $this->docent_name;
}
Here is the call graph for this function:| ilObjiLincClassroom::getErrorMsg | ( | ) |
Definition at line 296 of file class.ilObjiLincClassroom.php.
{
$err_msg = $this->error_msg;
$this->error_msg = "";
return $err_msg;
}
| ilObjiLincClassroom::getStatus | ( | ) |
Definition at line 291 of file class.ilObjiLincClassroom.php.
Referenced by update().
{
return $this->status;
}
Here is the caller graph for this function:| ilObjiLincClassroom::ilObjiLincClassroom | ( | $ | a_icla_id, | |
| $ | a_icrs_id | |||
| ) |
Constructor public.
| integer | reference_id or object_id | |
| boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 45 of file class.ilObjiLincClassroom.php.
References $ilErr, ilObject::$ilias, ilObject::$lng, and read().
{
global $ilErr,$ilias,$lng;
$this->type = "icla";
$this->id = $a_icla_id;
$this->parent = $a_icrs_id;
$this->ilincAPI = new ilnetucateXMLAPI();
$this->ilErr =& $ilErr;
$this->ilias =& $ilias;
$this->lng =& $lng;
$this->max_title = MAXLENGTH_OBJ_TITLE;
$this->max_desc = MAXLENGTH_OBJ_DESC;
$this->add_dots = true;
$this->referenced = false;
$this->call_by_reference = false;
if (!empty($this->id))
{
$this->read();
}
return $this;
}
Here is the call graph for this function:| ilObjiLincClassroom::joinClass | ( | &$ | a_user_obj, | |
| $ | a_ilinc_class_id | |||
| ) |
Definition at line 118 of file class.ilObjiLincClassroom.php.
{
$this->ilincAPI->joinClass($a_user_obj,$a_ilinc_class_id);
$response = $this->ilincAPI->sendRequest("joinClass");
if ($response->isError())
{
if (!$response->getErrorMsg())
{
$this->error_msg = "err_join_classroom";
}
else
{
$this->error_msg = $response->getErrorMsg();
}
return false;
}
// return URL to join class room
return trim($response->data['url']['cdata']);
}
| ilObjiLincClassroom::read | ( | ) |
private
Definition at line 90 of file class.ilObjiLincClassroom.php.
References ilObject::setDescription(), setDocentId(), setStatus(), and ilObject::setTitle().
Referenced by ilObjiLincClassroom().
{
$this->ilincAPI->findClass($this->id);
$response = $this->ilincAPI->sendRequest();
if ($response->isError())
{
if (!$response->getErrorMsg())
{
$this->error_msg = "err_read_class";
}
else
{
$this->error_msg = $response->getErrorMsg();
}
return false;
}
$this->setTitle($response->data['classes'][$this->id]['name']);
$this->setDescription($response->data['classes'][$this->id]['description']);
$this->setDocentId($response->data['classes'][$this->id]['instructoruserid']);
$this->setStatus($response->data['classes'][$this->id]['alwaysopen']);
// TODO: fetch instructor user if assigned
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjiLincClassroom::setDocentId | ( | $ | a_ilinc_user_id | ) |
Definition at line 259 of file class.ilObjiLincClassroom.php.
Referenced by read().
{
$this->docent_id = $a_ilinc_user_id;
}
Here is the caller graph for this function:| ilObjiLincClassroom::setStatus | ( | $ | a_status | ) |
Definition at line 279 of file class.ilObjiLincClassroom.php.
Referenced by read().
{
if ($a_status == "Wahr")
{
$this->status = true;
}
else
{
$this->status = false;
}
}
Here is the caller graph for this function:| ilObjiLincClassroom::update | ( | ) |
update object data
public
Reimplemented from ilObject.
Definition at line 156 of file class.ilObjiLincClassroom.php.
References ilObject::getDescription(), getDocentId(), getStatus(), and ilObject::getTitle().
{
$this->ilincAPI->editClass($this->id,array("name" => $this->getTitle(),"description" => $this->getDescription(), "instructoruserid" => $this->getDocentId(), "alwaysopen" => (string) $this->getStatus()));
$response = $this->ilincAPI->sendRequest("editClass");
if ($response->isError())
{
if (!$response->getErrorMsg())
{
$this->error_msg = "err_edit_classroom";
}
else
{
$this->error_msg = $response->getErrorMsg();
}
return false;
}
return true;
}
Here is the call graph for this function:
1.7.1