Revision: 236
http://hw4mdl.svn.sourceforge.net/hw4mdl/?rev=236&view=rev
Author: trollinger
Date: 2008-01-30 14:36:30 -0800 (Wed, 30 Jan 2008)
Log Message:
-----------
code cleaning
Modified Paths:
--------------
branches/team/Thomas/integrations_common/php/common/WimbaLib.php
branches/team/Thomas/integrations_common/php/common/WimbaUI.php
Modified: branches/team/Thomas/integrations_common/php/common/WimbaLib.php
===================================================================
--- branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-01-25 22:56:11 UTC (rev 235)
+++ branches/team/Thomas/integrations_common/php/common/WimbaLib.php 2008-01-30 22:36:30 UTC (rev 236)
@@ -70,19 +70,19 @@
array("value"=>"show_compose","type"=>PARAM_ALPHA,"default_value"=>"false"),
array("value"=>"filter","type"=>PARAM_ALPHA,"default_value"=>"false"),
- array("value"=>"accessAvailable","type"=>PARAM_BOOL,"default_value"=>"0"),
- array("value"=>"start_date","type"=>PARAM_BOOL,"default_value"=>"0"),
- array("value"=>"start_month","type"=>PARAM_INT,"default_value"=>"0"),
- array("value"=>"start_day","type"=>PARAM_INT,"default_value"=>"0"),
- array("value"=>"start_year","type"=>PARAM_INT,"default_value"=>"0"),
- array("value"=>"start_hr","type"=>PARAM_INT,"default_value"=>-1),
- array("value"=>"start_min","type"=>PARAM_INT,"default_value"=>-1),
- array("value"=>"end_date","type"=>PARAM_BOOL,"default_value"=>"0"),
- array("value"=>"end_month","type"=>PARAM_INT,"default_value"=>"0"),
- array("value"=>"end_day","type"=>PARAM_INT,"default_value"=>"0"),
- array("value"=>"end_year","type"=>PARAM_INT,"default_value"=>"f"),
- array("value"=>"end_hr","type"=>PARAM_INT,"default_value"=>-1),
- array("value"=>"end_min","type"=>PARAM_INT,"default_value"=>-1),
+ array("value"=>"accessAvailable","type"=>PARAM_ALPHA,"default_value"=>"false"),
+ array("value"=>"start_date","type"=>PARAM_ALPHA,"default_value"=>"false"),
+ array("value"=>"start_month","type"=>PARAM_ALPHA,"default_value"=>"0"),
+ array("value"=>"start_day","type"=>PARAM_ALPHA,"default_value"=>"0"),
+ array("value"=>"start_year","type"=>PARAM_ALPHA,"default_value"=>"0"),
+ array("value"=>"start_hr","type"=>PARAM_ALPHA,"default_value"=>-1),
+ array("value"=>"start_min","type"=>PARAM_ALPHA,"default_value"=>-1),
+ array("value"=>"end_date","type"=>PARAM_ALPHA,"default_value"=>"false"),
+ array("value"=>"end_month","type"=>PARAM_ALPHA,"default_value"=>"0"),
+ array("value"=>"end_day","type"=>PARAM_ALPHA,"default_value"=>"0"),
+ array("value"=>"end_year","type"=>PARAM_ALPHA,"default_value"=>"false"),
+ array("value"=>"end_hr","type"=>PARAM_ALPHA,"default_value"=>-1),
+ array("value"=>"end_min","type"=>PARAM_ALPHA,"default_value"=>-1),
);
}
@@ -117,20 +117,25 @@
function getListOfTopics($course,$current){
$section = 0;
- while ($section <= $course->numsections) {
- if (!$thissection = get_record('course_sections', 'course',$course->id, 'section', $section)) {
+ while ($section <= $course->numsections)
+ {
+ if (!$thissection = get_record('course_sections', 'course',$course->id, 'section', $section))
+ {
notify('Error getting course_sections!');
}
$desc = format_text($thissection->summary, FORMAT_MOODLE, NULL, $course->id);
$descTxt = txt($desc);
$minidesc = substr($descTxt, 0, 20);
- if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) ) {
+ if ( ($thissection->summary != NULL) && (strlen($descTxt)>20) )
+ {
$minidesc .= "...";
}
- else if ($thissection->summary == NULL){
+ else if ($thissection->summary == NULL)
+ {
$minidesc = "Topic";
}
+
if($current==$section)
{
echo '<OPTION selected value='.$section.'>'.$section.". ".$minidesc.'</OPTION>';
@@ -157,8 +162,8 @@
function manage_error($errno,$error,$file,$line,$context){
global $CFG;
- if($errno<10){
-
+ if($errno<10)
+ {
redirection('welcome.php?error=rrr');
}
if($errno<10){
@@ -177,47 +182,56 @@
function isSwitch(){
global $USER;
- if((isset($USER->studentview) && $USER->studentview==1) || (!empty($USER->switchrole)) ) {
+ if((isset($USER->studentview) && $USER->studentview==1) || (!empty($USER->switchrole)))
+ {
return true;
}
return false;
}
+
function getRoleForWimbaTools($courseId,$userId){
- global $CFG;
- global $USER;
- $role="";
- if(strstr($CFG->release,"1.7")) {
- $context = get_context_instance(CONTEXT_COURSE, $courseId) ;
- }
+ global $CFG;
+ global $USER;
+ $role="";
+ if(strstr($CFG->release,"1.7"))
+ {
+ $context = get_context_instance(CONTEXT_COURSE, $courseId) ;
+ }
//the role of the current user is switched
//the role of the current user is switched
- if((isset($USER->studentview) && $USER->studentview==1)||(isset($context) && isset($USER->switchrole) && !empty($USER->switchrole) && $USER->switchrole[$context->id]>3)) {
+ if((isset($USER->studentview) && $USER->studentview==1)||
+ (isset($context) && isset($USER->switchrole) && !empty($USER->switchrole) && $USER->switchrole[$context->id]>3))
+ {
$role='StudentBis';
- } else{
+ }
+ else
+ {
+ if(isstudent($courseId))
+ { //Student
+ $role='Student';
+ }
+ else if (isadmin() || isteacher($courseId, $USER->id))
+ { // Admin, Teacher
+ $role='Instructor';
+ }
+ if(strstr($CFG->release,"1.7"))
+ { // 1.7.* version
+ if (iscreator())
+ { // Course Creator
+ $role='Instructor';
+ }
+ else if (!isteacheredit($courseId)) { // Non-editing Teacher
+ $role='Student';
+ }
+ }
- if(isstudent($courseId)) { //Student
- $role='Student';
- }
- else if (isadmin() || isteacher($courseId, $USER->id)) { // Admin, Teacher
- $role='Instructor';
- }
-
- if(strstr($CFG->release,"1.7")) { // 1.7.* version
- if (iscreator()) { // Course Creator
- $role='Instructor';
}
- else if (!isteacheredit($courseId)) { // Non-editing Teacher
- $role='Student';
- }
- }
- }
-
- return $role;
+ return $role;
}
/*
@@ -247,164 +261,110 @@
*/
function list_dir($name,&$s) {
- if ($dir = opendir($name)) {
+ if ($dir = opendir($name))
+ {
+ while($file = readdir($dir))
+ {
- while($file = readdir($dir)) {
-
-
- if(is_dir($name."/".$file) && !in_array($file, array(".",".."))) {
-
- list_dir($name."/".$file,$s);
- }
- else if($file!="." && $file !="..") {
- $s.=$file.";";
- }
-
+ if(is_dir($name."/".$file) && !in_array($file, array(".","..")))
+ {
+ list_dir($name."/".$file,$s);
+ }
+ else if($file!="." && $file !="..")
+ {
+ $s.=$file.";";
+ }
+ }
+ closedir($dir);
}
-
- closedir($dir);
- }
-
-
}
function storeResource($rid,$courseId,$type,$name,$params=NULL){
- $voicetools->rid=$rid;
- $voicetools->course= $courseId;
- $voicetools->name= $name;
- $voicetools->type=$type;
- if($params!=null){
-
- if(isset($params["accessAvailable"]))
- {
- $voicetools->availability=1;
- }
- else
- {
- $voicetools->availability=0;
- }
- if(isset($params["start_date"]) && $params["start_date"]=="true"){
- if($params["start_hr"]=="--")
- {
- $start_hr=0;
- }
- else
- {
+ $voicetools=new Object();
+ $voicetools->rid=$rid;
+ $voicetools->course= $courseId;
+ $voicetools->name= $name;
+ $voicetools->type=$type;
+
+ if ($params!=null) {
+ $voicetools->availability=$params["accessAvailable"];
+ if ((bool)$params["start_date"]==true) {
$start_hr=intval($params["start_hr"]);
- }
- if($params["start_min"]=="--")
- {
- $start_min=0;
- }
- else
- {
$start_min=intval($params["start_min"]);
- }
- $voicetools->start_date= mktime($start_hr, $start_min,0, intval($params["start_month"]),intval($params["start_day"]), intval($params["start_year"]));
-
-
-
-
+ $voicetools->start_date= mktime($start_hr, $start_min,0, intval($params["start_month"]),intval($params["start_day"]), intval($params["start_year"]));
}
else
{
- $voicetools->start_date=-1;
+ $voicetools->start_date=-1;
}
- if(isset($params["end_date"]) && $params["end_date"]=="true"){
- if($params["end_hr"]=="--")
- {
- $end_hr=0;
- }
- else
- {
+
+ if ((bool)$params["end_date"]==true) {
$end_hr=intval($params["end_hr"]);
- }
- if($params["end_min"]=="--")
- {
- $end_min=0;
- }
- else
- {
$end_min=intval($params["start_min"]);
- }
-
- $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]),intval( $params["end_day"]), intval($params["end_year"]));
- }
+ $voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]),intval( $params["end_day"]), intval($params["end_year"]));
+ }
else
{
- $voicetools->end_date="-1";
+ $voicetools->end_date=-1;
}
- }
-
- return voicetools_store_new_element($voicetools);
-
+ }
+ return voicetools_store_new_element($voicetools);
}
+
function updateResource($rid,$courseId,$type,$params){
-
- $voicetools->rid=$rid;
- $voicetools->course= $courseId;
- $voicetools->type=$type;
- if(isset($params["accessAvailable"]))
- {
- $voicetools->availability=1;
- }
- else
- {
- $voicetools->availability=0;
- }
-
- if(isset($params["start_date"]) && $params["start_date"]=="true"){
-
- if($params["start_hr"]=="--")
- {
- $start_hr=0;
- }else
- {
- $start_hr=intval($params["start_hr"]);
- }
- if($params["start_min"]=="--")
- {
- $start_min=0;
- }
- else
- {
- $start_min=intval($params["start_min"]);
- }
+ $voicetools=new Object();
+ $voicetools->rid=$rid;
+ $voicetools->course= $courseId;
+ $voicetools->type=$type;
+ $voicetools->availability=$params["accessAvailable"];
+
+ if ((bool)$params["start_date"] == true) {
+ $start_hr=intval($params["start_hr"]);
+ $start_min=intval($params["start_min"]);
$voicetools->start_date=mktime($start_hr, $start_min,0, intval($params["start_month"]), intval($params["start_day"]), intval($params["start_year"]));
- }
- else
- {
+ }
+ else
+ {
$voicetools->start_date=-1;
- }
- if(isset($params["end_date"]) && $params["end_date"]=="true"){
- if($params["end_hr"]=="--")
- {
- $end_hr=0;
- }
- else
- {
- $end_hr=intval($params["end_hr"]);
- }
- if($params["end_min"]=="--")
- {
- $end_min=0;
- }
- else
- {
- $end_min=intval($params["start_min"]);
- }
+ }
+ if ((bool)$params["end_date"] == true) {
+ $end_hr=intval($params["end_hr"]);
+ $end_min=intval($params["start_min"]);
$voicetools->end_date=mktime($end_hr, $end_min,0, intval($params["end_month"]), intval($params["end_day"]), intval($params["end_year"]));
- }
- else
- {
- $voicetools->end_date="-1";
- }
- // $voicetools->id=$id;
+ }
+ else
+ {
+ $voicetools->end_date=-1;
+ }
+ return voicetools_update_element($voicetools);
+}
- return voicetools_update_element($voicetools);
-
+function isVtAvailable($rid){
+ $preview=false;
+ $vt_informations=voicetools_get_voicetool_informations($rid);
+ if($vt_informations !=null && $vt_informations->availability==0){
+ $preview = false;
+ }
+ elseif ($vt_informations !=null && $vt_informations->start_date == -1 && $vt_informations->end_date == -1) {
+ $preview = true;
+ }
+ elseif ($vt_informations !=null && $vt_informations->start_date == -1 && time() <= $vt_informations->end_date) {
+ $preview = true;
+ }
+ elseif ($vt_informations !=null && $vt_informations->start_date < time() && $vt_informations->end_date == -1) {
+ $preview = true;
+ }
+ elseif ($vt_informations !=null && $vt_informations->start_date < time() && time() < $vt_informations->end_date) {
+ $preview = true;
+ }
+ else {
+ $preview = false;
+ }
+ return $preview;
+
}
+
define('PRONTO_INFO', 'info');
define('PRONTO_WARN', 'warn');
define('PRONTO_ERROR', 'error');
Modified: branches/team/Thomas/integrations_common/php/common/WimbaUI.php
===================================================================
--- branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-01-25 22:56:11 UTC (rev 235)
+++ branches/team/Thomas/integrations_common/php/common/WimbaUI.php 2008-01-30 22:36:30 UTC (rev 236)
@@ -1,1920 +1,2859 @@
<?php
class WimbaUI {
- var $session;
- var $api;
- var $xml;
- var $currentObject;
- var $isArchive = "false";
- var $lectureRoom;
- var $discussionRoom;
- var $isLectureRoom;
- var $disabledSetting;
- var $currentTab;
- //for vt
- var $currentObjectInformations = NULL;
- var $currentObjectOptions = NULL;
- var $currentObjectAudioFormat = NULL;
- var $startSelect = false;
- var $endSelect = false;
- var $prefix;
- var $id;
-
- function WimbaUI($session, $api = NULL, $currentIdtab = "") {
+
+ var $session;
+ var $api;
+ var $xml;
+ var $currentObject;
+ var $isArchive = "false";
+ var $lectureRoom;
+ var $discussionRoom;
+ var $isLectureRoom;
+ var $disabledSetting;
+ var $currentTab;
+ //for vt
+ var $currentObjectInformations = NULL;
+ var $currentObjectOptions = NULL;
+ var $currentObjectAudioFormat = NULL;
+ var $startSelect = false;
+ var $endSelect = false;
+ var $prefix;
+ var $id;
+
+ function WimbaUI($session_params, $api = NULL, $currentIdtab = "")
+ {
+ $this->session = new WimbaMoodleSession($session_params);
+ $this->api = $api;
+ $this->xml = new WimbaXml();
+ $this->currentTab = $currentIdtab;
+
+ if($api!=null)
+ {
+ $this->prefix=$api->getPrefix();
+ }
+ }
+
+ /**
+ * Configure different parmaters used to generate the xml according to the current product
+ * @param product : the product which will be display (liveclassroom or voicetools)
+ * @param object : contains the informations get from the server
+ * @param objectInformations : contains the informations get from the database
+ */
+ function setCurrentProduct($product, $serverInformations = NULL, $databaseInformations = NULL)
+ {
+ $this->product = $product;
+ $this->currentObject = $serverInformations;
+
+
+ if($this->currentObject == null)
+ {
+ $this->id=$this->session->getCourseId() . rand();
+ }
+
+ if ($product == "liveclassroom")
+ {
+ $roomId=$this->currentObject->getRoomId();
+ if ($this->currentObject != null && $this->currentObject->isArchive())
+ {
+ $this->isArchive = "true";
+ }
+
+ $roomId=$this->currentObject->getRoomId();
+ $courseId=$this->session->getCourseId() . "_S";
+ $isStudentAdmin= $this->api->isStudentAdmin($roomId, $courseId);
+ if ($this->currentObject == null
+ || $this->currentObject != null && $isStudentAdmin == "false")
+ {
+ $this->lectureRoom = "activeSetting";
+ $this->discussionRoom = "hiddenSetting";
+ $this->disabledSetting = "activeSetting";
+ $this->isLectureRoom = true;
+ }
+ else
+ {
+ $this->lectureRoom = "hiddenSetting";
+ $this->discussionRoom = "activeSetting";
+ $this->disabledSetting = "disabledSetting";
+ $this->isLectureRoom = false;
+ }
+ }
+ else
+ {
+ //data of the database
+ $this->currentObjectInformations = $databaseInformations;
+ if ($this->currentObjectInformations != null
+ && $this->currentObjectInformations->start_date != -1)
+ {
+ $this->startSelect = true;
+ }
+
+ if ( $this->currentObjectInformations != null
+ && $this->currentObjectInformations->end_date != -1 )
+ {
+ $this->endSelect = true;
+ }
+
+ if (isset($this->currentObject)
+ && isset($this->currentObjectInformations)) {
+ //for php 4-> object->object doesn't work
+ $this->currentObjectOptions = $this->currentObject->getOptions();
+ $this->currentObjectAudioFormat = $this->currentObjectOptions->getAudioFormat();
+ }
+ }
+ }
+
+ /**
+ * Add the necessary elements to the current xml object to render the principal view of the lc component
+ * @param message : eventual information message displayed at the bottom of the component
+ */
+ function getLCPrincipalView($message) {
+ /********
+ SESSION
+ *********/
+ $this->xml->CreateInformationElement(
+ $this->session->timeOfLoad,
+ $this->session->hparams["firstname"],
+ $this->session->hparams["lastname"],
+ $this->session->hparams["email"],
+ $this->session->hparams["role"],
+ $this->session->hparams["course_id"],
+ $this->session->signature,
+ "",
+ "",
+ "",
+ "");
+
+ /********
+ HEADER
+ *********/
+ if($this->session->isInstructor())
+ {
+ $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "true");
+ }
+ else
+ {
+ $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "false");
+ }
+ /********
+ MENU
+ *********/
+ $this->xml->addButtonElement(
+ "all",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-launch",
+ get_string('toolbar_launch', 'liveclassroom'),
+ "javascript:LaunchElement('doAction.php','liveclassroom');");
- $this->session = $session;
- $this->api = $api;
+ if($this->session->isInstructor())
+ {
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ 'lib/web/pictures/buttons/toolbar-activities',
+ get_string('toolbar_activity', 'liveclassroom'),
+ "doOpenAddActivity('../../course/mod.php','section=0&sesskey=" . sesskey() . "&add=liveclassroom')");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "enabled",
+ "lib/web/pictures/buttons/toolbar-new",
+ get_string('toolbar_new', 'liveclassroom'),
+ "javascript:loadNewSettings('generateSettings.php','create','liveclassroom' ,'liveclassroom','all')");
+
+ $this->xml->addSpaceElement("20px", "instructor");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-content",
+ get_string('toolbar_content', 'liveclassroom'),
+ "javascript:openContent('doAction.php');");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-poll",
+ get_string('toolbar_reports', 'liveclassroom'),
+ "javascript:openReport('doAction.php');");
+
+ $this->xml->addSpaceElement("10px", "instructor");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-settings",
+ get_string('toolbar_settings', 'liveclassroom'),
+ "javascript:editSettings('generateSettings.php','all');");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-delete",
+ get_string('toolbar_delete', 'liveclassroom'),
+ "javascript:deleteResource('doAction.php');");
+
+ $this->xml->addSpaceElement("50px", "instructor");
+ }
+ else
+ {
+ $this->xml->addSpaceElement("300px", "instructor");
+ }
+
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari'))
+ {
+ $this->xml->addSearchElement("all", "Safari");
+ }
+ else
+ {
+ $this->xml->addSearchElement("all", "other");
+ }
+
+ //MESSAGE BAR
+ if (isset ($message) && $message!="")
+ {
+ $this->xml->addMessage($message);
+ }
+
+ $rooms=$this->getListLiveClassroom();
+
+ if($rooms!=false || $rooms==null)
+ {
+ $this->xml->addProduct(
+ "liveclassroom",
+ "productType",
+ "Live classroom",
+ "liveclassroom",
+ $rooms ,
+ get_string('list_no_liveclassrooms', 'liveclassroom'));
+ }
+ else
+ {
+ //problem to get the vt resource
+ $this->xml->setError(get_string("error_connection_lc", "liveclassroom"));
+ }
+ return $this->xml->getXml();
+ }
+
+
+ /**
+ * Add the necessary elements to the current xml object to render the principal view of the vt component
+ * @param message : eventual information message displayed at the bottom of the component
+ */
+ function getVTPrincipalView($message) {
+ /********
+ SESSION
+ *********/
+ $this->xml->CreateInformationElement(
+ $this->session->timeOfLoad,
+ $this->session->hparams["firstname"],
+ $this->session->hparams["lastname"],
+ $this->session->hparams["email"],
+ $this->session->hparams["role"],
+ $this->session->hparams["course_id"],
+ $this->session->signature,
+ "",
+ "",
+ "",
+ "");
+ /********
+ HEADER
+ *********/
+ ( $this->session->isInstructor() )
+ ? $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "true")
+ : $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "false", "false")
+ ;
+
+ /********
+ MENU
+ *********/
+ $this->xml->addButtonElement(
+ "all",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-launch",
+ get_string('toolbar_launch', 'voicetools'),
+ "javascript:LaunchElement('manageAction.php','voicetools');");
+
+ if($this->session->isInstructor())
+ {
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ 'lib/web/pictures/buttons/toolbar-activities',
+ get_string('toolbar_activity', 'voicetools'),
+ "doOpenAddActivity('../../course/mod.php','section=0&sesskey=" . sesskey() . "&add=voicetools')");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "enabled",
+ "lib/web/pictures/buttons/toolbar-new",
+ get_string('toolbar_new', 'voicetools'),
+ "javascript:launchAjaxRequest('getXmlChoicePage.php','create' ,'true','all')");
+
+ $this->xml->addSpaceElement("150px", "instructor");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-settings",
+ get_string('toolbar_settings', 'voicetools'),
+ "javascript:editSettings('getXmlNewPanel.php','all');");
+
+ $this->xml->addButtonElement(
+ "instructor",
+ "all",
+ "disabled",
+ "lib/web/pictures/buttons/toolbar-delete",
+ get_string('toolbar_delete', 'voicetools'),
+ "javascript:deleteResource('manageAction.php');");
+
+ $this->xml->addSpaceElement("50px", "instructor");
+ }
+ else
+ {
+ $this->xml->addSpaceElement("300px", "instructor");
+ }
+
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari'))
+ {
+ $this->xml->addSearchElement("all", "Safari");
+ }
+ else
+ {
+ $this->xml->addSearchElement("all", "other");
+ }
+ /********
+ MESSAGE BAR
+ *********/
+ $resources = $this->getListVoiceTools();
+
+ if ($resources != null)
+ {
+ $this->xml->addProduct(
+ "voicetools",
+ "productType",
+ "Voice Board",
+ "board",
+ $resources["board"],
+ get_string('list_no_boards', 'voicetools'));
+
+ $this->xml->addProduct(
+ "voicetools",
+ "productType",
+ "Voice Presentation",
+ "presentation",
+ $resources["presentation"],
+ get_string('list_no_presentations', 'voicetools'));
+
+ $this->xml->addProduct(
+ "voicetools",
+ "productType",
+ "Podcaster",
+ "pc",
+ $resources["pc"],
+ get_string('list_no_pcs', 'voicetools'));
+ }
+ else
+ {//problem to get the vt resource
+ $this->xml->setError(get_string("error_connection_vt", "voicetools"));
+ }
+
+ if (isset ($message) && $message!="")
+ {
+ $this->xml->addMessage($message);
+ }
+
+ }
+
+ function getLCSettingsView($update, $createWorkflow) {
+ /********
+ SESSION
+ *********/
+ $this->xml->CreateInformationElement(
+ $this->session->timeOfLoad,
+ $this->session->hparams["firstname"],
+ $this->session->hparams["lastname"],
+ $this->session->hparams["email"],
+ $this->session->hparams["role"],
+ $this->session->hparams["course_id"],
+ $this->session->signature,
+ "",
+ "",
+ "",
+ "");
+ /********
+ HEADER
+ *********/
+ $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "true", "true");
+
+ if($update=="update")
+ {
+ $this->xml->addContextElement(
+ get_string("contextbar_settings", "liveclassroom"),
+ get_string("general_" . $this->product, "liveclassroom"),
+ $this->currentObject->getLongname(), "");
+ }
+ else
+ {
+ $this->xml->addContextElement(
+ get_string("contextbar_settings", "liveclassroom"),
+ get_string("general_" . $this->product, "liveclassroom"),
+ get_string("contextbar_new_" . $this->product, "liveclassroom"), "");
+ }
+ /********
+ * Settings tabs
+ */
+ $this->createLcInfoPanel();
+ $this->createLcMediaPanel();
+ $this->createLcFeaturesPanel();
+ $this->createLcChatPanel();
+ $this->createLcAccessPanel();
+
+ if ($update == "update" && $this->currentObject != null && !$this->currentObject->isArchive())
+ {
+ $this->createLcAdvancedPanel();
+ }
+
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_ok", "liveclassroom"),
+ "actionHide",
+ "javascript:launchAjaxRequest('generateListRooms.php','',true,'all')", "advanced_Ok");
+
+ if ($createWorkflow == "true")
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_cancel", "liveclassroom"),
+ "action",
+ "javascript:redirectToActivity('doAction.php','redirection','','" . $createWorkflow . "')",
+ "setting_Cancel");
+ }
+ else
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_cancel", "liveclassroom"),
+ "action",
+ "javascript:launchAjaxRequest('generateListRooms.php','',true,'all')",
+ "setting_Cancel");
+ }
+
+ if ($update != "update")
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_create", "liveclassroom"),
+ "action",
+ "javascript:submitForm('doAction.php','create','".$this->id."','" . $createWorkflow . "')",
+ "setting_Create");
+ }
+ else
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_saveAll", "liveclassroom"),
+ "action",
+ "javascript:submitForm('doAction.php','update','".$this->currentObject->getRoomId()."')",
+ "setting_Save");
+ }
+ return $this->xml->getXml();
+ }
+
+ function getVTSettingsView($update, $createWorkflow) {
+
+ /********
+ SESSION
+ *********/
+ $this->xml->createInformationElement(
+ $this->session->timeOfLoad,
+ $this->session->hparams["firstname"],
+ $this->session->hparams["lastname"],
+ $this->session->hparams["email"],
+ $this->session->hparams["role"],
+ $this->session->hparams["course_id"],
+ $this->session->signature,
+ "",
+ "",
+ "",
+ "");
+ /********
+ HEADER
+ *********/
+ $this->xml->addHeaderElement("lib/web/pictures/items/headerbar-logo.png", "true", "true");
+ if($update=="update")
+ {
+ $this->xml->addContextElement(
+ get_string("contextbar_settings", "voicetools"),
+ get_string("general_" . $this->product, "voicetools"),
+ $this->currentObject->getTitle(),
+ "");
+ }
+ else
+ {
+ $this->xml->addContextElement(
+ get_string("contextbar_settings", "voicetools"),
+ get_string("general_" . $this->product, "voicetools"),
+ get_string("contextbar_new_" . $this->product, "voicetools"),
+ "");
+ }
+
+ /********
+ * Settings tabs
+ */
+ if ($this->product == "board")
+ {
+ $this->createGeneralInfoPanelStart();
+ $this->createVBInfoPanel();
+ //Media settings
+ $this->createVBVPMediaPanel();
+ $this->createVBFeaturesPanel();
+ $this->createVTAccessPanel();
+ }
+ elseif ($this->product == "presentation")
+ {
+ $this->createGeneralInfoPanelStart();
+ $this->createVPInfoPanel();
+ //Media settings
+ $this->createVBVPMediaPanel();
+ $this->createVTAccessPanel();
+ }
+ elseif ($this->product == "pc")
+ {
+ $this->createGeneralInfoPanelStart();
+ $this->createPodcasterNameExample();
+ $this->createGeneralInfoPanelEnd();
+ $this->createPCInfoPanel();
+ //Media settings
+ $this->createPCMediaPanel();
+ $this->createPCFeaturesPanel();
+ $this->createVTAccessPanel();
+ }
+
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_ok", "voicetools"),
+ "actionHide",
+ "javascript:launchAjaxRequest('getXmlListPanel.php','',true,'all')",
+ "advanced_Ok");
+
+ if ($createWorkflow == "true")
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_cancel", "voicetools"),
+ "action",
+ "javascript:redirectToActivity('manageAction.php','redirection','','" . $createWorkflow . "')",
+ "setting_Cancel");
+ }
+ else
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_cancel", "voicetools"),
+ "action",
+ "javascript:launchAjaxRequest('getXmlListPanel.php','',true,'all')",
+ "setting_Cancel");
+ }
+
+ if ($update != "update")
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_create", "voicetools"),
+ "action",
+ "javascript:submitForm('manageAction.php','create','','" . $createWorkflow . "')",
+ "setting_Create");
+ }
+ else
+ {
+ $this->xml->createValidationButtonElement(
+ get_string("validationElement_saveAll", "voicetools"),
+ "action",
+ "javascript:submitForm('manageAction.php','update','" . $this->currentObject->getRid() . "')",
+ "setting_Save");
+ }
+ }
+
+ /**
+ * Add the necessary elements to the current xml object to render the panel information of the lc settings
+ */
+ function createLcInfoPanel() {
+
+ $this->xml->addSimpleLineElement("label", "*", array ( "class" => "alert"));
+ $this->xml->addSimpleLineElement("label", get_string("settings_title", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "top",
+ "align" => "right"));
+
+ $parameters = array (
+ "type" => "input",
+ "name" => "longname",
+ "id" => "longname",
+ "style" => "input",
+ "maxlength" => "50"
+ );
+ if ($this->currentObject != null)
+ {
+ $parameters["value"] = $this->currentObject->getLongName();
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->createLinePart();
+
+ $this->xml->addSimpleLineElement("label", "*", $parameters = array ("class" => "alert"));
+ $this->xml->addSimpleLineElement("label", get_string("settings_required", 'liveclassroom'));
+ $this->xml->createLinePart("italic", 0);
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label", get_string("settings_description", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "topLabel",
+ "align" => "right"));
+
+ $parameters = array (
+ "name" => "description",
+ "id" => "description",
+ "rows" => "4",
+ "cols" => "30"
+ );
+ if ($this->currentObject != null)
+ {
+ $parameters["value"] = $this->currentObject->getDescription();
+ }
+ else
+ {
+ $parameters["value"] = "";
+ }
+ $this->xml->addTextAreaElement("textarea", $parameters);
+ $this->xml->createLinePart();
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label", get_string("settings_type", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "topLabel",
+ "align" => "right"));
+
+ $parameters = array (
+ "type" => "radio",
+ "name" => "led",
+ "value" => "instructor",
+ "id" => "led_instructor",
+ "onclick" => "toggleTypeOfRoom(\"MainLecture\")"
+ );
+ if($this->isArchive == "true")
+ {
+ $parameters["disabled"] = "true";
+ }
- $this->xml = new WimbaXml();
- $this->currentTab = $currentIdtab;
- if($api!=null)
- {
- $this->prefix=$api->getPrefix();
- }
- }
+ $roomId=$this->currentObject->getRoomId();
+ $courseId=$this->session->getCourseId() . "_S";
+ $isStudentAdmin= $this->api->isStudentAdmin($roomId, $courseId);
+ if ($this->currentObject == null || $isStudentAdmin == "false") {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+
+ $parameters = array (
+ "class" => "top",
+ "for" => "led_instructor",
+ );
+ if($this->isArchive=="true")
+ {
+ $parameters["disabled"] ="true";
+ }
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_mainLecture_comment", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart();
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label", " ");
+ $this->xml->createLinePart();
+
+ $parameters = array (
+ "type" => "radio",
+ "name" => "led",
+ "value" => "student",
+ "id" => "led_student",
+ "onclick" => "toggleTypeOfRoom(\"Discussion\")",
+ );
+ if($this->isArchive == "true")
+ {
+ $parameters["disabled"] = "true";
+ }
+ if ($this->currentObject != null && $isStudentAdmin == "true")
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+
+ $parameters = array (
+ "class" => "top",
+ "for" => "led_student",
+ );
+ if($this->isArchive=="true")
+ {
+ $parameters["disabled"] = "true";
+ }
+
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_discussion_comment", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart();
+
+ $this->xml->createLine();
+
+ if ($this->currentTab == "Info" || $this->currentTab == "") {
+ $this->xml->createPanelSettings(
+ get_string("tab_title_roomInfo", 'liveclassroom'),
+ "block",
+ "Info",
+ "tabSelected",
+ "all",
+ "editSettings(\"generateSettings.php\",\"all\")");
+ }
+ else
+ {
+ $this->xml->createPanelSettings(
+ get_string("tab_title_roomInfo", 'liveclassroom'),
+ "none",
+ "Info",
+ "tabNoSelected",
+ "all",
+ "editSettings(\"generateSettings.php\",\"all\")");
+ }
+ }
+
+
+ /**
+ * Add the necessary elements to the current xml object to render the panel medua of the lc settings
+ */
+ function createLcMediaPanel() {
+ $options = array ();
+ //this tab is not available for archives
+ if ($this->currentObject == null || !$this->currentObject->isArchive())
+ {
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_student_privileges", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart(
+ array ("style" => "top","align" => "right"));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "hms_two_way_enabled",
+ "value" => "true",
+ "id" => "hms_two_way_enabled"
+ );
+ if ($this->lectureRoom == "hiddenSetting")
+ {
+ $parameters["disabled"]= "disabled";
+ }
+ if ($this->currentObject == null || $this->currentObject->isHmsTwoWayEnabled())
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ if ($this->lectureRoom == "hiddenSetting")
+ {
+ $parameters = array ("class" => "labelDisabled");
+ }
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_hms_two_way_enabled", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart(array ("context" => $this->disabledSetting));
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label");
+ $this->xml->createLinePart();
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enable_student_video_on_startup",
+ "value" => "true",
+ "id" => "enable_student_video_on_startup"
+ );
+ if ($this->lectureRoom == "hiddenSetting")
+ {
+ $parameters["disabled"]= "disabled";
+ }
+ if ($this->currentObject == null || $this->currentObject->isStudentVideoOnStartupEnabled())
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ if ($this->lectureRoom == "hiddenSetting") {
+ $parameters = array ("class" => "labelDisabled");
+ }
+
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enable_student_video_on_startup", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart(array ("context" => $this->disabledSetting));
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label");
+ $this->xml->createLinePart();
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "hms_simulcast_restricted",
+ "value" => "25",
+ "id" => "hms_simulcast_restricted"
+ );
+ if ($this->lectureRoom == "hiddenSetting")
+ {
+ $parameters["disabled"]= "disabled";
+ }
+
+ if ($this->currentObject == null || !$this->currentObject->isHmsSimulcastRestricted())
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+
+ if ($this->lectureRoom == "hiddenSetting") {
+ $parameters = array ("class" => "labelDisabled");
+ }
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_hms_simulcast_restricted", 'liveclassroom'),
+ $parameters);
+ $this->xml->createLinePart(array ("context" => $this->disabledSetting));
+
+ $this->xml->createLine();
+
+ $this->xml->createLine("settings_separator");
+
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_video_bandwidth", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "top",
+ "align" => "right"));
+ //select parameter
+ $optionsParamaters = array (
+ "value" => "slow",
+ "display" => get_string("settings_video_bandwidth_small",'liveclassroom')
+ );
+
+ if ($this->currentObject != null && $this->currentObject->getVideoBandwidth() == "slow")
+ {
+ $optionsParamaters["selected"] = "true";
+ }
+ $options[] = $optionsParamaters;
+
+ $optionsParamaters = array (
+ "value" => "medium",
+ "display" => get_string("settings_video_bandwidth_medium",'liveclassroom')
+ );
+ if ($this->currentObject == null || $this->currentObject->getVideoBandwidth() == "medium")
+ {
+ $optionsParamaters["selected"] = "true";
+ }
+ $options[] = $optionsParamaters;
+
+ $optionsParamaters = array (
+ "value" => "fast",
+ "display" => get_string("settings_video_bandwidth_large",'liveclassroom')
+ );
+ if ($this->currentObject != null && $this->currentObject->getVideoBandwidth() == "fast")
+ {
+ $optionsParamaters["selected"] = "true";
+ }
+ $options[] = $optionsParamaters;
+
+ $optionsParamaters = array (
+ "value" => "custom",
+ "display" => get_string("settings_video_bandwidth_custom",'liveclassroom')
+ );
+
+ if ($this->currentObject != null && $this->currentObject->getVideoBandwidth() == "custom")
+ {
+ $optionsParamaters["selected"] = "true";
+ $options[] = $optionsParamaters;
+ }
+ $this->xml->createOptionElement("video_bandwidth", "video_bandwidth", $options);
+ $this->xml->createLinePart();
+
+ $this->xml->createLine();
+ }
+
+ if ($this->currentTab == "Media")
+ {
+ $this->xml->createPanelSettings(
+ get_string("tab_title_media", 'liveclassroom'),
+ "block",
+ "Media",
+ "tabSelected",
+ Util . LC_MAINLECTURE,
+ "editSettings(\"generateSettings.php\",\"all\")");
+ }
+ else
+ {
+ if ($this->currentObject != null && $this->currentObject->isArchive())
+ {
+ $this->xml->createPanelSettings(
+ get_string("tab_title_media", 'liveclassroom'),
+ "none",
+ "Media",
+ "tabDisabled",
+ Util . LC_MAINLECTURE,
+ "editSettings(\"generateSettings.php\",\"all\")");
+ }
+ else
+ {
+ $this->xml->createPanelSettings(
+ get_string("tab_title_media", 'liveclassroom'),
+ "none",
+ "Media",
+ "tabNoSelected",
+ "mainLecture",
+ "editSettings(\"generateSettings.php\",\"all\")");
+ }
+ }
+ }
+
+ /**
+ * Add the necessary elements to the current xml object to render the panel features of the lc settings
+ */
+ function createLcFeaturesPanel() {
+
+ if ($this->currentObject == null || !$this->currentObject->isArchive()) {
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_status_indicators", 'liveclassroom'));
+ $this->xml->createLinePart(
+ array ("style" => "top","align" => "right"));
- function setCurrentProduct($product, $object = NULL, $objectInformations = NULL) {
- $this->product = $product;
- $this->currentObject = $object;
-
- if($this->currentObject == null)
- $this->id=$this->session->getCourseId() . rand();
-
- if ($product == "liveclassroom") {
- if ($this->currentObject != null && $this->currentObject->isArchive()) {
- $this->isArchive = "true";
- }
- if ($this->currentObject == null || $this->currentObject != null && $this->api->isStudentAdmin($this->currentObject->getRoomId(), $this->session->getCourseId() . "_S") == "false") {
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enabled_status",
+ "value" => "true",
+ "id" => "enabled_status",
+ "onclick" => "doStatusEnabled()"
+ );
+ if ($this->currentObject == null || $this->currentObject->isUserstatusEnabled()) {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_status", 'liveclassroom'));
+ $this->xml->createLinePart();
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("br");
+ $this->xml->createLinePart();
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "status_appear",
+ "value" => "true",
+ "id" => "status_appear",
+ );
+ if ($this->currentObject != null && !$this->currentObject->isUserstatusEnabled())
+ {
+ $parameters["disabled"] = "true";
+ }
+ else{
+ if ($this->currentObject == null || $this->currentObject->isSendUserstatusUpdates())
+ {
+ $parameters["checked"] = "true";
+ }
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_status_appear", 'liveclassroom'));
+ $this->xml->createLinePart();
+
+ $this->xml->createLine("subOption");
+
+ $this->xml->createLine("settings_separator");
+
+ $this->xml->addSimpleLineElement("br");
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label", get_string("settings_eboard", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "top",
+ "align" => "right",
+ "context" => $this->lectureRoom));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enabled_student_eboard",
+ "value" => "true",
+ "id" => "enabled_student_eboard"
+ );
+ if ($this->currentObject != null && $this->currentObject->isStudentWhiteboardEnabled())
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_student_eboard", 'liveclassroom'));
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("br");
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_breakout", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "top",
+ "align" => "right",
+ "context" => $this->lectureRoom));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enabled_breakoutrooms",
+ "value" => "true",
+ "id" => "enabled_breakoutrooms",
+ "onclick" => "doBreakoutEnabled()"
+ );
+ if ($this->currentObject == null || $this->currentObject->isBOREnabled())
+ {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_breakoutrooms", 'liveclassroom'));
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $this->xml->createLine();
+
+ $this->xml->addSimpleLineElement("label");
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enabled_students_breakoutrooms",
+ "value" => "true",
+ "id" => "enabled_students_breakoutrooms"
+ );
+ if ($this->currentObject != null && !$this->currentObject->isBOREnabled())
+ {
+ $parameters["disabled"] = "true";
+ }
+ else
+ {
+ if ($this->currentObject != null &&
+ $this->currentObject->isChatEnabled() &&
+ $this->currentObject->isBORCarouselsPublic())
+ {
+ $parameters["checked"] = "true";
+ }
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_students_breakoutrooms", 'liveclassroom'));
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $this->xml->createLine("subOption");
+
+ $this->xml->addSimpleLineElement("label");
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "enabled_students_mainrooms",
+ "value" => "true",
+ "id" => "enabled_students_mainrooms"
+ );
+ if ($this->currentObject != null && !$this->currentObject->isBOREnabled())
+ {
+ $parameters["disabled"] = "true";
+ }
+ else
+ {
+ if ($this->currentObject != null &&
+ $this->currentObject->isBOREnabled() &&
+ $this->currentObject->isBORShowRoomCarousels())
+ {
+ $parameters["checked"] = "true";
+ }
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_students_mainrooms", 'liveclassroom'));
+ $this->xml->createLinePart(array ("context" => $this->lectureRoom));
+
+ $this->xml->createLine("subOption");
+
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_presenter_console", 'liveclassroom'));
+ $this->xml->createLinePart(array (
+ "style" => "top",
+ "align" => "right",
+ "context" => $this->discussionRoom));
+
+ $parameters = array (
+ "type" => "checkbox",
+ "name" => "archiveEnabled",
+ "value" => "true",
+ "id" => "enabled_students_mainrooms"
+ );
+ if ($this->currentObject == null || $this->currentObject->isArchiveEnabled()) {
+ $parameters["checked"] = "true";
+ }
+ $this->xml->addInputElement("input", $parameters);
+ $this->xml->addSimpleLineElement(
+ "label",
+ get_string("settings_enabled_archiving", 'liveclassroom'));
+ $this->xml->createLinePart(array ("context" => $this->discussionRoom));
+
+ $this->xml->createLine("",...
[truncated message content] |