예제 #1
0
 /**
  * function that return a specific history test
  *
  * @global db $dh
  *
  * @return array an array composed of 'html', 'path' and 'title' keys
  */
 protected function view_history_tests()
 {
     $array = parent::view_history_tests();
     $array['path'] = '<a href="' . $this->filepath . '?op=' . $this->what . '&id_course_instance=' . $this->course_instanceObj->id . '&id_course=' . $this->courseObj->id . '">' . translateFN('Storico') . ' ' . ucfirst($this->plurale) . '</a> &gt; <a href="' . $this->filepath . '?op=' . $this->what . '&id_course_instance=' . $this->course_instanceObj->id . '&id_course=' . $this->courseObj->id . '&id_test=' . $this->test['id_nodo'] . '">' . $this->test['titolo'] . '</a> &gt; ' . translateFN('Tentativo') . ' #' . $this->history_test['id_history_test'];
     $array['title'] = translateFN('Storico') . ' ' . ucfirst($this->plurale);
     return $array;
 }
예제 #2
0
파일: tutor.php 프로젝트: eguicciardi/ada
$neededObjAr = array(AMA_TYPE_TUTOR => array('layout', 'course', 'course_instance'));
/**
 * Performs basic controls before entering this module
 */
require_once ROOT_DIR . '/include/module_init.inc.php';
require_once ROOT_DIR . '/browsing/include/browsing_functions.inc.php';
require_once MODULES_TEST_PATH . '/config/config.inc.php';
require_once MODULES_TEST_PATH . '/include/init.inc.php';
//needed to promote AMADataHandler to AMATestDataHandler. $sess_selected_tester is already present in session
$GLOBALS['dh'] = AMATestDataHandler::instance(MultiPort::getDSN($_SESSION['sess_selected_tester']));
$self = whoami();
if (!isset($course_instanceObj) || !is_a($course_instanceObj, 'Course_instance')) {
    $course_instanceObj = read_course_instance_from_DB($_GET['id_course_instance']);
}
require_once MODULES_TEST_PATH . '/include/management/tutorManagementTest.inc.php';
$management = new TutorManagementTest($_GET['op'], $courseObj, $course_instanceObj, isset($_GET['id_student']) ? $_GET['id_student'] : null, isset($_GET['id_test']) ? $_GET['id_test'] : null, isset($_GET['id_history_test']) ? $_GET['id_history_test'] : null);
$return = $management->render();
$text = $return['html'];
$title = $return['title'];
$path = $return['path'];
/*
 * Go back link
 */
$navigation_history = $_SESSION['sess_navigation_history'];
$last_visited_node = $navigation_history->lastModule();
$go_back_link = CDOMElement::create('a', 'href:' . $last_visited_node);
$go_back_link->addChild(new CText(translateFN('Indietro')));
/*
 * Output
 */
$content_dataAr = array('status' => translateFN('Navigazione'), 'path' => $path, 'user_name' => $user_name, 'user_type' => $user_type, 'user_level' => $user_level, 'visited' => '-', 'icon' => isset($icon) ? $icon : '', 'text' => $text, 'go_back' => $go_back_link->getHtml(), 'title' => $title, 'author' => isset($author) ? $author : '', 'node_level' => 'livello nodo', 'course_title' => '<a href="' . HTTP_ROOT_DIR . '/tutor/tutor.php">' . translateFN('Modulo Tutor') . '</a> > ');