Skip to content
Snippets Groups Projects
Select Git revision
  • 5f57b3de6aaab59d9f7f5b64d3ae32aaaa4ec3e2
  • master default protected
  • hsh_v4.5
  • hsh_v4-4
  • hsh_v4.4
  • hsh_v4.3
  • hsh_v4.1.x
  • hsh_v4.2
  • hsh_v4.1
  • hsh_v3.11
  • hsh_3.10
  • v3.11-r2-hsh
  • v3.11-r2
  • v3.11-r1
  • v3.10-r1
  • v3.9-r1
  • v3.8-r2
  • v3.8-r1
  • v3.7-r1
19 results

lib.php

Blame
  • lib.php 19.94 KiB
    <?php  // $Id: lib.php,v 1.9.2.1 2011/07/21 22:46:30 adelamarre Exp $
    /**
     * @package mod
     * @subpackage adobeconnect
     * @author Akinsaya Delamarre (adelamarre@remote-learner.net)
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    
    require_once('locallib.php');
    
    /**
     * Library of functions and constants for module adobeconnect
     * This file should have two well differenced parts:
     *   - All the core Moodle functions, neeeded to allow
     *     the module to work integrated in Moodle.
     *   - All the adobeconnect specific functions, needed
     *     to implement all the module logic. Please, note
     *     that, if the module become complex and this lib
     *     grows a lot, it's HIGHLY recommended to move all
     *     these module specific functions to a new php file,
     *     called "locallib.php" (see forum, quiz...). This will
     *     help to save some memory when Moodle is performing
     *     actions across all modules.
     */
    
    $adobeconnect_EXAMPLE_CONSTANT = 42;
    
    /** Include calendar/lib.php */
    require_once($CFG->dirroot.'/calendar/lib.php');
    
    
    /**
     * @uses FEATURE_GROUPS
     * @uses FEATURE_GROUPINGS
     * @uses FEATURE_GROUPMEMBERSONLY
     * @uses FEATURE_MOD_INTRO
     * @uses FEATURE_COMPLETION_TRACKS_VIEWS
     * @uses FEATURE_GRADE_HAS_GRADE
     * @uses FEATURE_GRADE_OUTCOMES
     * @param string $feature FEATURE_xx constant for requested feature
     * @return mixed True if module supports feature, false if not, null if doesn't know
     */
    function adobeconnect_supports($feature) {
        switch($feature) {
            case FEATURE_GROUPS:                  return true;
            case FEATURE_GROUPINGS:               return true;
            case FEATURE_GROUPMEMBERSONLY:        return true;
            case FEATURE_MOD_INTRO:               return true;
            case FEATURE_COMPLETION_TRACKS_VIEWS: return false;
            case FEATURE_GRADE_HAS_GRADE:         return false;
            case FEATURE_GRADE_OUTCOMES:          return false;
            case FEATURE_BACKUP_MOODLE2:          return true;
    
            default: return null;
        }
    }
    
    /**
     * Given an object containing all the necessary data,
     * (defined by the form in mod_form.php) this function
     * will create a new instance and return the id number
     * of the new instance.
     *
     * @param object $adobeconnect An object from the form in mod_form.php
     * @return int The id of the newly inserted adobeconnect record
     */
    function adobeconnect_add_instance($adobeconnect) {
        global $COURSE, $USER, $DB;
    
        $adobeconnect->timecreated  = time();