boost problem

boost problem

by Ángel Ayllón -
Number of replies: 2

Hi,

3 years ago we created a child theme based on boost to give corporate appearance to the UVa virtual campus. With version 3.2 we had no problem but when migrating this course to 3.6 we have a test that we could not solve.

The theme is completely 'responsive' and users have become accustomed to using the 'hamburger' button to navigate from the personal area to their courses. With version 3.6 there are now the concepts of courses "in progress", "futures", "past", etc. and that is the problem. In the core of moodle in the central area of ​​your personal area, users have a combo where they can select the status of the courses to be displayed but in the boost navigation menu there is no such configuration and only shows those in progress.

When we create the more than 7,000 virtual courses every summer we all create them with "themes" or "topics" format and 52 sections. The problem is when the teacher enters the configuration and changes it to weeks. Automatically (when recording) moodle calculates according to the weeks (it can be none or several) and calculates the end date of the course from the date of creation in August plus the number of weeks the course has. That's the problem. We have hundreds or thousands of courses where the end date is earlier than the current one and the boost theme does not show them as being "passed".

Users who do not know this problem call us continuously with "I do not see my courses" and we respond with the problem, something quite heavy due to the volume of calls and messages we received since the beginning of the course.

We have reviewed the programming of a child boost theme and searched in / themes and navigation files (user / lib.php, navigationlib.php, ...) to find the function that adds the course nodes in the boost menu but without to have found it. For us it is important to solve it to reduce the volume of support that is carrying us that would happen to reprogram where it corresponds so that it shows all the courses of the user (except the hidden ones to the students) or, at least the same that the user has selected in the core using the corresponding combo.

Any ideas? Has anyone encountered this problem?

thanks,

Average of ratings: -
In reply to Ángel Ayllón

Re: boost problem

by Mark Sharp -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Angel, you're describing a couple of issues there.

Converting from topics to weekly

If you can upgrade to Moodle 3.8, there is a new setting where you can turn off the calculation based on the number of sections

Topics to weekly

Course overview block

This has also caused us a lot of support calls "Where are my courses?"Again in Moodle 3.8 there are a couple of settings that will help mitigate the issue. Under Site administration -> Appearance -> Courses there are two new settings:

  • Grace period for future courses 
  • Grace period for past courses

This will classify future or past courses as In "progress" even if the start or end dates are before or after the current date. For example, if you set the Grace period of past courses to 14 days, and your course ends on January 31st, the course will still show as in progress until the 14th February.

The Course overview block is more dependent on the course dates being correct that the old overview block. If you find that it doesn't work for you, there are alternatives like the old course overview block, and filtered course list from the plugin repository on moodle.org.

In reply to Mark Sharp

Re: boost problem

by Ángel Ayllón -

Thank you but what you comment already exists in the current version 3.6 of our moodle. When we create courses, we do it with the format "topics" but the teachers change it to "weeks" and record moodle automatically calculates the field mdl_course.enddate since the teachers in general do not even know that there is that checkbox that you mention.

In the lib / navigation.lib file inside the load_course_enrolled () function that obtains the courses of a user and adds them as nodes to the "general course view" section and to the flatnav object (theme navigation block, not boost in particular) on lines 2988-2990 moodle classifies each course of the user as in progress or not and if it is not it does not add it to the flatnav object.

I have commented on the sentence "IF" of lines 2998 and 2990 and now it shows the courses that are not in progress within the "hamburger" menu of our theme based on boost.

The lines commented in bold:

   2984 // Go through the courses and see which ones we want to display in the flatnav.
   2985 foreach ($ courses as $ course) {
   2986 $ classify = course_classify_for_timeline ($ course);
   2987
   2988 // if ($ classify == COURSE_TIMELINE_INPROGRESS) {
   2989 $ flatnavcourses [$ course-> id] = $ course;
   2990 //}
   2991}
   2992

I do not like the solution because by definition I never change the core of moodle because the version and branch updates can give problems when executing "git merge" but I have not seen - nor I think you can - how to handle this problem through some CSS property of our preset boost theme file.