public static function is_cartridge($url) {
        $params = self::validate_parameters(self::is_cartridge_parameters(),
                                            array(
                                                'url' => $url,
                                            ));
        $url = $params['url'];

        $context = context_system::instance();
        self::validate_context($context);
        require_capability('moodle/site:config', $context);

        $iscartridge = lti_is_cartridge($url);

        return array('iscartridge' => $iscartridge);
    }
public static function is_cartridge($url) {
        $params = self::validate_parameters(self::is_cartridge_parameters(),
                                            array(
                                                'url' => $url,
                                            ));
        $url = $params['url'];

        $context = context_system::instance();
        self::validate_context($context);
        require_capability('moodle/site:config', $context);

        $iscartridge = lti_is_cartridge($url);

        return array('iscartridge' => $iscartridge);
    }
public static function is_cartridge ( $ url ) { $ params = self :: validate_parameters ( self :: is_cartridge_parameters ( ) , array ( 'url' => $ url , ) ) ; $ url = $ params [ 'url' ] ; $ context = context_system :: instance ( ) ; self :: validate_context ( $ context ) ; require_capability ( 'moodle/site:config' , $ context ) ; $ iscartridge = lti_is_cartridge ( $ url ) ; return array ( 'iscartridge' => $ iscartridge ) ; }
Determine if the url to a tool is for a cartridge.

@param string $url Url that may or may not be an xml cartridge
@return bool True if the url is for a cartridge.
@since Moodle 3.1
@throws moodle_exception
Determine if the url to a tool is for a cartridge .