コード例 #1
0
ファイル: addnode.php プロジェクト: eguicciardi/ada
  */
 //$navigation_history = $_SESSION['sess_navigation_history'];
 $need_to_unset_session = strcmp($navigation_history->previousItem(), __FILE__) !== 0;
 if (!isset($_SESSION['sess_node_editing']['node_data']) || $need_to_unset_session) {
     if ($need_to_unset_session !== 0) {
         unset($_SESSION['sess_node_editing']);
     }
     $media_found = array();
     $_SESSION['sess_node_editing']['media_in_db'] = serialize($media_found);
 } else {
     $node_to_edit = unserialize($_SESSION['sess_node_editing']['node_data']);
     unset($_SESSION['sess_node_editing']['node_data']);
 }
 //    $data = NodeEditingViewer::getEditingForm($form_action, $id_course, $id_course_instance, $sess_id_user, $node_to_edit, $flags);
 //    $form = $data['form'];
 $form = NodeEditingViewer::getEditingForm($form_action, isset($id_course) ? $id_course : null, isset($id_course_instance) ? $id_course_instance : null, isset($sess_id_user) ? $sess_id_user : null, $node_to_edit, $flags);
 /* 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_type);
 $title = Utilities::getEditingFormTitleForNodeType($node_type);
 if ($status == '') {
     $status = $title;
 }
 // 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']);
 /*
 $version = $node_to_edit['version'];
 $author = $user_name;
 $node_level = $node_to_edit['level'];
コード例 #2
0
ファイル: edit_node.php プロジェクト: eguicciardi/ada
 } else {
     $node_to_edit = unserialize($_SESSION['sess_node_editing']['node_data']);
     unset($_SESSION['sess_node_editing']['node_data']);
 }
 /*
  * Ottiene le preferenze di visualizzazione per l'editor
  */
 $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'];