General plugins (Local): CUL Course Visibility Update

local_culcourse_visibility
Maintained by Picture of Amanda Doughty Amanda Doughty
Scheduled task to update course visibility based on start and/or end date.
34 sites
25 downloads
10 fans

CUL Course Visibility local plugin

This plugin makes hidden courses visible when the course start date it reached. It also makes visible courses hidden when the course end date is reached. Both options can be enabled/disabled in theplugin settings. It runs daily as a scheduled task.

It will only make visible courses with a start date matching the current day.

Courses which have start dates older than the current date will not be updated.

It will only hide courses with a end date matching the current day.

Courses which have end dates older than the current date will not be updated.


Screenshots

Screenshot #0

Contributors

Picture of Amanda Doughty
Amanda Doughty (Lead maintainer)
Tim Gagen
Tim Gagen: Developer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Tomasz Muras
    Wed, 20 Jan 2016, 3:20 AM
    It's a very simple plugin - but it does what it says. There are no problems with the code - you may just want to fix 3 minor problems with phpdoc as reported by prechecker above, to keep it quiet!
    You can also bump supported version - I've tested it on Moodle 3.0 and it works OK.

    I recommend to go ahead and approve this plugin as it is.
  • Picture of David Mudrák
    Wed, 20 Jan 2016, 5:23 AM

    Thanks Amanda for sharing the plugin with the community, and thanks Tomek for providing the peer-review. I am happy to approve the plugin now. You are cleared to land, welcome to the Plugins directory!

  • Picture of Amanda Doughty
    Wed, 20 Jan 2016, 4:10 PM
    Thank you very much Tomasz and David. I shared it because someone asked for the functionality in the developer forum. I've already made the three prechecker changes and uploaded to github. I'll update the zip now.
  • Picture of David Mudrák
    Wed, 20 Jan 2016, 7:15 PM

    For the record, the said discussion is here: https://moodle.org/mod/forum/discuss.php?d=326061

  • Ricardo Caiado
    Fri, 4 Aug 2017, 1:32 AM
    Hi,

    How do I set up the end date?

    Do I have to config the "enrol plugin" instead of the "Course settings"?

    Ricardo
  • Picture of Amanda Doughty
    Fri, 4 Aug 2017, 4:23 PM
    It is based on the end date in the course settings: mdl_course.enddate. So it will make the course hidden on that date if you select that in the plugin settings. It does not work on a per user basis using enrollments.
  • Ricardo Caiado
    Fri, 4 Aug 2017, 8:16 PM
    Hi Amanda,

    This settings (mdl_course.enddate) is only available in "3.3". I'm using "3.1"

    Ricardo
  • Picture of Amanda Doughty
    Fri, 4 Aug 2017, 10:12 PM
    mdl_course.enddate can be set in the course settings in 3.1 and earlier: /course/edit.php?id=#
  • Picture of Márcio Lopes
    Mon, 16 Oct 2017, 9:51 PM
    Hi Amanda, I would like to know if this pluign hides courses from the current date.
  • Picture of Márcio Lopes
    Mon, 16 Oct 2017, 10:31 PM
    How do I access the plugin settings? Follow the image https://imgur.com/tyglRul
  • Picture of Amanda Doughty
    Wed, 18 Oct 2017, 8:43 PM
    /admin/settings.php?section=local_culcourse_visibility
  • Picture of Roland Sherwood
    Tue, 17 Apr 2018, 10:50 AM
    Hi Amanda. We just upgraded to the latest version of this plugin and (under Moodle 3.3.4) encountered the following error which prevented Moodle's cron from running:

    Fatal error: Class 'advanced_testcase' not found in /var/www/html/moodle/local/culcourse_visibility/classes/task/update_course_visibility.php on line 37

    We actually ended up having to uninstall the plugin in order to get cron running again. Please can I ask if you have any suggestions re. how to resolve this issue? Many thanks.
  • Picture of Amanda Doughty
    Wed, 18 Apr 2018, 2:57 PM
    Thanks for reporting this I'll check it out today
  • Picture of Amanda Doughty
    Wed, 18 Apr 2018, 6:52 PM
    I had overwritten the wrong file. Now fixed and new version uploaded.
  • Picture of Roland Sherwood
    Thu, 19 Apr 2018, 10:48 AM
    Many thanks Amanda.
1 2
Please login to post comments