view.php 902 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Interface script to view SLOODLE information about a particular SLOODLE module sub-type.
  4. * Optional parameter '_type' should identify what type of resource is being viewed, e.g. 'module' (default), 'course', 'user', 'users'. This determines which script is loaded.
  5. * Any other parameters depend upon which type of resource is being accessed.
  6. *
  7. * @package sloodle
  8. * @copyright Copyright (c) 2008-9 Sloodle (various contributors)
  9. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
  10. *
  11. * @contributor Peter R. Bloomfield
  12. */
  13. /** SLOODLE and Moodle configuration */
  14. require_once('init.php');
  15. /** General SLOODLE library functionality */
  16. require_once(SLOODLE_LIBROOT.'/general.php');
  17. // Get the type of resource being accessed
  18. $type = optional_param('_type', 'module', PARAM_CLEAN);
  19. // View the course
  20. if (!sloodle_view($type)) error('SLOODLE: failed to display resource type');
  21. ?>