moodle-expcontent/classes/shortcodes.php
2022-09-07 14:04:43 +00:00

25 lines
528 B
PHP

<?php
namespace mod_expcontent;
defined('MOODLE_INTERNAL') || die();
require_once(__DIR__ . "/../lib.php");
class shortcodes {
public static function expcontent($shortcode, $args) {
$expconfig = get_config('mod_expcontent');
$baseurl = $expconfig->baseurl;
if ($baseurl[-1] != "/") $baseurl += "/";
$domain = trim(array_key_first($args));
$content = trim(array_key_last($args));
return $baseurl . "assets/domain/" . $domain . "/meta_media/high/" . $content;
}
}