Your Moodle version

Course formats: Single activity format

Maintained by Picture of Marina Glancy Marina Glancy
Allows to create course that consists of only one activity

Course format 'Single activity' allows to create a format that consists of only one
activity. Course view page is automatically redirected to this activity.
Type of activity is specified in course settings.

Single activity course format has it's own settings where manager can specify
the default activity type for the new courses.

Discussion on moodle forum


Picture of Marina Glancy
Marina Glancy (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Marina Glancy
    Mon, Dec 3, 2012, 10:26 AM
    moving here comment made by Tim Hunt in tracker issue

    Yay! it works, and the code is pretty good.

    Some code review comments.

    1. There are details that don't really work, including:

    "Display description on course page" setting,
    "Save and return to course" button.
    Having both the course name and the quiz name in the navigation bar.
    2. Surely, in settings.php, you should make a sub-class of admin_setting_configselect and override the load_choices() method so the choices are lazy-loaded. See admin_setting_configmultiselect_modules for an example of how to do this.

    3. Invalid get_string() identifier: 'sectionname' or component 'format_singleactivity'. Perhaps you are missing $string['sectionname'] = ''; in /fs1/www_root/tjh238/moodle_head/course/format/singleactivity/lang/en/format_singleactivity.php?

    I got that by creating a new course using Single activity format, and with activity type Quiz, then going to the course page.
  • Picture of Marina Glancy
    Mon, Dec 3, 2012, 10:32 AM
    1. yes but I can't modify edit module form sad
    "Having both the course name and the quiz name in the navigation bar." - this is the biggest problem that I see. I wil try to solve it but it still might not work for all module types unfortunately

    2. eh, i could. But why bother? I will have 20 lines of code instead of 3 and no performance increase.

    3. thanks, will fix that
  • Tim at Lone Pine Koala Sanctuary
    Wed, Dec 5, 2012, 4:06 PM
    1. If this was going to stay a contrib module, I would look at dealing with these using some display: none; rules in the CSS, but that would just be a dirty hack. If this is to go into core, then we really ought to do something better. Whatever fix we did for "Save and return to course" might also help subpage.

    2. The whole point of this is as a performance win. The admin tree appears on every page for admins. It is important that creating the an admin settings class requires 0 DB queries. That is why the load_choices lasy-loading was implemented. You must use it for this sort of thing.
  • Picture of Marina Glancy
    Tue, Jan 8, 2013, 1:27 PM
    New version 1.2 hides activity name from navigation tree and breadcrumb!
    Also as Tim suggested I hid some "back to course" buttons with CSS
  • Gareth J Barnard
    Wed, May 8, 2013, 3:50 AM
    Hi Marina,

    With version 2013010900 running on Moodle 2.4.3+ (Build: 20130502) version 2012120303.11 if you change to the format from an existing course which has lots of activities / resources in different sections and then back again you find that all of the 'activities / resources' have been placed in the first section (0 or 1 I think without having to rerun the destructive test). Please fix smile.


  • Picture of Marina Glancy
    Fri, May 17, 2013, 12:48 PM
    Gareth, I disagree. Chaning the course format may lead to irreversible results. Data (modules) is not lost, the format is changed
  • Gareth J Barnard
    Sun, May 19, 2013, 6:34 PM
    Dear Marina,

    Then perhaps we will have to agree on disagreeing. As I firmly believe that the principle of a course format is that it is there to present the course in a way that the user intends. That changing between them should not loose the intent of the sections that the activities / resources have been placed in even if they are not visible. In this way the user can tryout several different formats to see which one is the best for the particular educational situation. Even if they know what the format will do beforehand, users need to have form and function without fear of unintended consequences.


  • Picture of Marina Glancy
    Mon, Jun 24, 2013, 1:33 PM
    Versions 2.4.4 and 2.5.4 released. Fixed bugs with not working "turn editing mode on" link and not-correct capabilities check
  • Tim at Lone Pine Koala Sanctuary
    Wed, Sep 11, 2013, 11:42 PM
    Hi Marina. I am looking for a version of this plugin that is compatible with Moodle 2.5.2, and I was wondering if it was better to take the v2.5.2 tag from git, or the latest master. Which would you recommend? Thanks.
  • Picture of Luc Richard
    Fri, Jan 31, 2014, 10:30 PM
    We've been using this plugin for a while and it's great, but we noticed that it doesn't support autologin of guests, so we had to revert to the SCORM course format for many of our courses.
  • Picture of Renu Raj
    Sat, Feb 1, 2014, 1:22 AM
    That's cool. How I can use External Tool from this single Assignment Activity ? I need to pass the LTI Context to an external App when I select the External Tool from the Activity dropdown.
Please login to post comments