$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);
} } $gochat_link = ""; $content_dataAr['edit_profile'] = $userObj->getEditProfilePage(); $content_dataAr['gostart'] = $gostart_link; $content_dataAr['gocontinue'] = $last_node_visited_link; $content_dataAr['goindex'] = $goindex_link; if ($new_nodes_html !== '') { $content_dataAr['new_nodes_links'] = $new_nodes_html; } // msg forum sono le note in realta' $content_dataAr['msg_forum'] = $msg_forum_count; $content_dataAr['msg_agenda'] = $msg_agenda_count; $content_dataAr['msg'] = $msg_simple_count; $content_dataAr['goclasse'] = $students_link; $content_dataAr['goforum'] = $goforum_link; $content_dataAr['gochat'] = $gochat_link; $content_dataAr['banner'] = isset($banner) ? $banner : null; $content_dataAr['today'] = $ymdhms; $content_dataAr['user_name'] = $user_name; $content_dataAr['user_type'] = $user_type; //$content_dataAr['last_visit'] = $userObj->get_last_accessFN(); $content_dataAr['last_visit'] = $last_access; $content_dataAr['message'] = isset($message) ? $message : null; $content_dataAr['course_title'] = translateFN("Home dell'utente") . " > " . translateFN("Novità"); $content_dataAr['status'] = $status; } $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS, 'user.css'); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_DATATABLE, JQUERY_DATATABLE_DATE, ROOT_DIR . '/js/include/jquery/dataTables/formattedNumberSortPlugin.js', JQUERY_NO_CONFLICT, 'user.js'); ARE::render($layout_dataAr, $content_dataAr, NULL, array('onload_func' => 'initDoc();'));
} if ($node_index != translateFN("Nessuno<p>")) { $content_dataAr['index'] = $node_index; } else { $content_dataAr['index'] = ""; } $content_dataAr['notes'] = $data['notes']; $content_dataAr['personal'] = $data['private_notes']; if ($node_type == ADA_GROUP_WORD_TYPE or $node_type == ADA_LEAF_WORD_TYPE) { $content_dataAr['text'] .= $data['extended_node']; /* * generate dattilo images DISABLED IN ADA $img_dir = $root_dir.'/browsing/dattilo/img'; $url_dir = $http_root_dir.'/browsing/dattilo/img'; if (file_exists($img_dir.'/a.jpg')) { $dattilo = converti_dattiloFN($node_title,$url_dir); $content_dataAr['dattilo'] = $dattilo; } * */ } $PRINT_optionsAr = array('id' => $id_node, 'url' => HTTP_ROOT_DIR . '/' . $_SERVER['REQUEST_URI'], 'course_title' => strip_tags($content_dataAr['course_title']), 'portal' => $eportal, 'onload_func' => 'window.print();'); $layout_dataAR = array(); ARE::render($layout_dataAR, $content_dataAr, ARE_PRINT_RENDER, $PRINT_optionsAr); /** * preparing for static mode * * now managed by the class Cache Manager * */ // $cacheObj->writeCachedData($id_profile,$layout_dataAR,$content_dataAr);
} if ($errorObj == "errore: aggiunta del record non riuscita") { $err_msg = translateFN("<b>Errore del sistema durante l'operazione di creazione chatroom! Riprova!</b>"); $form_data = array(array('label' => 'Titolo *', 'type' => 'text', 'value' => stripslashes($_POST['chat_title']), 'name' => 'chat_title', 'size' => '85', 'maxlenght' => '120'), array('label' => 'Argomento *', 'type' => 'text', 'name' => 'chat_topic', 'value' => stripslashes($_POST['chat_topic']), 'size' => '85', 'maxlength' => '120'), array('label' => 'Messaggio di benvenuto', 'type' => 'textarea', 'name' => 'welcome_msg', 'value' => stripslashes($_POST['welcome_msg']), 'rows' => '1', 'cols' => '63', 'wrap' => 'physical'), array('label' => 'Proprietario *', 'type' => 'text', 'name' => 'chat_owner', 'value' => $_POST['chat_owner'], 'size' => '20', 'maxlength' => '20'), array('label' => 'Tipo *', 'type' => 'select', 'name' => 'chat_type', 'value' => $options_of_chat_types), array('label' => 'Numero utenti', 'type' => 'text', 'name' => 'max_users', 'value' => $_POST['max_users'], 'size' => '3', 'maxlength' => '3'), array('label' => 'Giorno di apertura<br>(gg/mm/aa)', 'type' => 'text', 'name' => 'start_day', 'value' => $start_day, 'size' => '8', 'maxlength' => '8'), array('label' => 'Ora di avvio<br>(oo:mm:ss)', 'type' => 'text', 'value' => $start_time, 'name' => 'start_time', 'size' => '8', 'maxlength' => '8'), array('label' => 'Giorno di chiusura<br>(gg/mm/aa)', 'type' => 'text', 'value' => $_POST['end_day'], 'name' => 'end_day', 'size' => '8', 'maxlength' => '8'), array('label' => 'Ora di termine<br>(oo:mm:ss)', 'type' => 'text', 'value' => $_POST['end_time'], 'name' => 'end_time', 'size' => '8', 'maxlength' => '8'), array('label' => 'Classe ID', 'type' => 'text', 'name' => 'id_course_instance', 'value' => $_POST['id_course_instance'], 'size' => '11', 'maxlength' => '11'), array('label' => '', 'type' => 'submit', 'name' => 'invia', 'value' => 'Invia'), array('type' => 'reset', 'name' => 'reset', 'value' => 'Reset')); $f->initForm("../comunica/create_chat.php", "POST", "", "create_chat_form"); $f->setForm($form_data); $form = $f->getForm(); } } } // end if count // build up error message if (count($errors)) { $err_msg = "<strong>"; foreach ($errors as $err) { $err_msg .= $err . "<br>"; } $err_msg .= "</strong>"; } } //end if invia } // end if POST $banner = (include ROOT_DIR . '/include/banner.inc.php'); // ****************************************************** // END OF FORM CONSTRUCTION // ****************************************************** // array with data to be createed to the browser $data = array('banner' => $banner, 'status' => $status, 'user_name' => $user_name, 'user_type' => $user_type, 'edit_profile' => $userObj->getEditProfilePage(), 'help' => $help, 'star' => $star, 'id_chatroom' => $id_chatroom, 'chatroom_link' => $chatroom_link, 'data' => $form, 'create_chat' => $form, 'error' => $err_msg); ARE::render($layout_dataAr, $data); //end create_chat_message
$servicelevel = null; /* if isset $_SESSION['service_level'] it means that the istallation supports course type */ if (isset($_SESSION['service_level'][$course[4]])) { $servicelevel = $_SESSION['service_level'][$course[4]]; } if (!isset($servicelevel)) { $servicelevel = DEFAULT_SERVICE_TYPE_NAME; } $tbody_data[] = array($imgDetails, $courseId, $course[1], translateFN($servicelevel), $course[2], $course[3], $actions); } $data = BaseHtmlLib::tableElement('id:table_list_courses', $thead_data, $tbody_data); } else { $data = new CText(translateFN('Non sono stati trovati corsi')); } $filter = null; if (isset($_GET['filter']) && isset($_SESSION['service_level'])) { $filter = $_SESSION['service_level'][$_GET['filter']]; $label = translateFN('Lista corsi di tipo "') . $filter . '"'; } else { $label = translateFN('Lista corsi'); } $help = translateFN('Da qui il provider admin può vedere la lista dei corsi presenti sul provider'); $Li_edit_home_page = ""; $content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'label' => $label, 'help' => $help, 'data' => $data->getHtml(), 'module' => isset($module) ? $module : '', 'edit_profile' => $userObj->getEditProfilePage(), 'messages' => $user_messages->getHtml()); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_DATATABLE, JQUERY_DATATABLE_DATE, JQUERY_NO_CONFLICT); $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS); $render = null; $filter = "'" . $filter . "'"; $options['onload_func'] = 'initDoc(' . $filter . ')'; ARE::render($layout_dataAr, $content_dataAr, $render, $options);
$table = AdminModuleHtmlLib::getTestersActivityReport($testers_dataAr); $label = translateFN("Home dell'amministratore"); $help = translateFN("Report sintetico dell'attività dei tester"); $menu_dataAr = array(array('href' => 'add_tester.php', 'text' => translateFN('Aggiungi provider')), array('href' => 'add_service.php', 'text' => translateFN('Aggiungi servizio')), array('href' => 'add_user.php', 'text' => translateFN('Aggiungi utente')), array('href' => 'import_language.php', 'text' => translateFN('Import Language'))); /** * giorgio 12/ago/2013 * * add content editing to menu only if it's a multiprovider environment */ // grab available content types for editing and build menu items // $availableTypes = ; // if (MULTIPROVIDER) // { foreach (dirTree(ROOT_DIR . '/docs') as $aType) { /** * if is singleprovider, admin cannot edit news content * It will not be shown anyway */ if (!MULTIPROVIDER && $aType == 'news') { continue; } array_push($menu_dataAr, array('href' => 'edit_content.php?type=' . $aType, 'text' => 'Edit ' . $aType . ' content')); } // } $actions_menu = AdminModuleHtmlLib::createActionsMenu($menu_dataAr); $content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'actions_menu' => $actions_menu->getHtml(), 'label' => $label, 'help' => $help, 'data' => $table->getHtml(), 'module' => $label, 'messages' => $user_messages->getHtml()); /** * Sends data to the rendering engine */ ARE::render($layout_dataAr, $content_dataAr);
$spanAdvanced_search->addChild(new CText("<strong>" . translateFN('Ricerca avanzata') . "</strong>")); if (isset($_SESSION['sess_id_course_instance'])) { $last_access = $userObj->get_last_accessFN($_SESSION['sess_id_course_instance'], "UT", null); $last_access = AMA_DataHandler::ts_to_date($last_access); } else { $last_access = $userObj->get_last_accessFN(null, "UT", null); $last_access = AMA_DataHandler::ts_to_date($last_access); } if ($last_access == '' || is_null($last_access)) { $last_access = '-'; } if (isset($_GET['s_AdvancedForm'])) { $result_AdvancedSearch = $results; unset($results); } else { $result_AdvancedSearch = null; } $content_dataAr = array('form' => $search_form, 'advancedSearch_form' => $advancedSearch_form, 'menuAdvanced_search' => $menuAdvanced_search, 'results' => isset($results) ? $results : '', 'help' => $spanSimple_search->getHtml() . $spanAdvanced_search->getHtml(), 'result_AdvancedSearch' => $result_AdvancedSearch, 'simpleSearchLink' => $Simple_searchLink, 'advanced_searchLink' => $advanced_searchLink, 'menu' => $menu, 'banner' => $banner, 'course_title' => translateFN(' Ricerca '), 'user_name' => $user_name, 'user_type' => $user_type, 'user_level' => $user_level, 'status' => $status, 'last_visit' => $last_access, 'index' => $node_index, 'author' => isset($node_author) ? $node_author : '', 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'events' => $user_events->getHtml(), 'chat_users' => $online_users, 'user_avatar' => $avatar->getHtml()); /** * Sends data to the rendering engine */ $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_DATATABLE, JQUERY_NO_CONFLICT, JQUERY_MASKEDINPUT); $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS); if ($userObj->tipo == AMA_TYPE_STUDENT && $self_instruction) { array_push($layout_dataAr['JS_filename'], ROOT_DIR . '/js/browsing/search.js'); } $options['onload_func'] = 'dataTablesExec()'; $menuOptions['self_instruction'] = $self_instruction; //"\$j('input, a.button, button').uniform();" ARE::render($layout_dataAr, $content_dataAr, NULL, array('onload_func' => "initDoc();"), $menuOptions);
} } // end foreach $html = $table->getHtml(); } } /* * Last access link */ if (isset($_SESSION['sess_id_course_instance'])) { $last_access = $userObj->get_last_accessFN($_SESSION['sess_id_course_instance'], "UT", null); $last_access = AMA_DataHandler::ts_to_date($last_access); } else { $last_access = $userObj->get_last_accessFN(null, "UT", null); $last_access = AMA_DataHandler::ts_to_date($last_access); } $node_data = array('banner' => $banner, 'data' => $html, 'status' => $status, 'user_name' => $user_name_name, 'user_type' => $user_type, 'status' => $status, 'user_level' => $user_level, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'edit_profile' => $userObj->getEditProfilePage(), 'title' => $node_title, 'course_title' => $course_title, 'path' => $nodeObj->findPathFN(), 'help' => $help, 'last_visit' => $last_access); /* 5. HTML page building */ $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_DATATABLE, JQUERY_UI, JQUERY_NO_CONFLICT); $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS); $render = null; $options['onload_func'] = 'initDoc()'; $imgAvatar = $userObj->getAvatar(); $avatar = CDOMElement::create('img', 'src:' . $imgAvatar); $avatar->setAttribute('class', 'img_user_avatar'); $node_data['user_modprofilelink'] = $userObj->getEditProfilePage(); $node_data['user_avatar'] = $avatar->getHtml(); ARE::render($layout_dataAr, $node_data, $render, $options);
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: text/plain"); // header("Content-Type: application/vnd.ms-excel"); // header("Content-Length: ".filesize($chat_log_file)); //? $course_title .= ' - ' . translateFN('id classe') . ': ' . $id_course_instance; header("Content-Disposition: attachment; filename=class_" . $id_course_instance . '_chat_' . $id_chatroom . ".csv"); echo $export_log; // header ("Connection: close"); exit; break; default: } $help = translateFN("Questa è il report della chat di classe"); if (!isset($course_title)) { $course_title = ""; } else { $course_title .= ' - ' . translateFN('id classe') . ': ' . $id_course_instance; } if (!isset($status)) { $status = ""; } $chatrooms_link = '<a href="' . HTTP_ROOT_DIR . '/comunica/list_chatrooms.php">' . translateFN('Lista chatrooms'); $content_dataAr = array('banner' => $banner, 'course_title' => translateFN('Report della chat') . ' - ' . translateFN('Corso') . ': ' . $course_title, 'home' => isset($homepage) ? "<a href=\"{$homepage}\">home</a>" : '', 'user_name' => $user_name, 'user_type' => $user_type, 'level' => $user_level, 'help' => $help, 'data' => $tabled_chat_dataHa, 'status' => $status, 'chatrooms' => $chatrooms_link, 'chat_users' => isset($online_users) ? $online_users : '', 'messages' => isset($user_messages) ? $user_messages : '', 'agenda' => isset($user_agenda) ? $user_agenda : ''); ARE::render($layout_dataAr, $content_dataAr, NULL, NULL, isset($menuOptions) ? $menuOptions : null);
//for defaultSelfInstruction.tpl } else { $layout_dataAR = array(); } $node_data = array('banner' => $banner, 'course_title' => '<a href="main_index.php">' . $course_title . '</a>', 'today' => $ymdhms, 'path' => isset($node_path) ? $node_path : '', 'user_name' => $userObj->nome, 'user_type' => $user_type, 'user_level' => $user_level, 'last_visit' => $last_access, 'data' => $log_data, 'menu' => $menu, 'help' => $help, 'bookmarks' => isset($user_bookmarks) ? $user_bookmarks : '', 'status' => $status, 'profilo' => isset($profilo) ? $profilo : '', 'myforum' => isset($my_forum) ? $my_forum : '', 'title' => isset($node_title) ? $node_title : '', 'edit_profile' => $userObj->getEditProfilePage()); if ($com_enabled) { $node_data['messages'] = $user_messages->getHtml(); $node_data['agenda'] = $user_agenda->getHtml(); $node_data['events'] = $user_events->getHtml(); $node_data['chat_users'] = $online_users; } else { $node_data['messages'] = translateFN("messaggeria non abilitata"); $node_data['agenda'] = translateFN("agenda non abilitata"); $node_data['chat_users'] = ""; } if (isset($msg)) { $help = CDOMElement::create('label'); $help->addChild(new CText(translateFN(ltrim($msg)))); $node_data['help'] = $help->getHtml(); } if (isset($self_instruction)) { $menuOptions['self_instruction'] = $self_instruction; } ARE::render($layout_dataAR, $node_data, NULL, $options, isset($menuOptions) ? $menuOptions : null); /* Versione XML: $xmlObj = new XML($layout_template,$layout_CSS,$imgpath); $xmlObj->fillin_templateFN($node_data); $xmlObj->outputFN('page','XML'); */
function writeCachedData($id_profile, $layout_dataAR, $content_dataAr) { // write contents & interface to file // uses ARE switch ($id_profile) { case AMA_TYPE_VISITOR: if ($this->static_mode > ADA_READONLY_CACHE or $this->cache_mode == 'cache' or $this->cache_mode == 'updatecache') { // we have to (re)write the cache file $static_optionsAr = array('static_dir' => $this->static_dir); ARE::render($layout_dataAR, $content_dataAr, ARE_FILE_RENDER, $static_optionsAr); } break; } }
$nato = translateFN('nato'); } if (!is_null($birthplace) && stripos($birthplace, 'NULL') === false && strlen($birthplace) > 0 && (!is_null($birthdate) && $birthdate > 0 && strlen($birthdate) > 0)) { $birthSentence = ""; } if (!is_null($codFisc) && stripos($codFisc, 'NULL') === false && strlen($codFisc) > 0) { $CodeFiscSentence = translateFN(' Codice Fiscale: ') . $codFisc; } if (!is_null($courseObj->getTitle()) && stripos($courseObj->getTitle(), 'NULL') === false && strlen($courseObj->getTitle()) > 0) { $mainSentence = '<strong>' . $courseObj->getTitle() . '</strong>'; } $UserCertificateObj->set_course_instance_for_history($id_instance); $user_historyObj = $UserCertificateObj->history; $time = $user_historyObj->history_nodes_time_FN(); $timeSentence = translateFN('Monte ore frequentato: ') . '<strong>' . $time . translateFN(' ore </strong>'); $data_inizio = $courseInstanceObj->getStartDate(); if ($data_inizio != '') { $data_Sentence = translateFN('Data inizio corso: ') . '<strong>' . $data_inizio . '</strong>'; } $testerAr = $common_dh->get_tester_info_from_id_course($courseObj->getId()); if (!is_null($testerAr['nome']) && stripos($testerAr['nome'], 'NULL') === false && strlen($testerAr['nome'])) { $providerSentence = translateFN('Provider che ha organizzato il corso: ') . '<strong>' . $testerAr['nome'] . '</strong>'; } $currentData = ts2dFN(time()); $luogo = $testerAr['citta']; $placeAndDate = $luogo . ' ' . $currentData; $responsabile = $testerAr['responsabile']; $signature = translateFN('Il Rappresentante Legale del Provider: ') . $responsabile; $content_dataAr = array('logo' => $logo, 'title' => $title, 'logoProvider' => null, 'userFullName' => $userFullName, 'birthSentence' => $birthSentence, 'CodeFiscSentence' => $CodeFiscSentence, 'mainSentence' => $mainSentence, 'timeSentence' => $timeSentence, 'data_Sentence' => $data_Sentence, 'providerSentence' => $providerSentence, 'placeAndDate' => $placeAndDate, 'signature' => $signature); ARE::render($layout_dataAr, $content_dataAr, ARE_PDF_RENDER, array('outputfile' => translateFN('Attestato') . '-[' . $codice_corso . ']-[' . $id_user . ']'));
*/ require_once ROOT_DIR . '/include/module_init.inc.php'; $self = whoami(); include_once 'include/comunica_functions.inc.php'; /* * Redirect to correct home if comunication not enabled */ if ($userObj->getType() == AMA_TYPE_VISITOR) { $homepage = $userObj->getHomepage(); $msg = translateFN("Utente non autorizzato"); header("Location: {$homepage}?err_msg={$msg}"); exit; } /* * FINE Redirect to correct home if comunication not enabled */ $date = date('l jS \\of F Y h:i:s A'); $label = "Video Chat on " . $date; $content = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"100%\" height=\"600\">\n <param name=movie value=\"{$videoroomObj->link_to_room}\">\n <param name=quality value=high>\n <embed src=\"{$videoroomObj->link_to_room}\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"100%\" height=\"600\">\n </embed>\n </object>"; $width = FRAME_WIDTH; $height = FRAME_HEIGHT; if (strlen($videoroomObj->link_to_room) > 0) { $iframe = "<iframe src='{$videoroomObj->link_to_room}' width='{$width}' height = '{$height}' ></iframe>"; } else { $status = addslashes(translateFN("ops, there was a problem!")); $options_Ar = array('onload_func' => "close_page('{$status}');"); } $menu_01 = "<a href=\"close_videochat.php?id_room=" . $videoroomObj->id_room . "&event_token={$event_token}\">" . translateFN("Chiudi") . "</a>"; $content_dataAr = array('label' => $label, 'menu_01' => $menu_01, 'user_name' => isset($user_uname) ? $user_uname : '', 'user_type' => $user_type, 'status' => $status, 'data' => $iframe); ARE::render($layout_dataAr, $content_dataAr, NULL, isset($options_Ar) ? $options_Ar : null);
} else { if ($isStarted && !$isEnded) { $link->addChild(new CText(translateFN('Accedi'))); } } } else { // skip to next iteration if tutor community has not been started by the switcher continue; } $tbody_dataAr[] = array($c['titolo'] . ' - ' . $c['title'], $started, ts2dFN($start_date), sprintf(translateFN('%d giorni'), $duration), ts2dFN($end_date), $link); } $tObj = BaseHtmlLib::tableElement('id:tutorCommunitiesTable', $thead_dataAr, $tbody_dataAr); $tObj->setAttribute('class', 'default_table doDataTable'); $data = $tObj->getHtml(); } else { $data = translateFN('Non sei iscritto a nessuna comunità di tutor'); } $content_dataAr = array('course_title' => translateFN('Elenco comunità di tutor'), 'user_name' => $user_name, 'user_type' => $user_type, 'edit_profile' => $userObj->getEditProfilePage(), 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'help' => translateFN('Clicca su accedi per entrare in una comunità di tutor'), 'dati' => $data, 'status' => $status, 'chat_link' => isset($chat_link) ? $chat_link : ''); $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_DATATABLE, JQUERY_DATATABLE_DATE, ROOT_DIR . '/js/include/jquery/dataTables/formattedNumberSortPlugin.js', JQUERY_NO_CONFLICT); /** * add the following line if there's a corresponding js file and * some JavaScript initialization is needed * $optionsAr ['onload_func'] = 'initDoc();'; */ $optionsAr['onload_func'] = 'initDoc();'; /** * Sends data to the rendering engine */ ARE::render($layout_dataAr, $content_dataAr, NULL, isset($optionsAr) ? $optionsAr : NULL);
/* * FINE GESTIONE PDT DA PAYPAL * */ //$dati = $message; // print_r($message); $info_div = CDOMElement::create('DIV', 'id:info_div'); $info_div->setAttribute('class', 'info_div'); $label_text = CDOMElement::create('span', 'class:info'); $label_text->addChild(new CText($message)); $info_div->addChild($label_text); $homeUser = $userObj->getHomePage(); $link_span = CDOMElement::create('span', 'class:info_link'); $link_to_home = BaseHtmlLib::link($homeUser, translateFN('vai alla home per accedere.')); $link_span->addChild($link_to_home); $info_div->addChild($link_span); //$data = new CText(translateFN('La tua iscrizione è stata effettuata con successo.')); $data = $info_div; // print_r($data->getHtml()); $path = translateFN('modulo di iscrizione'); $dati .= $link_torna_home; $field_data = array('menu' => "", 'banner' => $banner, 'path' => $path, 'data' => $info_div->getHtml(), 'help' => '', 'user_name' => $user_name, 'user_type' => $user_type, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'titolo_corso' => $course_name, 'annulla_iscrizione' => $link_annulla_iscrizione, 'price' => $price); } else { $dati = translateFN('Impossibile proseguire, Provider non trovato'); $field_data = array('menu' => "", 'banner' => $banner, 'data' => $dati, 'help' => '', 'user_name' => $user_name, 'user_type' => $user_type, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'titolo_corso' => $course_name, 'annulla_iscrizione' => $link_annulla_iscrizione, 'price' => $price); } /** * Sends data to the rendering engine */ ARE::render($layout_dataAr, $field_data);
} } else { if (!$courseObj instanceof Course || !$courseObj->isFull()) { $form = new CText(translateFN('Corso non trovato')); } else { $providerAuthors = $dh->find_authors_list(array('username'), ''); $authors = array(); foreach ($providerAuthors as $author) { $authors[$author[0]] = $author[1]; } $availableLanguages = Translator::getSupportedLanguages(); $languages = array(); foreach ($availableLanguages as $language) { $languages[$language['id_lingua']] = $language['nome_lingua']; } $form = new CourseModelForm($authors, $languages); if ($courseObj instanceof Course && $courseObj->isFull()) { $formData = array('id_corso' => $courseObj->getId(), 'id_utente_autore' => $courseObj->getAuthorId(), 'id_lingua' => $courseObj->getLanguageId(), 'id_layout' => $courseObj->getLayoutId(), 'nome' => $courseObj->getCode(), 'titolo' => $courseObj->getTitle(), 'descrizione' => $courseObj->getDescription(), 'id_nodo_iniziale' => $courseObj->getRootNodeId(), 'id_nodo_toc' => $courseObj->getTableOfContentsNodeId(), 'media_path' => $courseObj->getMediaPath(), 'static_mode' => $courseObj->getStaticMode(), 'data_creazione' => $courseObj->getCreationDate(), 'data_pubblicazione' => $courseObj->getPublicationDate(), 'crediti' => $courseObj->getCredits(), 'duration_hours' => $courseObj->getDurationHours(), 'service_level' => $courseObj->getServiceLevel()); $form->fillWithArrayData($formData); } else { $form = new CText(translateFN('Corso non trovato')); } } } $label = translateFN('Modifica dei dati del corso'); $help = translateFN('Da qui il provider admin può modificare un corso esistente'); $content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'status' => $status, 'label' => $label, 'help' => $help, 'data' => $form->getHtml(), 'module' => isset($module) ? $module : '', 'messages' => $user_messages->getHtml()); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_MASKEDINPUT, JQUERY_NO_CONFLICT); $optionsAr['onload_func'] = 'initDateField();'; ARE::render($layout_dataAr, $content_dataAr, null, $optionsAr);
exit();*/ } } else { $form = new UserProfileForm($languages); $user_dataAr = $userObj->toArray(); unset($user_dataAr['password']); $user_dataAr['email'] = $user_dataAr['e_mail']; unset($user_dataAr['e_mail']); $form->fillWithArrayData($user_dataAr); $help = translateFN('Modifica dati utente'); } $label = translateFN('Modifica dati utente'); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_MASKEDINPUT, JQUERY_NO_CONFLICT, ROOT_DIR . '/js/include/jquery/pekeUpload/pekeUpload.js'); $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, ROOT_DIR . '/js/include/jquery/pekeUpload/pekeUpload.css'); $maxFileSize = (int) (ADA_FILE_UPLOAD_MAX_FILESIZE / (1024 * 1024)); $optionsAr['onload_func'] = 'initDoc(' . $maxFileSize . ',' . $userObj->getId() . ');'; // $optionsAr['onload_func'] = 'initDateField();'; /* * Display error message if the password is incorrect */ if (isset($_GET['message'])) { $help = $_GET['message']; } $content_dataAr = array('user_name' => $user_name, 'user_type' => $user_type, 'messages' => $user_messages->getHtml(), 'agenda' => $user_agenda->getHtml(), 'status' => $status, 'course_title' => translateFN('Modifica dati utente'), 'dati' => $form->getHtml(), 'help' => $help); $imgAvatar = $userObj->getAvatar(); $avatar = CDOMElement::create('img', 'src:' . $imgAvatar); $avatar->setAttribute('class', 'img_user_avatar'); $content_dataAr['user_modprofilelink'] = $userObj->getEditProfilePage(); $content_dataAr['user_avatar'] = $avatar->getHtml(); ARE::render($layout_dataAr, $content_dataAr, NULL, $optionsAr);
$message = "Mancano le credenziali dell'applicazione presso il provider di login."; break; case 5: $message = "Autenticazione non riuscita: l'utente ha annullato l'autenticazione o il provider rifiuta la connessione"; break; case 6: $message = "Richiesta del profilo utente fallita. Probabilmente non è connesso al provider e deve autenticarsi di nuovo"; $hybridLogin->logOutFromProvider(); break; case 7: $message = "Utente non connesso al provider di login."; $hybridLogin->logOutFromProvider(); break; case 8: $message = "Il provider di login non supporta la funzionalità richiesta."; break; case 9: $message = "Problema nel generare l'oggetto utente di ADA"; break; default: $message = ""; break; } $message .= "<br /><br /><b>" . translateFN("Messaggio d'errore originale") . ":</b> " . $e->getMessage(); $messagespan = CDOMElement::create('span', 'class: login-error-message'); $messagespan->addChild(new CText(translateFN($message))); $content_dataAr = array('help' => translateFN('Problema Autenticazione ') . $hybridLogin->loadProviderName(), 'data' => $messagespan->getHtml()); $self = 'login-error'; ARE::render(null, $content_dataAr); } }
$count_visits = count($visits); $total_visits = $total_visits + count($visits); $row = array(translateFN('Id') => $id_node, translateFN('Nome') => $nome, translateFN('Visite') => $count_visits); if ($count_visits > 0) { $row[translateFN('Zoom')] = "<a href=\"author_report.php?mode=zoom&id_node={$id_node}\"><img src=\"img/magnify.png\"' border=0></a>"; } else { $row[translateFN('Zoom')] = ' '; } $id_course_and_nodeAr = explode('_', $id_node); $id_course = $id_course_and_nodeAr[0]; $row[translateFN('Naviga')] = "<a href=\"{$http_root_dir}/browsing/view.php?id_course={$id_course}&id_node={$id_node}\"><img src=\"img/timon.png\" border=0></a>"; array_push($visits_dataHa, $row); } } if (isset($err_msg) || !is_array($visits_dataHa) || count($visits_dataHa) <= 0) { $tabled_visits_dataHa = translateFN("Nessun corso assegnato all'autore."); } else { $caption = translateFN('Corso:') . " <strong>{$course_title}</strong> " . translateFN('- Report al ') . " <strong>{$ymdhms}</strong>"; $tObj = BaseHtmlLib::tableElement('id:authorReport, class: doDataTable', array_keys($visits_dataHa[0]), $visits_dataHa, null, $caption); $tObj->setAttribute('class', 'default_table doDataTable'); $tabled_visits_dataHa = $tObj->getHtml(); $optionsAr['onload_func'] = 'initDoc();'; $layout_dataAr['CSS_filename'] = array(JQUERY_UI_CSS, JQUERY_DATATABLE_CSS); $layout_dataAr['JS_filename'] = array(JQUERY, JQUERY_UI, JQUERY_DATATABLE, ROOT_DIR . '/js/include/jquery/dataTables/formattedNumberSortPlugin.js', JQUERY_NO_CONFLICT); } } // SERVICE: BANNER $banner = (include ROOT_DIR . '/include/banner.inc.php'); $content_dataAr = array('course_title' => translateFN('Report del corso'), 'banner' => $banner, 'menu' => $menu, 'user_name' => $user_name, 'user_type' => $user_type, 'help' => $help, 'status' => $status, 'dati' => $tabled_visits_dataHa, 'agenda' => $user_agenda->getHtml(), 'messages' => $user_messages->getHtml()); ARE::render($layout_dataAr, $content_dataAr, null, isset($optionsAr) ? $optionsAr : null);
$content_dataAr['go_next'] = $navBar->getHtml('next'); // can pass href text as second param } if (isset($msg)) { $help = CDOMElement::create('label'); $help->addChild(new CText(translateFN(ltrim($msg)))); $divhelp = CDOMElement::create('div'); $divhelp->setAttribute('id', 'help'); $divhelp->addChild($help); $content_dataAr['help'] = $divhelp->getHtml(); } $menuOptions['self_instruction'] = $self_instruction; $menuOptions['id_course'] = $sess_id_course; $menuOptions['id_course_instance'] = $sess_id_course_instance; $menuOptions['id_node'] = $sess_id_node; $menuOptions['id_parent'] = $sess_id_node; // define to enable author menu items define('MODULES_TEST_MOD_ENABLED', defined('MODULES_TEST') && MODULES_TEST && $mod_enabled); /** * this is modified here to test parameters passing on new menu */ $content_dataAr['test_history'] = 'op=test&id_course_instance=' . $sess_id_course_instance . '&id_course=' . $sess_id_course; ARE::render($layout_dataAR, $content_dataAr, null, $optionsAr, $menuOptions); } /** * preparing for static mode * * now managed by the class Cache Manager * */ // $cacheObj->writeCachedData($id_profile,$layout_dataAR,$content_dataAr);