moodle-expcontent/classes/shortcodes.php

22 lines
497 B
PHP
Raw Normal View History

<?php
namespace mod_expcontent;
defined('MOODLE_INTERNAL') || die();
require('../../config.php');
require_once('lib.php');
class shortcodes {
public static function expcontent($shortcode, $args) {
$expconfig = get_config('mod_expcontent');
$baseurl = $expconfig->baseurl;
if ($baseurl[-1] != "/") $baseurl += "/";
$ext = array_key_exists("ext", $args) ? "." . $args["ext"] : "";
return $baseurl . "meta_media/high/" . $args["id"] . $ext;
}
}