Blocks: Featured Courses

block_featuredcourses
Maintained by Picture of Daniel Neis Araujo Daniel Neis Araujo
This blocks allow to select some courses to be displayed on front page. It is also possible to set sort order.
351 sites
364 downloads
33 fans

With this block you can select a set of courses to be displayed on frontpage.

For each course, the block will show it's name with a link to course page, it's summary and summary files.

The following steps should get you up and running:

  • DO NOT PANIC!

  • Put these files at moodle/blocks/featuredcourses/

  • Log in in your Moodle as Admin and got to admin/index

  • Follow the instructions to install the block

  • This block is only visible on site front page

  • To select featured courses, add the block to front page, got to edit settings, click on the link on the settings screen.

  • The order of the courses displayed by the block is defined by the "sortorder" field. It is an integer field that the records are ordered by.

Good luck!

Screenshots

Screenshot #0

Contributors

Picture of Daniel Neis Araujo
Daniel Neis Araujo (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of David Heuring
    Thu, 22 Feb 2018, 10:10 PM
    Hi Daniel,

    I selected one course and then in the sort order I put "1" (w/o the quotes). It doesn't accept this number. Can you tell me what I'm doing wrong? Moodle 3.4, Fordson Theme.
  • Picture of David Heuring
    Fri, 23 Feb 2018, 7:58 PM
    Me again. Disregard my comment above. It's working correctly. I guess I expected the edit page to close when I clicked Save. Since it doesn't, I thought it was not accepting the integer in the sort order box. After I went to the Home page, the Featured Course block was displaying correctly. Sorry for the bother!
  • Picture of Bert van der Hooft
    Wed, 28 Mar 2018, 7:03 PM
    In moodle 3.4.2 get an error in changing tot other role: Exception - Class 'coursecat_helper' not found.
    Could not report it in tracker. Gitlab.com gave an error "Minimum length is characters.", which is meaningless.
    Plugin uninstalled. Error disappeared.
    A pity, because this plugin is promising. Need to have it located on the central panel in Boost (home page and dashboard)


  • Picture of Daniel Neis Araujo
    Wed, 4 Apr 2018, 8:32 PM
    Hello, Bert

    Thank you for the report! I just made available here a new version that works on 3.4
    I moved the repository to gitlab: https://gitlab.com/danielneis/moodle-block_featuredcourses
    The issues on github may not work anymore as I have archived the repo there.
  • Picture of Michael Milette
    Wed, 25 Apr 2018, 8:50 PM
    Sorry, don't have an account on GitLab to report the issue. The following error occurs after I added Featured Courses to my dashboard and then try to view it as a student using Switch To...

    The block featuredcourses does not define the standard capability block/featuredcourses:myaddinstance
    line 595 of /blocks/moodleblock.class.php: call to debugging()
    line 567 of /blocks/moodleblock.class.php: call to block_base->has_add_block_capability()
    line 1389 of /lib/blocklib.php: call to block_base->user_can_addto()
    line 1369 of /lib/blocklib.php: call to block_manager->user_can_delete_block()
    line 248 of /blocks/moodleblock.class.php: call to block_manager->edit_controls()
    line 1210 of /lib/blocklib.php: call to block_base->get_content_for_output()
    line 1262 of /lib/blocklib.php: call to block_manager->create_block_contents()
    line 579 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
    line 186 of /theme/adaptable/layout/includes/header.php: call to core_renderer->standard_head_html()
    line 30 of /theme/adaptable/layout/dashboard.php: call to require_once()
    line 1261 of /lib/outputrenderers.php: call to include()
    line 1191 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 164 of /my/index.php: call to core_renderer->header()

    I am using the latest version of Featured Courses and Moodle 3.4.2+ downloaded and installed earlier today.
  • Picture of Michael Milette
    Wed, 25 Apr 2018, 8:54 PM
    One more thing. Block editing was turned on when the error occurred. The error doesn't appear with block editing turned off.
  • Picture of Daniel Neis Araujo
    Thu, 3 May 2018, 1:54 AM
    Hello, Michael

    thank you for the report! Just published a new version of the plugin that fix this warning.
  • Picture of Tony Montana
    Thu, 3 May 2018, 4:48 PM
    Instaled last version on Moodle 3.4.2+ and error:
    "Coding error detected, it must be fixed by a programmer: Cannot require a CSS file after has been printed."
  • Picture of Michael Milette
    Thu, 3 May 2018, 8:48 PM
    Daniel: Thank you very much. That took care of it.

    Tony: I haven't been able to reproduce the error you described on our Moodle 3.4.2+ with the latest plugin release. Comparing Daniel's code changes, there is nothing in the latest release that might cause the coding error you described. In fact, looking through the code, I didn't see anything that is requiring a CSS file at all. Can you provide Daniel with steps on how to reproduce the issue?
  • Picture of Phuong Hoang
    Mon, 21 May 2018, 4:09 PM
    Hi Daniel,
    Does it work on Moodle 3.5? It would be great if people could select courses to display either in front page or in dashboard or both.
  • Picture of Michael Milette
    Thu, 24 May 2018, 10:56 AM
    Hi Daniel,

    1) I can't seem to sort the order of the featured courses. I can change the numbers for the sort order but there doesn't seem to be any way to apply the settings. The only button on the page is not enabled unless you are adding a new course to featured.

    2) I created an account on GitLab however your project seems to be missing (or hidden) from your account. I get a 404 error when I try to access the project files and the bug tracker.

    3) If I choose to display the sessions on the site calendar, they just don't appear. This wasn't the case with a previous version and I can still change the dates on the old sessions to make them show up in the calendar again. Just can't add new ones.

    4) Would you happen to have some CSS handy to make sessions appear as seen in the screenshot for the Featured Courses plugin?

    4)
  • Picture of Michael Milette
    Thu, 24 May 2018, 11:49 AM
    Sorry, ignore #3 above. That one is for a different plugin.
  • Picture of Daniel Neis Araujo
    Wed, 30 May 2018, 2:45 AM
    Hello, Michael

    I fixed the visibility of the project on gitlab. Could you please try again and maybe submit a pull request to fix #1 ?

    Unfortunately, I don't have the CSS, it was from a client's website I can't remember de address. But the new Moodle Dashboard has something that looks like that with the images of the courses in 3.5 version. You could take a look there =)

    Best regards!
  • Picture of Daniel Neis Araujo
    Wed, 30 May 2018, 2:46 AM
    Hello, Phuong

    it may work on 3.5, I didn't test it yet. Could you please test and report for us if it is working?

    It would really be a nice feature if one could choose in which pages each course appear in. When I find some time to work on the plugin, I will consider it. In the mean time, consider sending a pull request =)

    Best regards!
  • Picture of Letícia Figueira
    Wed, 27 Jun 2018, 2:05 AM
    Hello!

    I installed the plugin (I'm using Moodle 3.5) and, after adding an instance of the block, I can't seem to find the option to include it on the frontpage (via admin/settings.php?section=frontpagesettings). There isn't any link to configure the block in admin/blocks as well. Where should I configure the block?
1 2
Please login to post comments