Esempio n. 1
1
    $save_link = '';
    $node_data_and_buttons_CSS_class = 'hide_node_data';
    */
} else {
    if ($op == 'preview') {
        //$data = NodeEditingViewer::getPreviewForm('addnode.php?op=add_node', 'addnode.php?op=save');
        //$form = $data['form'];
        $form = NodeEditingViewer::getPreviewForm('addnode.php?op=add_node', 'addnode.php?op=save');
        /* vito, 20 feb 2009
         * usa i dati presenti nella sessione per mostrare l'anteprima del nodo
         * che si sta editando. E' il metodo NodeEditingViewer::getPreviewForm
         * che si occupa di passare i dati in $_POST nella sessione, pertanto è
         * necessario che questo sia invocato prima.
         */
        $node_data = unserialize($_SESSION['sess_node_editing']['node_data']);
        $icon = CourseViewer::getClassNameForNodeType($node_data['type']);
        if ($status == '') {
            $status = translateFN('Visualizzazione anteprima del nodo');
        }
        // vito, 20 apr 2009
        /*
         * Choose the right template for the preview
         */
        switch ($node_data['type']) {
            case ADA_NOTE_TYPE:
                $self = 'previewnote';
                break;
            case ADA_PRIVATE_NOTE_TYPE:
                $self = 'previewprivatenote';
                break;
            case ADA_GROUP_TYPE:
Esempio n. 2
0
            $form = translateFN("Esercizio di livello superiore al tuo");
        } else {
            $viewer = ExerciseViewerFactory::create($exercise->getExerciseFamily());
            $action = 'exercise.php';
            $form = $viewer->getViewingForm($userObj, $exercise, $sess_id_course_instance, $action);
            // vito 26 gennaio 2009
            if (($id = ExerciseDAO::getNextExerciseId($exercise, $sess_id_user)) != NULL) {
                $next_exercise_menu_link = CDOMElement::create('a');
                $next_exercise_menu_link->setAttribute('href', "{$http_root_dir}/browsing/exercise.php?id_node={$id}");
                $next_exercise_menu_link->addCHild(new CText(translateFN('Prossimo esercizio')));
                $dataHa['go_back'] .= $next_exercise_menu_link->getHtml();
            }
        }
        $dataHa['exercise'] = $form;
        $node_title = $exercise->getTitle();
        $icon = CourseViewer::getCSSClassNameForExerciseType($exercise->getExerciseFamily());
        break;
}
/*
 * Actions menu
*/
if ($id_profile == AMA_TYPE_AUTHOR) {
    /*
     * build onclick event for new menu.
     */
    $link = HTTP_ROOT_DIR . '/services/edit_exercise.php?op=delete';
    $text = addslashes(translateFN('Confermi cancellazione esercizio?'));
    $onclick = "confirmCriticalOperationBeforeRedirect('{$text}','{$link}')";
} else {
    $edit_exercise = new CText('');
}
Esempio n. 3
0
             $span->addChild($link);
             $order_div->addChild($span);
             break;
     }
     $index_link = $order_div->getHtml();
     $search_label = translateFN('Cerca nell\'Indice:');
     $node_type = 'standard_node';
     /*
      * vito, 23 luglio 2008
      */
     if ($expand_nodes) {
         $node_index = $exp_link;
     }
     //$node_index .= CourseViewer::displayMainIndex($userObj, $sess_id_course, $expand, $order, $sess_id_course_instance,'structIndex');
     // vito, 26 nov 2008: $main_index is a CORE object
     $main_index = CourseViewer::displayMainIndex($userObj, $sess_id_course, $expand, $order, $sess_id_course_instance, 'structIndex');
     if (!AMA_DataHandler::isError($main_index)) {
         $node_index .= $main_index->getHtml();
     }
     //vito 26 gennaio 2009
     //$node_index .= $legenda;
     $node_index .= $legenda->getHtml();
 }
 /* 2.
    getting todate-information on user
    MESSAGES adn EVENTS
    */
 /*
  * Non dovrebbe servire
  */
 //    if (empty($userObj->error_msg)){
Esempio n. 4
0
 /**
  * function getInternalLinkSelector, used to display a tree for the course the edited node belongs to.
  * this tree allows user to select a group of nodes to link to or a single node.
  *
  * @param  int    $id_course
  * @param  string $fckeditorInstance
  * @return string
  */
 public static function getInternalLinkSelector($id_course, $id_node, $container_div, $action)
 {
     // vito, 22 apr 2009, added $id_node and 'id_edited_node'
     return CourseViewer::displayInternalLinkSelector($id_course, array('action' => $action, 'container_div' => $container_div, 'id_edited_node' => $id_node));
 }
Esempio n. 5
0
         */
        $flags = PreferenceSelector::getPreferences($id_profile, $node_to_edit['type'], EDIT_OPERATION, $ADA_ELEMENT_VIEWING_PREFERENCES);
        /*
         * Mostra l'editor
         */
        //    $data   = NodeEditingViewer::getEditingForm($action, $id_course, $sess_id_course_instance, $sess_id_user, $node_to_edit, $flags);
        if (!isset($id_course)) {
            $id_course = null;
        }
        $form = NodeEditingViewer::getEditingForm($action, $id_course, $sess_id_course_instance, $sess_id_user, $node_to_edit, $flags);
        $status = translateFN("Modifica del nodo");
        /* vito, 20 feb 2009
         * usa i dati presenti nella sessione per mostrare alcune informazioni relative al nodo
         * che si sta editando
         */
        $icon = CourseViewer::getClassNameForNodeType($node_to_edit['type']);
        $title = Utilities::getEditingFormTitleForNodeType($node_to_edit['type']);
        if ($status == '') {
            $status = $title;
        }
        $version = $node_to_edit['version'];
        $author = $user_name;
        $node_level = $node_to_edit['level'];
        $keywords = $node_to_edit['title'];
        $creation_date = $node_to_edit['creation_date'];
        $edit_link = '';
        $save_link = '';
        $content_dataAr_and_buttons_CSS_class = 'hide_node_data';
        // vito, 20 apr 2009
        $preview_additional_data = array('title' => $title, 'version' => $node_to_edit['version'], 'author' => $user_name, 'node_level' => $node_to_edit['level'], 'keywords' => $node_to_edit['title'], 'date' => $node_to_edit['creation_date']);
}