Activities: Subcourse

Maintained by Picture of David MudrákDavid Mudrák
Subcourse behaves as a graded activity. The grade for each student is automatically fetched from a final grade in another course. This allows course designers to organize the learning content into separate units.
1854 sites
102 fans
Current versions available: 9

Subcourse is an activity module that represents the final grade obtained in another course. This allows to create "meta-gradebook" in one course, where all final grades from other courses are aggregated.

  • Grades are fetched automatically or can be fetched manually any time.
  • The grade type and other grade item settings are copied from the original grade total item and can not be changed.
  • Subcourse can be automatically marked as a completed when the referenced course is completed.
  • If the final grade in the referenced course is hidden, the associated subcourse activity grade is hidden, too.

This allows to apply the concept of grades aggregation to a next level and aggregate grades across courses.

Diagram illustrating course final grades aggregated to a main course via the Subcourse instances


Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5
Screenshot #6


Picture of David Mudrák
David Mudrák (Lead maintainer)
Picture of Vadim Dvorovenko
Vadim Dvorovenko
Please login to view contributors details and/or to contact them

Comments RSS


  • Picture of David Mudrák
    Wed, Oct 7, 2020, 5:08 PM

    No, the plugin does not look after enrolment. And this is actually intentional feature, not a bug smile Please set up the enrolment in a way that fits your needs best. Some people do it manually, some use and there are event more ways to control it.

  • Picture of Phil Vincent
    Mon, Nov 16, 2020, 9:59 PM
    Hi David, does this work in the opposite way to that show in the diagram too? If I have one course, which I would like to act as the sub-course to several others, would that work? So students would have to complete the sub-course before being able to progress in the others?
  • Picture of David Mudrák
    Tue, Nov 17, 2020, 1:35 AM

    Hello Phil. Thanks for the good question! The Subcourse module does one thing and tries to do it well. The use case you describe seems like something that e.g. could provide.

  • Picture of Stephanie Worden
    Wed, Dec 9, 2020, 2:09 AM
    Because it behaves as a graded activity, can the subcourse activity be used as an activity for completion? So, if this subcourse activity is marked as complete, it would unlock the first module in the course?
  • Picture of David Mudrák
    Wed, Dec 9, 2020, 5:22 AM

    Hello Stephanie. Yes. The relevant part of the form is actually shown on one of the screenshots here. The primary use case is that the Subcourse activity becomes completed once the associated course is completed. So once the relevant course is completed, it can unlock other modules in the "parent" course, for example.

  • Picture of Stephanie Worden
    Fri, Dec 11, 2020, 12:18 AM
    David - thank you. I missed that.
  • Picture of Laurent FALLOT
    Thu, Jan 14, 2021, 2:03 AM
    Hi David, This plugin seems to fulfill my attempts but i've some problems with it. I'm using the last version of Moodle (3.10)

    When i try to add a subcourse activity in a course I obtain an empty page. In debugging mode, I obtain :
    Warning: require_once(D:\Bitnami\moodle-latest-310\moodle/lib/coursecatlib.php): failed to open stream: No such file or directory in D:\Bitnami\moodle-latest-310\moodle\mod\subcourse\mod_form.php on line 30

    Fatal error: require_once(): Failed opening required 'D:\Bitnami\moodle-latest-310\moodle/lib/coursecatlib.php' (include_path='D:\Bitnami\moodle-latest-310\moodle/lib/pear;.;C:\php\pear') in D:\Bitnami\moodle-latest-310\moodle\mod\subcourse\mod_form.php on line 30

    D:\Bitnami\moodle-latest-310\moodle is the root of my Moodle installation.
    Did i forgot to install another required plugin ?
  • Picture of Laurent FALLOT
    Thu, Jan 14, 2021, 6:47 PM

    finally i found a solution. This problem is related to the deprecation of the coursecatlib.php file. One more problem raises after : coursecat is deprecated also.

    The solution I applied consists in editing file /mod/subcourse/mod_form.php :
    comment out or suppress line 30
    replace coursecat by core_course_category

    This patch seems to be sufficient. Every thing seems to work for me now.
  • Picture of David Mudrák
    Thu, Jan 14, 2021, 7:17 PM

    @Laurent - what version of the module do you have installed? That has been actually addressed two years ago in

  • Picture of Laurent FALLOT
    Thu, Jan 14, 2021, 8:38 PM
    I installed version 9.0.1. The last one in the Moodle plugins list
    Oops.... I see in my instance subcourse version 5.0.1. I uninstalled the plugin and reinstalled it via the "Install now" choosing 9.0.1 in Moodle plugins List. It's 5.0.1 that get installed. If i choose to install it via a download of the zip file, i get 9.0.1.
    An issue on the Install Now process ?
    I didn't have this problem with other plugins i installed this way.
  • Picture of David Mudrák
    Thu, Jan 14, 2021, 10:15 PM

    It could be. When you press "Install now" you should be taken to "My sites" page. What is the Moodle version specified there for your site?

  • Picture of Laurent FALLOT
    Thu, Jan 14, 2021, 11:02 PM
    It says 3.1. I changed it to 3.10 and it seems to be correct now. This was the problem i suppose. Ty very much a very sorry to have taken so much of your time.
  • Picture of David Mudrák
    Fri, Jan 15, 2021, 12:18 AM

    Actually, this illustrates a likely bug in the Moodle / Plugins directory integration. The version number can get easily outdated, and it should not lead to cases like this. May I ask you to report it as a new issue at, project MDLSITE, component "" please. Thanks!

  • Picture of Laurent FALLOT
    Fri, Jan 15, 2021, 11:59 PM
    Grrr, I posted it in the wrong Component : MDLNET ticket MDLNET 545. I don't see any way to either remove it or move it to the right project. I've to wait for a new post now.
  • Picture of David Mudrák
    Sat, Jan 16, 2021, 12:05 AM

    No worries, I was able to move it. Thank you for your report.

Please login to post comments