Pop up activities format

Pop up activities format

by Daniel Thies -
Number of replies: 28
Picture of Core developers Picture of Plugin developers Picture of Testers

The Pop up activities course format displays resources and simple activities embedded in modals instead of redirecting from the course page.

If you are not using heavy server side assessment, but mostly resources and client side activities (SCORM, H5P), this format may help provide more interactive courses by opening the activities in popup modals instead of separate web pages. When students finish an activity or resource, they return to the course page by closing the modal without waiting for the course page to load again.

There is a sample demo showing what it does available at https://openlearner.org/popups. The format itself is available at https://github.com/dthies/moodle-format_popups.
Average of ratings: Useful (2)
In reply to Daniel Thies

Re: Pop up activities format

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Many thanks Daniel for sharing yet another useful plugin with the Moodle community. I found the idea very nice and useful for certain types of courses. Well done on the overall design and implementation.

Happy to have the plugin approved at https://moodle.org/plugins/format_popups now.

In reply to Daniel Thies

Re: Pop up activities format

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
Really nice! Thanks!

Is it a choice option now for any resource/activity to either be displayed as popup or as page? I'm interested in this. The screenshot provided did not yet show how to set it up for an activity or resource.
In reply to Richard van Iwaarden

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Yes, there is a capability 'format/popups:view' that defaults to allow for students. You can edit permissions on the module context to disallow view as a modal. Teachers only see modal if they are also enrolled as student or switch role to student. You can also right click, open in new tab if you want to avoid the modal.
In reply to Daniel Thies

Re: Pop up activities format

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I don't really mean 'capability'.

What I meant: is the option one of these in the pulldown menu?


In reply to Richard van Iwaarden

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
I agree it should respect that setting, but have not implemented that yet. A potential problem is that drop down is available on some module type and not on others. Changing the capability works regardless of type.

I will try to fix that when I have some spare time.
In reply to Richard van Iwaarden

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hello Richard,

What would you actually expect? It is not obvious to me on which settings to override the default behaviour. For Files and URLS the available options are Automatic, Embed, Open, In Popup, In Frame, and New Window. The safest may be to display the modal only with Automatic which is the default and allow the user to use the other options if desired. SCORM has only two options.
In reply to Daniel Thies

Re: Pop up activities format

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
You are right, this setting is not for every activity or resource. I guess I think what you made is fine like it is then smile
Average of ratings: Useful (1)
In reply to Daniel Thies

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

The first stable release of Pop up activities course format is now available in the plugins database. It may be installed on Moodle 3.9+ sites. It seems to work well on 3.9, but has not been extensively tested and any 3.9 only bugs may not be fixed in the future.

Some small bugs were fixed from the beta release. It now works for a teacher while editing if the teacher has the capability. Support for the Video Time module has also been added.

Average of ratings: Useful (1)
In reply to Daniel Thies

Re: Pop up activities format

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hello Daniel and thanks for this nice plugin, which, if you don't mind, I would like to do a short blog about on moodle.com for our regular monthly plugins blog posts. I'm pleased to see it has the 3.11 Early bird badge although I did notice one small thing, which is that completion conditions do not show inside the pop up -which means that you must always show them on the course page. But I accept that might be a limitation of the popups, so no worries smile
Average of ratings: Useful (1)
In reply to Mary Cooch

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

Thank you Mary,

I had not noticed that setting yet. I do intend to support the newest features with this. I also had a request to add navigation to the next activity when complete. Maybe an icon in the title bar or drop down menu would save some space. I think there are a possibilities for new features to be added yet.

I would be happy to have the blog article. Let me know how I can help.

Daniel

In reply to Mary Cooch

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

I began to implement the display of the completion info in the modal. However, it does not make sense to show the information both in the modal and on the course page since both are visible an the same time so that the would be redundant. Possibly worse the information may be conflicting because if view module condition is set it will be updated in the modal when the modal opens, but on the page only after it closes.

It seems to make more sense to show info in the modal only if it does not appear on the page. However, I do not know if that would be confusing to users. I would be happy to hear if anybody familiar with the feature has thoughts on  watch should be done.

In reply to Daniel Thies

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers

The popup activity format is now updated to show activity information in the popup if the course is set to not show it on the course page itself. This is especially important in the case of manual completion which would be impossible to use without the information displayed on the course page.

Thank you Mary for pointing this out and writing the nice blog.

Average of ratings: Useful (1)
In reply to Daniel Thies

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
This plugin has been updated to improve handling of SCORM. It now longer skips the start form so that you can start new attempts. If the show in new window option is selected, it will open a new browser window and close the modal after the enter button is checked. I think this makes sense as far a accessibility, but would be interested anyone thinks the behavior could be improved.
In reply to Daniel Thies

Re: Pop up activities format

by Ly Green -
Someone knows how to add a plugin (pop-up), if my version of moodle does not seem to allow anything to be installed.
Version 3.11.1 School
no plugin install option
In reply to Ly Green

