save.ajax.php 618 B

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