phppluginsmoodlemoodle-apimoodle-theme

Create a pop up window after signing up for the first time in moodle


I am new to Moodle and I am trying to have a pop up window when an user logged in for the first time. I have created a custom plugin, in there I have made a custom page consist of a form. Is there any way that I can make that form page appear as a pop up after an user logged in for the first time? I am using Moodle version 3.11.7 and PHP 7.4.29. Any help with the Moodle development would be appreciated. Thanks.


Solution

  • Moodle 3+ has "User Tours" which will probably do what you need

    You can display a pop up after a user has logged in for the first time

    Go to Site Admin > Appearance > User Tours

    Create a new tour, for the URL to match use "FRONTPAGE" which will be the home page

    Save and then click on the name of the tour you just created

    On the next page, click "Next step"

    For "Target type" select "Middle of page"

    Then enter the title and content and save

    Then login as a different user and click on the home page to display the popup

    Detailed instructions are here : https://docs.moodle.org/311/en/User_tours

    There is also a Moodle video here : https://www.youtube.com/watch?v=hhLVvyP3DU0