Re: Pop up activities format

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
When you say "School" do you mean a Moodle School site from MoodleCloud? As explained in their FAQ, it is not possible to install plugins unfortunately.
In reply to Daniel Thies

Re: Pop up activities format

by Peter Huppertz -

Thanks @Daniel for this very useful plugin which from my point of view can improve the modern and up-to-date look of your moodle site.

I wonder if it would be possible to display the footer including the links to previous and next activity as well as the jump to select box inside of the popup. Happy to help with the implementation and testing if you think it's doable and can point me to where to start.

In reply to Peter Huppertz

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Peter,

I am glad you found it useful. Thank you for your idea. Adding the navigation is a one line fix which you can test with https://github.com/dthies/moodle-format_popups/tree/issue9 or on my demo site now. The previous and next button work for opening the appropriate in a popup. The menu does not open in a popup, but in a standard page. That could be changed with javascript, but I do not know whether it is useful since users could more easily close the modal and find the activity on the course page. It might be better just to hide that.

There should also be a setting either at site or course to enable this feature. The main idea of the format is aid random navigation from the course page. Adding sequential navigation elements may violate that spirit. There potential problems if conditional activities are used. The next activity may be incorrect if the modal action changes completion. That will not be shown immediately in the modal navigation.
In reply to Daniel Thies

Re: Pop up activities format

by Peter Huppertz -
Thanks, this is great.
I understand your point. I love that it feels more lightweight than loading a new site and also more "how websites work these days". Sequential navigation I found useful, no need for the menu. I will give it a try.
Average of ratings: Useful (1)
In reply to Daniel Thies

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
A new release 1.0.9 is available with a setting available to add navigation links at the bottom of the modal. The teacher can enable and disable the behavior in the course settings, and the admin can set default in site settings.
Average of ratings: Useful (1)
In reply to Daniel Thies

Pop up activities format update for 4.0

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
There is an updated version of Pop up activities for Moodle 4.0 format available now, but there is a liitle room for improvement. Currently links in the new course index are opened in the traditional way rather that in a modal. This makes some sense since the course index appears on course module pages as well as the course page, and it would not make sense for the popup to appear above an activity.

It seems like it would make more sense to disable the course index for this format so that it does not show. The format would then behave consistent with the way it works in 3.x. I am still getting to use to the course index, and I am curious know what others might expect.
In reply to Daniel Thies

Re: Pop up activities format update for 4.0

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
I just updated the Moodle 4.0 version of the plugin. I like the new course index, but I decided that it duplicates some of the functionality of this format i.e. both provide easy access to the activities in the form of a list. So it seems reasonable to remove the course index from the format. I added a setting so that the site admins can enable it if they think think it makes sense in their context.
In reply to Daniel Thies

Re: Pop up activities format update for 4.0

by Tzvi Melamed -

hi Daniel,

I'm a teacher in a college using Moodle, rather than a Moodle admin.

 I hope your plugin can be used for the following use-case:  we are using Moodle tests, and there is a time limit, with a rectangular clock showing the time left till the time is over.  However, sometime students forget to notice that the time has passed.  I would like a pop up to remind the student 3 and 10 minutes before the time is over.  

Can this be set on our site using the plugin which you created?

thanks, 

Tzvi Melamed

In reply to Daniel Thies

Re: Pop up activities format

by enas mohamed -

Hi , 


I want to use the pop up activity with a scorm package , but when I close the popup window the  scorm which has video in side it , plays in the background , How can I solve this problem .

Thank you so much

In reply to enas mohamed

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi enas,

I have updated the plugin again and the latest version should fix this. The content should now be unloaded when the modal is shut.
In reply to Daniel Thies

Re: Pop up activities format

by Frédérique Celliès -
Hi, I have a problem, H5P doesn't load the popup (with a quiz) sad
Is it a problem with the last version of H5P V4 ?

And could you explain this part of your description "Developers should be able to add similar functionality to other formats by copying the AMD call in format.php and adding this format as a dependency." 
Have you an example ? 

Many Thanks
In reply to Frédérique Celliès

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hello Frédérique,

Do you mean an H5P Question Set? or a Moodle quiz activity with an H5P in it. This format does not support popups for Moodle Quiz because of the complexity are security concerns with Quiz. I have not had any issue with Question Set using the format before. As long as it works with the H5P Activity itt should also work with this format.

The are some more instructions in the comments of the file for developers. The javascript loaded in this format is written to be reusable in other formats. Although in some formats it may not make sense to do so. I do know that the Designer course format does use it to provide popups as an option for example.
In reply to Daniel Thies

Re: Pop up activities format

by Daniel Thies -
Picture of Core developers Picture of Plugin developers Picture of Testers
The most recent versions now have support with Deft response block to provide real time updates to the course page. When enabled the course page contents will update completion or other information in the background while the user still has a popup open.
Average of ratings: Useful (1)