Courses and section got hidden after update

Courses and section got hidden after update

by Muhammad Omer Saleem -
Number of replies: 22

After upgrading to 3.11.5+ to courses and section all got hidden from students? 

What could be the issue and could any one please tell me how I can make them show all the courses and sections at once.

Please help.

Thank

Average of ratings: -
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

As per your PM request ...

Have never had that happen on any upgrade to a moodle site, however, a guess ... a 'hickup' in Student role permissions?

Site administration
Users
Permissions
Define roles

Student

Set filter to view

All of those listed should be set to Allow.

The moodle version you upgraded from was?

Did that old version have any modifications to student roles?

Have you check server error logs or turned on debugging?

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
I am also unable to understand what had happened sad
upgraded from 3.11.2 to 3.11.5+
Course sections is still hidden after allowing all .
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
And you can't just set the Category/Courses to Show in the Category/Course settings?  Some screenshots would be helpful..
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
I can set Course/Category to show from hide manually one by one. But there are a lot of courses with many sections. sad
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

+1 for Emma's request for screen shots!!!

Another thought ... did you use custom section headings and then not put any value in the section title? or any special language characters in the custom section title?

What does the following mysql query of mdl_course_sections table look like:

select course,section,name from mdl_course_sections;

Does the name column show NULL or 'something other'?   Interested in 'something other' really.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Once again +1 to Emma's request for screen shots!!!

And yet 2 more thoughts ...

What language packs do you have installed?
/admin/tool/langimport/index.php

Also, have you purged caches?
/admin/purgecaches.php
Purge All caches button

'SoS', Ken

In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
So the sections inside the courses are also hidden? Just from an upgrade?
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Could not tell you why it happened!   Not sure anyone could ... however ..

In admin scheduled task
look for task related to completion:
Completion mark as started \core\task\completion_daily_task
Calculate regular completion data \core\task\completion_regular_task

If you have the path to php-cli set in your moodle, there will be a 'run now' under
those task and one can run then individually.

Successful 'run now' of the 2nd above should show something like:

Calculate regular completion data

Execute scheduled task: Calculate regular completion data (core\task\completion_regular_task)
... started 11:47:16. Current memory use 14.1MB.
Running completion_criteria_date->cron()
Running completion_criteria_activity->cron()
Running completion_criteria_duration->cron()
Running completion_criteria_grade->cron()
Running completion_criteria_course->cron()
Aggregating completions
... used 6 dbqueries
... used 0.066486835479736 seconds
Scheduled task complete: Calculate regular completion data (core\task\completion_regular_task)

The above is just a part of overall cron job.   Cron job running frequently enough and running ok?

'SoS', Ken

In reply to Ken Task

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
One more issue which we are facing is that activities and contents of all the other sections are mixed into the first section.
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Let us know details about the upgrade - I am starting to suspect that you maybe did not get all the plugins moved across before you upgraded - a missing course format might be the cause of the above issue....do you have a backup you can roll back to?
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
Yesss the issue was about the course
Thanks all for your reply the issue was that the procedure we followed for updating the moodle was following
Copied config.php from old to new
Copied themes folder from old to new
Copied plugins folder from old to new
BUTTT
What How we restored is that
Now we have copied the above files and folders and with that also we have copied the plugins and files which were showing that are missing from disk from old to new .
Thank you all.
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Congrats on solving!   Suggestions made by Emma weren't checked. And I, unfortunately, took you down some rabbit holes! sad

Am an advocate for using git to install/update/upgrade moodle core code.
Since it appears you do have command line access to your server, might want
to investigate using git:
https://docs.moodle.org/311/en/Git_for_Administrators

Major reason ... no copy back into new code.   Code stays where it's located
and git pulls in new core files/folders.   Less prone to human error/forgetfullness.

Your site, BTW, is already behind a point release of 3.11.x ... highest is now
3.11.6+.

Using Git makes that very trivial.

This thread also indicates an addition would be nice for updating/upgrading ... process now does check environment, but it does not check for missing plugins.  Had the checks done so, OP could find the missing plugin directories, copied them into new, and upgraded without issue.   Still though, git would have been the best method.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Excellent - love it when we can figure it out!!

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe we could convince the OP that git will avoid this situation if you too/also would recommend usage of git for updates and upgrades? smile

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Lol, Ken, I do love git!! And definitely recommend it - saves soooooo much time!
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe, in the future ... moodle downloads of zip/gz's will include the hidden .git directory for that version and the other hidden .git- files.

That way, OP deciding that git is indeed a 'better way' - no 'side load' or other 'copying' would be needed.   Just a few git commands to check then run.

BTW, even users of cPanel (other panels) that have terminal icon can use git for Moodle - have observed that certain versions of cPanel also have a git GUI thus /usr/bin/git is present.

Unfortunately, cPanel, does not have any tool to run the scripts a user creates.  That to say the very low end/cheap shared hosting setups, won't ever have the ability to use git for installing/maintaining a moodle ... and our 'friends' at Softac will continue to cause folks grief on updates/upgrades on such systems. sad

'Soap box' and my 2 'sense' ... (nope, spelled it right!) smile

'SoS', Ken


Average of ratings: Useful (1)
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
Previously we were only doing the above three steps and then installing the missing plugins from Moodle plugins site but how we overcome is that we haven't installed any new plugin from site just copy and paste the complete folder of all missing plugin from old to new.
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Yes, if you do this (until you start using git - ; ) ), you can then update them through the gui all at once.
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Courses and section got hidden after update

by Muhammad Omer Saleem -
The fix we have done is on a local machine by using the old version of moodle and repeating the updating steps.
Just a last question that now as we have missed plugin and now section data gets mixed and the database has been updated. So is there any way we can use the same database and restore the course contents as they were before?
In reply to Muhammad Omer Saleem

Re: Courses and section got hidden after update

by Ken Task -
Picture of Particularly helpful Moodlers

Since DB has been altered would think the best/safest/only choice one has now is to restore the DB backup you made prior to the attempted upgrade without the missing course format plugin, and with the new code + all the addons + the format plugin in new code, then run upgrade again so DB gets updated properly this time.

'SoS', Ken