save.ajax.php 614 B

1234567891011121314151617181920212223
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Get the intro steps for the web page
  5. * @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
  6. * @package chamilo.plugin.tour
  7. */
  8. /**
  9. * Init
  10. */
  11. require_once __DIR__ . '/../../../main/inc/global.inc.php';
  12. require_once __DIR__ . '/../config.php';
  13. if (!api_is_anonymous()) {
  14. $currentPageClass = isset($_POST['page_class']) ? $_POST['page_class'] : '';
  15. if (!empty($currentPageClass)) {
  16. $userId = api_get_user_id();
  17. $tourPlugin = Tour::create();
  18. $tourPlugin->saveCompletedTour($currentPageClass, $userId);
  19. }
  20. }