Missing Course Admin Options - Moodle 3.11.6+

Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Number of replies: 20

Hi All,

Very odd problem with a number of sites.  I've been away for two weeks and I come back to Moodle sites which have "lost" the course admin options which allow for student enrolment (amongst other things - course settings, course completions etc).

Using a plain Boost theme the cog I expect is missing from above the "Turn Editing On" button:

Using a plain Classic theme the options are still not there:


Have I missed something vital?   Where have they gone please?

Thanks

Dave

Average of ratings: -
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Has anyone any ideas with this as it is really frustrating - we cannot even change the enrolment to allow users on courses.
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

After logging on as an Admin user, navigate to course, then look for a 'Gear' icon, upper right of course screen.   In drop down of 'gear' choose 'more' and then click the 'users' tab - Enrollments.

If you don't see the enrollment method you've setup, then:

Manage enrol plugins
 Site administration -> Plugins -> Enrolments -> Manage enrol plugins

'Who moved my cheese!!!!'

'SoS', Ken

 


In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -

Further to this, if I yuse the HTML inspector I see this on the page that doesn't show the editing cog:

The page where the admin cog shows is the code is:

The obvious thing that is different is the ID="Yui....... within the divs and the absence of the context-header-sensitive-menu which is completely absent.

How is it possible to lose this please?

Many Thanks

Dave


In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Try purging all caches.

Check all the page's resources are all being loaded with status 200 OK using your browser's developer tools (e.g. Network Monitor in Firefox)

Check there are no errors in the browser's console (e.g. Web Console in Firefox).

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Leon, Thanks for the reply.

Caches purged,
Network Monitor in FireFox says (in green) 200 for all the statuses,

Console says:
Navigated to <<>>/course/view.php?id=2
moodle-core-event: Global event published: FORM_ERROR yui_combo.php:5828:31
moodle-core-event: Global event published: BLOCK_CONTENT_UPDATED yui_combo.php:5828:31
Starting Moodle session timeout warning. first.js:483:3349

Unsure what this last one means.

Cheers

Dave
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The last three lines look correct, I get almost exactly the same on my 3.11 site (one line number is different). I don't get the Navigated to <<>>/course/view.php?id=2 but it doesn't jump out as any sort of error.

The next thing to check is whether permissions could have changed. Is this problem being seen as a site admin? Are any other roles seeing this problem?

Also: … and I come back to Moodle sites which have "lost" the course admin options – "sites" plural? That sounds very odd. How many sites? What's the common denominator between them? Are they on the same server? Do they have the same admins making changes? Are they all the same Moodle version?

In reply to Leon Stringer

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Leon, Thanks.

Sites plural - testing site on my internal server where the company admins have no access and the production site. The only commonality is the courses - backed up from production and pushed to testing. Same Moodle versions different admins.

Problem occurs for Site Admin.

Cheers
Dave
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Via command line, in code/admin/cli/
php cfg.php |grep yui

Should show:
useexternalyui    0
yuicomboloading    1
yui2version    2.9.0
yui3version    3.17.2
yuipatchlevel    0

In GUI Admin,
Site administration -> Appearance -> AJAX and Javascript

Default settings:
Use online YUI libraries - no check
YUI combo loading - checked
Cache Javascript - checked.

Do read the comments under each.

Comment:

https://clarle.github.io/yui3/

IMPORTANT: The YUI library is no longer actively maintained. Please see this announcement for more information.

But, can your server reach/see the lib.   Test with curl:

curl -I http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js

I see in output that appears to be on Amazon.

'SoS', Ken


In reply to Ken Task

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Ken, I'm not entirely sure what YUI is or does but I do understand it is gradually being removed. It's interesting that the pages where it doesn't show it's missing.

  1. Using - php cfg.php |grep yui I get the same output as you.
  2. Ajax and javascript - settings are as the default.
  3. curl -I http://yui.yahooapis.com/3.17.2/build/yui/yui-min.js - gives an output with lots of meta data.
I'm unsure what this tells us, if anything.

Best Regards

Dave


In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Gradual removal - that was my understanding as well.

