Exemple #1
0
                 $table_Mess = BaseHtmlLib::tableElement('class:sortable', $thead_data, $tbody_data);
                 $tabled_chat_dataHa = $table_Mess->getHtml();
                 $menuOptions['id_chatroom'] = $id_chatroom;
                 if (isset($days)) {
                     $menuOptions['days'] = $days;
                 }
             } else {
                 $tabled_chat_dataHa = translateFN("Nessuna chat disponibile.");
             }
             //      }
             break;
     }
     break;
 case 'index':
     $class_chatrooms_ar = array();
     $class_chatrooms = ChatRoom::get_all_class_chatroomsFN($sess_id_course_instance);
     if (is_array($class_chatrooms)) {
         $class_chatrooms_ar[] = $class_chatrooms;
     }
     // get only the ids of the chatrooms
     foreach ($class_chatrooms_ar as $value) {
         foreach ($value as $id) {
             $chatrooms_class_ids_ar[] = $id;
         }
     }
     //initialize the array of the chatrooms to be displayed on the screen
     $list_chatrooms = "";
     // start the construction of the table contaning all the chatrooms
     foreach ($chatrooms_class_ids_ar as $id_chatroom) {
         // vito, 16 mar 2009
         if (!is_object($id_chatroom)) {
Exemple #2
0
 /**
  * get tutor visit for course instance (to count read notes)
  * the method name refers to student, but works ok for a tutor as well
  */
 $visits = $GLOBALS['dh']->get_student_visits_for_course_instance($id_tutor, $course['id_corso'], $course['id_istanza_corso']);
 if (!AMA_DB::isError($visits) && is_array($visits) && count($visits) > 0) {
     foreach ($visits as $visit) {
         if ($visit['tipo'] == ADA_NOTE_TYPE && $visit['id_utente'] != $id_tutor && intval($visit['numero_visite']) > 0) {
             $read_notes_count++;
         }
     }
 }
 /**
  * count class chat messages written by the tutor
  */
 $class_chatrooms = ChatRoom::get_all_class_chatroomsFN($course['id_istanza_corso']);
 if (!AMA_DB::isError($class_chatrooms) && is_array($class_chatrooms) && count($class_chatrooms) > 0) {
     foreach ($class_chatrooms as $aChatRoom) {
         $mh = MessageHandler::instance($_SESSION['sess_selected_tester_dsn']);
         $chat_data = $mh->find_chat_messages($id_tutor, ADA_MSG_CHAT, $aChatRoom[0], '', 'id_mittente=' . $id_tutor);
         if (!AMA_DB::isError($chat_data) && is_array($chat_data) && count($chat_data) > 0) {
             $chatlines_count = count($chat_data);
         }
     }
 }
 /**
  * count files uploaded, for each course
  */
 $courseObj = new Course($course['id_corso']);
 $uploadedFiles = 0;
 if ($courseObj->isFull()) {