lp_comm.common.php 911 B

12345678910111213141516171819202122232425
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * This script contains the server part of the xajax interaction process. The client part is located
  5. * in lp_api.php or other api's.
  6. * This is a first attempt at using xajax and AJAX in general, so the code might be a bit unsettling.
  7. * @package chamilo.learnpath
  8. * @author Yannick Warnier <ywarnier@beeznest.org>
  9. */
  10. /**
  11. * Code
  12. */
  13. // Flag to allow for anonymous user - needs to be set before global.inc.php.
  14. $use_anonymous = true;
  15. require_once '../inc/global.inc.php';
  16. require_once 'learnpath.class.php';
  17. require '../inc/lib/xajax/xajax.inc.php';
  18. $xajax = new xajax(api_get_path(WEB_CODE_PATH).'newscorm/lp_comm.server.php');
  19. $xajax->registerFunction('save_item');
  20. $xajax->registerFunction('save_objectives');
  21. $xajax->registerFunction('switch_item_details');
  22. $xajax->registerFunction('backup_item_details');
  23. $xajax->registerFunction('start_timer');