1 - showed related config settings - php script db query ... no web service involved.

3 - made sure your server could get to/see the Yahoo API's boxen.  Note the URL was http ... and not https.

Purging caches ... there's the GUI way and then there is the CLI way.

Try the CLI way.

Ran into something similar a couple of years ago ... combo loading didn't seem to work ... found the specific URL's to the YUI libs and did wget's to each one ... 1 called 2 and 2 called 3.   After I did that, things worked, but have no idea as to why!!!! sad

'SoS', Ken



Average of ratings: Useful (1)
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... in moodledata/localcache/js/ is where one finds references to YUI.

cd /path/to/moodledata/localcache/js/

fgrep 'yui' *

Manually removing all that is contained in that directory should repopulate when it's needed.    Just tested with a sandbox 3.11.highest and had no issues editing in a course.

Fingers X'd!

'SoS', Ken

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

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Ken, Tried that but to no avail.

Just a thought; and I'm grasping at straws here - can SCORM packages interfere with CSS?

Cheers
Dave
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe not grabbing at straws ... SCORM's send to client a mini-app that is run on their end.  How are they launched?  New window or in frame leaving moodle nav available?  

While they are using, you'll see 'checknet' references in your server logs so Moodle won't kick them out due to session time out.    Users could have ability to stop where they want and return to that place on next session.   Do know when they finally finish the SCORM, there is an exchange of data to indicate done, did this, this and this in it.   That data could be a bunch and has been the source of issues ... too large a SCORM, etc.

There has been talk about supports for version of SCORM as well.   Even recommendations to use something newer ... like H5P now.

Sorry - no real definitive answer! :|

'SoS', Ken

In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

What theme are you using?

You say you are expecting a Course Admin Menu to appear in left column of a course with editing turned on.   Right?

Do you have a 'gear' icon - upper right corner?

Looks like:


and clicking "More' does show 'more' course admin related links.

'SoS', Ken


In reply to Ken Task

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Ken, Using theme Boost and that's the problem - the missing cog section. In my OP you can see a screenshot of where the missing cog should be. I also tried in Classic and it isn't there either.

The actual production site uses Adaptable with the same issue.

Cheers

Dave
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Issue appears to be ability of site to pull in yui_combo.

What if one added:

$CFG->yuicomboloading='0';

to config file.

Normally, one doesn't have to restart web service, but in this case re-start your LiteSpeed service.

Also, LS offers a cache plugin ... you are not using that are ya?

'SoS', Ken


In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

And a follow up ... login as admin level user, then see if you can go directly to:

/course/admin.php?courseid=5

using browser.

where number above is an existing course ID number.

Course format is?

'SoS', Ken

In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

There is a 3.11.7+ out now.   May as well keep current!   Update test server first.

And, have sluethed (maybe incorrectly) that you sites run LiteSpeed (LS).   LS does have and supposedly compat with mod_security (a Web Application Firewall) from what I read ... might be incorrect sharing this:

https://docs.litespeedtech.com/lsws/cp/cpanel/mod_security/

Thing about what is reported ... happens on your test server as well as production using a different (supported?) theme.   The only thing that would be common to both setups, something in LS like mod_security.

Sooooo ... check server's mod_security logs to see if there is not some rule tripped falsely!

'SoS', Ken


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

Re: Missing Course Admin Options - Moodle 3.11.6+

by Dave Emsley -
Hi Ken, Thanks for this. Sorry for the delay.

The issue is with a client's website rather than mine. And I still haven't resolved the issue.

Cheers

Dave
In reply to Dave Emsley

Re: Missing Course Admin Options - Moodle 3.11.6+

by Ken Task -
Picture of Particularly helpful Moodlers

Am out of guesses!!!   Maybe sharing a lot more info about client's server is in order ... not a link to it, but just about everything else!

Plus, inspection of all web service/server security logs.  Firewall?  Cloudflare?

Could begin with at least disclosing where this server is hosted.  It's OS. and config since you mentioned multiple sites.

You could PM me that info if not comfortable posting in public forums.

'SoS', Ken

Average of ratings: Useful (1)