public static function fetch_flashcards_revealjs($cardset, $cardsetname)
 {
     global $CFG, $COURSE, $PAGE;
     //this won't work in a quiz, and throws an error about trying to add to page head,
     //when page head has already been output. So copy contents of this file to styles.css in poodllfilter
     //$PAGE->requires->css(new \moodle_url($CFG->wwwroot . '/filter/poodll/reveal.js/css/reveal.min.css'));
     //JS
     $PAGE->requires->js(new \moodle_url($CFG->wwwroot . '/filter/poodll/reveal.js/lib/js/head.min.js'));
     //$PAGE->requires->js(new \moodle_url($CFG->wwwroot . '/filter/poodll/reveal.js/js/reveal.js'));
     //$PAGE->requires->js_init_call('M.filter_poodll.init_revealjs');
     //for AMD
     $proparray = array();
     $proparray['CSS_INJECT'] = true;
     $proparray['CSS_REVEAL'] = $CFG->wwwroot . '/filter/poodll/reveal.js/css/reveal.css';
     $proparray['CSS_THEME'] = '';
     //$CFG->wwwroot . '/filter/poodll/reveal.js/css/theme/sky.css';
     $PAGE->requires->js_call_amd('filter_poodll/reveal_amd', 'loadrevealjs', array($proparray));
     $dm = new \filter_poodll\dataset_manager();
     $renderer = $PAGE->get_renderer('filter_poodll');
     $carddata = $dm->fetch_revealjs_flashcards($cardset, $cardsetname);
     echo $renderer->fetch_revealjs_flashcards($carddata);
 }
// the id of the course
$moduleid = optional_param('moduleid', 0, PARAM_INT);
// the id of the module
$hash = optional_param('hash', "", PARAM_TEXT);
// file or dir hash
$requestid = optional_param('requestid', "", PARAM_TEXT);
// file or dir hash
$paramone = optional_param('paramone', "", PARAM_TEXT);
// nature of value depends on datatype, maybe path
$paramtwo = optional_param('paramtwo', "", PARAM_TEXT);
// nature of value depends on datatype, maybe protocol
$paramthree = optional_param('paramthree', "", PARAM_TEXT);
// nature of value depends on datatype, maybe filearea
$paramfour = optional_param('paramfour', "", PARAM_TEXT);
// nature of value depends on datatype, maybe filearea
$dm = new \filter_poodll\dataset_manager();
switch ($datatype) {
    case "xmlpairs":
        header("Content-type: text/xml");
        echo "<?xml version=\"1.0\"?>\n";
        $returnxml = $dm->fetch_xmlpairs($courseid);
        break;
    case "unassignedusers":
        header("Content-type: text/xml");
        echo "<?xml version=\"1.0\"?>\n";
        $returnxml = $dm->fetch_unassigned_users(5, $courseid, null);
        break;
    case "offlineusers":
        header("Content-type: text/xml");
        echo "<?xml version=\"1.0\"?>\n";
        $returnxml = "";