Skip to content
Snippets Groups Projects
Select Git revision
  • 7ae552fb565ad5d87eb102b5cb3bac2f94d672c6
  • main default protected
  • dev/grabowski
  • origin/main
  • hsh_1.22.4
  • 1.22.4
  • 1.22.3
  • 1.22.2
  • 1.22.1
  • 1.22
  • 1.21
  • 1.20.2
  • 1.20.1
  • 1.20.0
  • 1.19.1
  • 1.19
  • 1.18
  • 1.17.2
  • 1.17.1
  • 1.17
  • 1.16
  • 1.15
  • 1.14
  • 1.13
24 results

view.php

Blame
  • lib.php 31.42 KiB
    <?php
    // This file is part of Moodle - http://moodle.org/
    //
    // Moodle is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // Moodle is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
    /**
     * @package   mod_pdfannotator
     * @copyright 2018 RWTH Aachen (see README.md)
     * @author    Ahmad Obeid, Rabea de Groot, Anna Heynkes
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     */
    defined('MOODLE_INTERNAL') || die;
    
    require_once($CFG->dirroot . '/mod/pdfannotator/locallib.php');
    
    /**
     * List of features supported in pdfannotator module
     * @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 pdfannotator_supports($feature) {
        if (defined('FEATURE_MOD_PURPOSE')) {
            // Only defined in M4.0+.
            if ($feature === FEATURE_MOD_PURPOSE) {
                return MOD_PURPOSE_COMMUNICATION;
            }
        }
        switch($feature) {
            case FEATURE_GROUPS:
                return true;
            case FEATURE_GROUPINGS:
                return true;
            case FEATURE_MOD_INTRO:
                return true;
            case FEATURE_COMPLETION_TRACKS_VIEWS:
                return true;
            case FEATURE_COMPLETION_HAS_RULES:
                return true;
            case FEATURE_GRADE_HAS_GRADE:
                return false;
            case FEATURE_GRADE_OUTCOMES:
                return false;
            case FEATURE_BACKUP_MOODLE2:
                return true;
            case FEATURE_SHOW_DESCRIPTION:
                return true;
            case FEATURE_ADVANCED_GRADING:
                return false;
            case FEATURE_PLAGIARISM:
                return true;
            case FEATURE_COMMENT:
                return true;
            default:
                return null;
        }
    }
    /**
     * Function currently unused.
     *
     * @return string