Example #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:
Example #2
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']);
}