<?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;
    }

}

