moved code up one level to eliminate the docs subdirectory
[acontent.git] / home / editor / arrange_content.php
1 <?php
2 /************************************************************************/
3 /* AContent                                                             */
4 /************************************************************************/
5 /* Copyright (c) 2010                                                   */
6 /* Inclusive Design Institute                                           */
7 /*                                                                      */
8 /* This program is free software. You can redistribute it and/or        */
9 /* modify it under the terms of the GNU General Public License          */
10 /* as published by the Free Software Foundation.                        */
11 /************************************************************************/
12
13 define('TR_INCLUDE_PATH', '../../include/');
14 require (TR_INCLUDE_PATH.'vitals.inc.php');
15
16 global $_course_id, $contentManager;
17
18 Utility::authenticate(TR_PRIV_ISAUTHOR);
19
20 if (isset($_POST['move']) && isset($_POST['moved_cid'])) {
21         $arr = explode('_', key($_POST['move']), 2);
22         $new_pid = $arr[0];
23         $new_ordering = $arr[1];
24
25         $contentManager->moveContent($_POST['moved_cid'], $new_pid, $new_ordering);
26         header('Location: '.TR_BASE_HREF.'home/editor/arrange_content.php?_course_id='.$_course_id);
27         exit;
28 }
29         
30 if (!defined('TR_INCLUDE_PATH')) { exit; }
31
32 $savant->assign('languageManager', $languageManager);
33 $savant->assign('course_id', $_course_id);
34
35 $savant->display('home/editor/arrange_content.tmpl.php');
36
37 ?>