[ PHPXref.com ] [ Generated: Sun Jul 20 16:32:03 2008 ] [ ATutor 1.5.2 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> export.php (source)

   1  <?php
   2  /****************************************************************/

   3  /* ATutor                                                        */

   4  /****************************************************************/

   5  /* Copyright (c) 2002-2004 by Greg Gay & Joel Kronenberg        */

   6  /* Adaptive Technology Resource Centre / University of Toronto  */

   7  /* http://atutor.ca                                                */

   8  /*                                                              */

   9  /* This program is free software. You can redistribute it and/or*/

  10  /* modify it under the terms of the GNU General Public License  */

  11  /* as published by the Free Software Foundation.                */

  12  /****************************************************************/

  13  // $Id: export.php 5662 2005-11-22 16:43:39Z joel $

  14  
  15  define('AT_INCLUDE_PATH', './include/');
  16  require(AT_INCLUDE_PATH.'vitals.inc.php');
  17  
  18  if (isset($_POST['cancel'])) {
  19      $msg->addFeedback('CANCELLED');
  20      header('Location: index.php');
  21      exit;
  22  } else if (isset($_POST['submit'])) {
  23      header('Location: '.$_base_href.'tools/ims/ims_export.php?cid=' . intval($_POST['cid']));
  24      exit;
  25  }
  26  
  27  require (AT_INCLUDE_PATH.'header.inc.php');
  28  
  29  if (!isset($_main_menu)) {
  30      $_main_menu = $contentManager->getContent();
  31  }
  32  
  33  function print_menu_sections(&$menu, $parent_content_id = 0, $depth = 0, $ordering = '') {
  34      $my_children = $menu[$parent_content_id];
  35      $cid = $_GET['cid'];
  36  
  37      if (!is_array($my_children)) {
  38          return;
  39      }
  40      foreach ($my_children as $children) {
  41          echo '<option value="'.$children['content_id'].'"';
  42          if ($cid == $children['content_id']) {
  43              echo ' selected="selected"';
  44          }
  45          echo '>';
  46          echo str_pad('', $depth, '-') . ' ';
  47          if ($parent_content_id == 0) {
  48              $new_ordering = $children['ordering'];
  49              echo $children['ordering'];
  50          } else {
  51              $new_ordering = $ordering.'.'.$children['ordering'];
  52              echo $ordering . '.'. $children['ordering'];
  53          }
  54          echo ' '.$children['title'].'</option>';
  55  
  56          print_menu_sections($menu, $children['content_id'], $depth+1, $new_ordering);
  57      }
  58  }
  59  
  60      if (!authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN) && ($_SESSION['packaging'] == 'none')) {
  61          echo '<p>'._AT('content_packaging_disabled').'</p>';
  62          require (AT_INCLUDE_PATH.'footer.inc.php'); 
  63          exit;
  64      } else if (!authenticate(AT_PRIV_CONTENT, AT_PRIV_RETURN) && ($_SESSION['packaging'] == 'top')) {
  65          $_main_menu = array($_main_menu[0]);
  66      }
  67  ?>
  68  
  69  
  70  <form method="post" action="<?php $_SERVER['PHP_SELF']?>">
  71  <div class="input-form">
  72      <div class="row">
  73          <h3><?php echo _AT('export_content'); ?></h3>
  74          <p><?php echo _AT('export_content_info'); ?></p>
  75      </div>
  76  
  77      <div class="row">
  78          <label for="select_cid"><?php echo _AT('export_content_package_what'); ?></label><br />
  79          <select name="cid" id="select_cid">
  80              <option value="0"><?php echo _AT('export_entire_course_or_chap'); ?></option>
  81              <option>--------------------------</option>
  82              <?php
  83                  print_menu_sections($_main_menu);
  84              ?>
  85          </select>
  86      </div>
  87  
  88      <div class="row buttons">
  89          <input type="submit" name="submit" value="<?php echo _AT('export'); ?>" />
  90          <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
  91      </div>
  92  </div>
  93  </form>
  94  
  95  <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]