General developer forum

Module output into a popup - Moodle 3.3+

 
Picture of Dave Emsley
Module output into a popup - Moodle 3.3+
Particularly helpful Moodlers

Hi there,

I've created an activity module which basically displays a bit of php code.  However I cannot get it to appear in a popup.

I've configured it to.  I've got the right code (I think) and it uses the popup layout froim the theme but it doesn't actually pop up.

if ($presentation->display == RESOURCELIB_DISPLAY_POPUP) {
//was if ($inpopup and $presentation->display == RESOURCELIB_DISPLAY_POPUP) {
    $PAGE->set_url('/mod/presentationupload/view.php', array('id' => $cm->id, 'inpopup'=>1));
    $PAGE->set_pagelayout('popup');
    $PAGE->set_title($course->shortname.': '.$presentation->name);
    $PAGE->set_heading($course->fullname);
} else {
    $PAGE->set_url('/mod/presentationupload/view.php', array('id' => $cm->id));
    $PAGE->set_title($course->shortname.': '.$presentation->name);
    $PAGE->set_heading($course->fullname);
}

If anyone could suggest what I need to do or where to start looking I'd be grateful.


Thanks in Advance


Dave

 
Average of ratings: -