// Who's online // $online_users_listing_mode = 0 (default) : only total numer of users online // $online_users_listing_mode = 1 : username of users // $online_users_listing_mode = 2 : username and email of users $online_users_listing_mode = 2; $online_users = User::get_online_usersFN($id_course_instance, $online_users_listing_mode); $last_visited_node_id = $userObj->get_last_accessFN($sess_id_course_instance, N); if (!empty($last_visited_node_id)) { $last_node = $dh->get_node_info($last_visited_node_id); $last_visited_node_name = $last_node['name']; $last_node_visited = "<a href=view.php?id_node={$last_visited_node_id}>" . translateFN("torna") . "</a>"; } else { $last_node_visited = ""; } // Menu nodi visitati per periodo $menu = menu_detailsFN(); $menu .= "<a href=history.php>" . translateFN("cronologia") . "</a><br>"; $menu .= $last_node_visited; /* 2. getting todate-information on user MESSAGES adn EVENTS */ if (is_object($userObj)) { if (empty($userObj->error_msg)) { $user_messages = $userObj->get_messagesFN($sess_id_user); $user_agenda = $userObj->get_agendaFN($sess_id_user); } else { $user_messages = $userObj->error_msg; $user_agenda = translateFN("Nessun'informazione"); } } else {
// funzione in history_nodes_visited_FN() $prehistory .= "<p>"; $prehistory .= $user_historyObj->history_summary_FN(); $prehistory .= "</p>"; // Percentuale nodi visitati (necessita dati che vengono calcolati dalla // funzione in history_nodes_visited_FN() ) $prehistory .= "<p align=\"center\">"; $prehistory .= translateFN("Percentuale nodi visitati/totale: "); $nodes_percent = $user_historyObj->history_nodes_visitedpercent_FN() . "%"; $prehistory .= "<b>" . $nodes_percent . "</b>"; $prehistory .= "</p>"; $prehistory .= "<p align=\"center\">"; $prehistory .= "<img src=\"../browsing/include/graph_pies.inc.php?nodes_percent=" . urlencode($nodes_percent) . "\" border=0 align=center>"; $prehistory .= "</p>"; // Tempo di visita nodi $prehistory .= "<p align=\"center\">"; $prehistory .= translateFN("Tempo totale di visita dei nodi (in ore:minuti): "); $prehistory .= "<b>" . $user_historyObj->history_nodes_time_FN() . "</b><br>"; // Media di visita nodi $prehistory .= translateFN("Tempo medio di visita dei nodi (in minuti:secondi): "); $prehistory .= "<b>" . $user_historyObj->history_nodes_average_FN() . "</b>"; $prehistory .= "</p>"; $history = $prehistory . $history; $banner = (include ROOT_DIR . '/include/banner.inc.php'); $content_dataAr = array('course_title' => $course_title, 'user_name' => $user_name, 'student' => $student_name, 'banner' => $banner, 'level' => $user_level, 'data' => menu_detailsFN($id_student, $id_course_instance, $id_course) . $history, 'status' => $status, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml()); $menuOptions['id_instance'] = $id_course_instance; $menuOptions['id_course_instance'] = $id_course_instance; $menuOptions['id_student'] = $id_student; $menuOptions['id_course'] = $id_course; $menuOptions['period'] = $period; ARE::render($layout_dataAr, $content_dataAr, NULL, NULL, $menuOptions);
* outputs the data of selected student as an excel file */ /** * @author giorgio 15/mag/2013 * commented old code for generating rtf file */ // header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past // header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified // header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 // header("Cache-Control: post-check=0, pre-check=0", false); // header("Pragma: no-cache"); // HTTP/1.0 // //header("Content-Type: application/vnd.ms-excel"); // header("Content-Type: application/rtf"); // // header("Content-Length: ".filesize($name)); // // header("Content-Disposition: attachment; filename=student_".$id_student.".xls"); //???? // header("Content-Disposition: attachment; filename=student_".$id_student.".rtf"); // echo $history; // header ("Connection: close"); exit; } //end switch op $banner = (include "{$root_dir}/include/banner.inc.php"); $home = "<a href=\"tutor.php\">" . translateFN("home") . "</a>"; $bookmark = "<a href=\"../browsing/bookmarks.php\">" . translateFN("bookmarks") . "</a>"; $chat_link = "<a href=\"{$http_root_dir}/comunica/ada_chat.php\" target=_blank>" . translateFN("chat") . "</a>"; $menu_07 = menu_detailsFN($id_student, $id_course_instance, $id_course); $content_dataAr = array('help' => isset($help) ? $help : '', 'course_title' => $course_title . ', ' . translateFN('iniziato il') . ' ' . $start_date, 'user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'banner' => $banner, 'home' => $home, 'bookmark' => $bookmark, 'last_visit' => '', 'student' => $student_name, 'chat_link' => $chat_link, 'history' => $history, 'menu_07' => isset($menu_07) ? $menu_07 : '', 'menu_08' => isset($menu_08) ? $menu_08 : '', 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml()); $menuOptions['id_course_instance'] = $id_course_instance; $menuOptions['id_instance'] = $id_course_instance; $menuOptions['id_student'] = $id_student; ARE::render($layout_dataAr, $content_dataAr, NULL, NULL, $menuOptions);