$row = array(translateFN('titolo') => translateFN($chatroomObj->chat_title), translateFN('stato') => $chatroom_status, translateFN('tipo') => $chat_type, translateFN('entra') => $enter); array_push($list_chatrooms, $row); } } // initialize a new Table object that will visualize the list of the chatrooms $tObj = new Table(); $tObj->initTable('1', 'center', '2', '2', '100%', '', '', '', '', '1', '', ''); $caption = '<strong>' . translateFN('La lista delle tue chatroom') . '</strong>'; $summary = translateFN('La lista delle tue chatroom'); $tObj->setTable($list_chatrooms, $caption, $summary); $list_chatrooms_table = $tObj->getTable(); break; case AMA_TYPE_STUDENT: // STUDENT // get the public chatroom $public_chatroom = ChatRoom::find_public_chatroomFN(); // get the active classes to which the user is subscribed $field_ar = array('id_corso'); $all_instances = $dh->course_instance_started_get_list($field_ar); // get only the ids of the classes foreach ($all_instances as $one_instance) { $id_course_instance = $one_instance[0]; $sub_courses = $dh->get_subscription($_SESSION['sess_id_user'], $id_course_instance); //print_r($sub_courses); if (is_array($sub_courses) && $sub_courses['tipo'] == ADA_STATUS_SUBSCRIBED) { $class_instances_ids_ar[] = $id_course_instance; } } // get the ACTIVE chatroom, if exists, of each class $class_chatrooms_ar = array(); if (is_array($class_instances_ids_ar)) {