Public Member Functions | |
| ilChatRecording ($a_id=0) | |
| Constructor public. | |
| getErrorMessage () | |
| setRoomId ($a_id) | |
| getRoomId () | |
| setRefId ($a_id) | |
| getRefId () | |
| setRecordId ($a_id) | |
| getRecordId () | |
| getStartTime () | |
| getEndTime () | |
| setModeratorId ($a_id) | |
| getModeratorId () | |
| setRecord ($a_data) | |
| getRecord ($a_id=0) | |
| setTitle ($a_title) | |
| getTitle () | |
| setDescription ($a_description) | |
| getDescription () | |
| startRecording ($a_title="") | |
| stopRecording () | |
| isRecording () | |
| getRecordings () | |
| getModerator ($a_id=0) | |
| delete ($a_id=0) | |
| exportMessages () | |
Data Fields | |
| $ilias | |
| $lng | |
| $error_msg | |
| $ref_id = 0 | |
| $moderator_id = 0 | |
| $room_id = 0 | |
| $record_id = 0 | |
| $data = array() | |
Definition at line 33 of file class.ilChatRecording.php.
| ilChatRecording::delete | ( | $ | a_id = 0 |
) |
Definition at line 265 of file class.ilChatRecording.php.
References $data, $query, $res, getRecordId(), setRecord(), and setRecordId().
{
if ($a_id == 0 ||
$a_id == $this->getRecordId())
{
$a_id = $this->getRecordId();
$this->setRecordId(0);
$data = array();
$this->setRecord($data);
}
$query = "DELETE FROM chat_records WHERE
record_id = '" . $a_id . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::delete(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
$query = "DELETE FROM chat_record_data WHERE
record_id = '" . $a_id . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::delete(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
}
Here is the call graph for this function:| ilChatRecording::exportMessages | ( | ) |
Definition at line 288 of file class.ilChatRecording.php.
References $data, $num, $query, $res, and getRecordId().
{
$query = "SELECT message FROM chat_record_data WHERE
record_id = '" . $this->getRecordId() . "' ORDER BY
msg_time ASC";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::exportMessages(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
$html = "";
if (($num = $res->numRows()) > 0)
{
$html = "";
for ($i = 0; $i < $num; $i++)
{
$data = $res->fetchRow(DB_FETCHMODE_ASSOC);
$html .= $data["message"] . "<br />\n";
}
}
return $html;
}
Here is the call graph for this function:| ilChatRecording::getDescription | ( | ) |
Definition at line 160 of file class.ilChatRecording.php.
{
return $this->data["description"];
}
| ilChatRecording::getEndTime | ( | ) |
Definition at line 105 of file class.ilChatRecording.php.
{
return $this->data["end_time"];
}
| ilChatRecording::getErrorMessage | ( | ) |
Definition at line 69 of file class.ilChatRecording.php.
{
return $this->error_msg;
}
| ilChatRecording::getModerator | ( | $ | a_id = 0 |
) |
Definition at line 245 of file class.ilChatRecording.php.
References $query, $res, and getModeratorId().
{
if ($a_id == 0)
{
$a_id = $this->getModeratorId();
}
$query = "SELECT * FROM usr_data WHERE
usr_id = '" . $a_id . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::getModerator(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
if ($res->numRows() > 0)
{
return $res->fetchRow(DB_FETCHMODE_ASSOC);
}
return false;
}
Here is the call graph for this function:| ilChatRecording::getModeratorId | ( | ) |
Definition at line 114 of file class.ilChatRecording.php.
Referenced by getModerator(), and startRecording().
{
return $this->moderator_id;
}
Here is the caller graph for this function:| ilChatRecording::getRecord | ( | $ | a_id = 0 |
) |
Definition at line 123 of file class.ilChatRecording.php.
References $data, $query, $res, $status, getRecordId(), setRecord(), and setRecordId().
Referenced by isRecording(), and startRecording().
{
if ($a_id != 0)
{
$this->setRecordId($a_id);
}
$query = "SELECT * FROM chat_records WHERE
record_id = '" . addslashes($this->getRecordId()) . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::getRecord(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
$data = array();
$status = false;
if ($res->numRows() > 0)
{
$data = $res->fetchRow(DB_FETCHMODE_ASSOC);
$status = true;
}
$this->setRecord($data);
return $status;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilChatRecording::getRecordId | ( | ) |
Definition at line 96 of file class.ilChatRecording.php.
Referenced by delete(), exportMessages(), and getRecord().
{
return $this->record_id;
}
Here is the caller graph for this function:| ilChatRecording::getRecordings | ( | ) |
Definition at line 226 of file class.ilChatRecording.php.
References $data, $num, $query, $res, and getRefId().
{
$query = "SELECT * FROM chat_records WHERE
chat_id = '" . $this->getRefId() . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::getRecordings(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
if (($num = $res->numRows()) > 0)
{
for ($i = 0; $i < $num; $i++)
{
$data[] = $res->fetchRow(DB_FETCHMODE_ASSOC);
}
return $data;
}
return false;
}
Here is the call graph for this function:| ilChatRecording::getRefId | ( | ) |
Definition at line 87 of file class.ilChatRecording.php.
Referenced by getRecordings(), isRecording(), startRecording(), and stopRecording().
{
return $this->ref_id;
}
Here is the caller graph for this function:| ilChatRecording::getRoomId | ( | ) |
Definition at line 78 of file class.ilChatRecording.php.
Referenced by isRecording(), startRecording(), and stopRecording().
{
return $this->room_id;
}
Here is the caller graph for this function:| ilChatRecording::getStartTime | ( | ) |
Definition at line 101 of file class.ilChatRecording.php.
{
return $this->data["start_time"];
}
| ilChatRecording::getTitle | ( | ) |
Definition at line 151 of file class.ilChatRecording.php.
{
return $this->data["title"];
}
| ilChatRecording::ilChatRecording | ( | $ | a_id = 0 |
) |
Constructor public.
| integer | reference_id or object_id | |
| boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 53 of file class.ilChatRecording.php.
References $ilias, $lng, and setRefId().
{
global $ilias,$lng;
define(MAX_TIME,60*60*24);
$this->ilias =& $ilias;
$this->lng =& $lng;
if ($a_id > 0)
{
$this->setRefId($a_id);
}
}
Here is the call graph for this function:| ilChatRecording::isRecording | ( | ) |
Definition at line 204 of file class.ilChatRecording.php.
References $id, $query, $res, getRecord(), getRefId(), getRoomId(), and setRecordId().
{
$query = "SELECT record_id FROM chat_records WHERE
chat_id = '" . $this->getRefId() . "' AND
room_id = '" . $this->getRoomId() . "' AND
start_time > 0 AND
end_time = 0";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::isRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
if ($res->numRows() > 0)
{
$id = $res->fetchRow(DB_FETCHMODE_ASSOC);
$this->setRecordId($id["record_id"]);
$this->getRecord();
return true;
}
return false;
}
Here is the call graph for this function:| ilChatRecording::setDescription | ( | $ | a_description | ) |
Definition at line 156 of file class.ilChatRecording.php.
{
$this->data["description"] = $a_description;
}
| ilChatRecording::setModeratorId | ( | $ | a_id | ) |
Definition at line 110 of file class.ilChatRecording.php.
{
$this->moderator_id = $a_id;
}
| ilChatRecording::setRecord | ( | $ | a_data | ) |
Definition at line 119 of file class.ilChatRecording.php.
Referenced by delete(), getRecord(), and stopRecording().
{
$this->data = $a_data;
}
Here is the caller graph for this function:| ilChatRecording::setRecordId | ( | $ | a_id | ) |
Definition at line 92 of file class.ilChatRecording.php.
Referenced by delete(), getRecord(), isRecording(), startRecording(), and stopRecording().
{
$this->record_id = $a_id;
}
Here is the caller graph for this function:| ilChatRecording::setRefId | ( | $ | a_id | ) |
Definition at line 83 of file class.ilChatRecording.php.
Referenced by ilChatRecording().
{
$this->ref_id = $a_id;
}
Here is the caller graph for this function:| ilChatRecording::setRoomId | ( | $ | a_id | ) |
Definition at line 74 of file class.ilChatRecording.php.
{
$this->room_id = $a_id;
}
| ilChatRecording::setTitle | ( | $ | a_title | ) |
Definition at line 147 of file class.ilChatRecording.php.
{
$this->data["title"] = $a_title;
}
| ilChatRecording::startRecording | ( | $ | a_title = "" |
) |
Definition at line 165 of file class.ilChatRecording.php.
References $query, $res, getModeratorId(), getRecord(), getRefId(), getRoomId(), and setRecordId().
{
$query = "INSERT INTO chat_records SET
moderator_id = '" . $this->getModeratorId() . "',
chat_id = '" . $this->getRefId() . "',
room_id = '" . $this->getRoomId() . "',
title = '" . (($a_title == "") ? "-N/A-" : addslashes($a_title)) . "',
start_time = '" . time() . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::startRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
$query = "SELECT LAST_INSERT_ID()";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::startRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
if ($res->numRows() > 0)
{
$lastId = $res->fetchRow();
$this->setRecordId($lastId[0]);
$this->getRecord();
}
}
Here is the call graph for this function:| ilChatRecording::stopRecording | ( | ) |
Definition at line 189 of file class.ilChatRecording.php.
References $data, $query, $res, getRefId(), getRoomId(), setRecord(), and setRecordId().
{
$query = "UPDATE chat_records SET
end_time = '" . time() . "' WHERE
chat_id = '" . $this->getRefId() . "' AND
room_id = '" . $this->getRoomId() . "'";
$res = $this->ilias->db->query($query);
if (DB::isError($res)) die("ilChatRecording::stopRecording(): " . $res->getMessage() . "<br>SQL-Statement: ".$q);
$this->setRecordId(0);
$data = array();
$this->setRecord($data);
}
Here is the call graph for this function:| ilChatRecording::$data = array() |
Definition at line 45 of file class.ilChatRecording.php.
Referenced by delete(), exportMessages(), getRecord(), getRecordings(), and stopRecording().
| ilChatRecording::$error_msg |
Definition at line 38 of file class.ilChatRecording.php.
| ilChatRecording::$ilias |
Definition at line 35 of file class.ilChatRecording.php.
Referenced by ilChatRecording().
| ilChatRecording::$lng |
Definition at line 36 of file class.ilChatRecording.php.
Referenced by ilChatRecording().
| ilChatRecording::$moderator_id = 0 |
Definition at line 41 of file class.ilChatRecording.php.
| ilChatRecording::$record_id = 0 |
Definition at line 43 of file class.ilChatRecording.php.
| ilChatRecording::$ref_id = 0 |
Definition at line 40 of file class.ilChatRecording.php.
| ilChatRecording::$room_id = 0 |
Definition at line 42 of file class.ilChatRecording.php.
1.7.1