2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
15 define('AT_INCLUDE_PATH', '../../../include/');
\r
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
\r
18 if (isset($_POST['cancel'])) {
\r
19 $msg->addFeedback('CANCELLED');
\r
20 header('Location: index.php');
\r
22 } else if (isset($_POST['submit'])) {
\r
23 header('Location: '.$_base_href.'mods/_core/imscp/ims_export.php?cid=' . intval($_POST['cid']));
\r
27 require(AT_INCLUDE_PATH.'header.inc.php');
\r
29 if (!isset($_main_menu)) {
\r
30 $_main_menu = $contentManager->getContent();
\r
33 function print_menu_sections(&$menu, $parent_content_id = 0, $depth = 0, $ordering = '') {
\r
34 $my_children = $menu[$parent_content_id];
\r
35 $cid = $_GET['cid'];
\r
37 if (!is_array($my_children)) {
\r
40 foreach ($my_children as $children) {
\r
41 echo '<option value="'.$children['content_id'].'"';
\r
42 if ($cid == $children['content_id']) {
\r
43 echo ' selected="selected"';
\r
46 echo str_pad('', $depth, '-') . ' ';
\r
47 if ($parent_content_id == 0) {
\r
48 $new_ordering = $children['ordering'];
\r
49 echo $children['ordering'];
\r
51 $new_ordering = $ordering.'.'.$children['ordering'];
\r
52 echo $ordering . '.'. $children['ordering'];
\r
54 echo ' '.$children['title'].'</option>';
\r
56 print_menu_sections($menu, $children['content_id'], $depth+1, $new_ordering);
\r
60 if (!authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN) && ($_SESSION['packaging'] == 'none')) {
\r
61 echo '<p>'._AT('content_packaging_disabled').'</p>';
\r
62 require (AT_INCLUDE_PATH.'footer.inc.php');
\r
64 } else if (!authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN) && ($_SESSION['packaging'] == 'top')) {
\r
65 $_main_menu = array($_main_menu[0]);
\r
70 <form method="post" action="<?php $_SERVER['PHP_SELF']?>">
\r
71 <div class="input-form">
\r
73 <h3><?php echo _AT('export_content'); ?></h3>
\r
74 <p><?php echo _AT('export_content_info'); ?></p>
\r
78 <label for="select_cid"><?php echo _AT('export_content_package_what'); ?></label><br />
\r
79 <select name="cid" id="select_cid">
\r
80 <option value="0"><?php echo _AT('export_entire_course_or_chap'); ?></option>
\r
81 <option>--------------------------</option>
\r
83 print_menu_sections($_main_menu);
\r
88 <div class="row buttons">
\r
89 <input type="submit" name="submit" value="<?php echo _AT('export'); ?>" />
\r
90 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
\r
95 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>