Disabled category

Disabled category

by Matthew Landseadel -
Number of replies: 10

I'm a Moodle newbie, but I'm in a situation where I'm the admin for our org's educational outreach. Our site is https://www.hfalearning.org/ and we're running Moodle 3.3.3 (Build: 20171113)

We contracted with a company to create our content. They did so and lobbed the code/content over to me with NO delivery instructions. We did not pay for a support contract and they're being frustratingly unhelpful. Anyway, I was able to install Moodle and get their content loaded in.  It's working. I think all is well, for the most part.

My current dilemma is a disabled category. When a user logs in, they are taken to the front page where they see a list of categories. The first category is live and is linked and fine.  The second category showing is disabled.  I want to enable it.  I cannot figure out how though.  The courses are loaded:

https://www.hfalearning.org/course/view.php?id=4  I just can't seem to get that category listing to show both categories as enabled. 

I'm sure this is something silly. The course start dates are past. There are no end dates. They are marked as visible. I just don't get where this is coming from. If I look at the resulting HTML, I literally see the second category's href tag has a disabled class set on it. 


Average of ratings: -
In reply to Matthew Landseadel

Re: Disabled category

by Ken Task -
Picture of Particularly helpful Moodlers

As admin level user
Site Admin menu
Courses
Manage courses and categories

Locate the category and see if the 'eye icon' is closed or open.
If closed, click the icon.  That should change it to open.

Category should now be visiable.

There's a DB way to do the same thing, but one would have to have phpmyadmin or moodle adminer, go to related tables and set visible column to 1 ... meaning visiable.

'spirit of sharing', Ken


In reply to Ken Task

Re: Disabled category

by Matthew Landseadel -

Thanks Ken. The thing is, the eye is open for categories, courses, topics, etc. Here are screenshots. I'm really confused on this though.

Attachment category1.jpg
Attachment category2.jpg
In reply to Matthew Landseadel

Re: Disabled category

by Ken Task -
Picture of Particularly helpful Moodlers

Time to dig into DB ...

Using mysql client on server and as a user that has super priv's at the mysql> prompt:

use [dbname]; (where [dbname] is the database for your moodle)

Query:

select id,fullname,shortname,visible,category from mdl_course where visible = '0';

will show all courses whose visibility is set to 0 ... closed eye.

for course categories table

select id,name,description,visible,visibleold,timemodified,theme from mdl_course_categories  where visible = '1';

If visible set to 0 ... course is to be hidden.

if visible set to 1 ... course to be seen.

'spirit of sharing', Ken


In reply to Matthew Landseadel

Re: Disabled category

by Ken Task -
Picture of Particularly helpful Moodlers

Did the company providing say you had to run Moodle 3.3 or was the course content for latest and greatest 3.5.x?

Ran into something one time ... content provided included users and role changes ... ie, permissions to do things.   Have you checked your account permissions in Moodle?

Two other things to try ...

change theme - then check.

bump the order of category in the Moodle Admin interface ... move one up, then back down again. Trying to get moodle to re-read settings, etc. and re-order by moving then putting it back.

Is your cron running often enough?

And, suggest making a full site backup before tinkering more.  That way, if tinkering causes something ugly to display, you've got a way to recover.

Am out of ideas! Bug? If it is a bug in 3.3.3 ...

https://docs.moodle.org/dev/Releases#Moodle_3.3

Bug fixes for general core bugs in 3.3.x ended 17 May 2018 (12 months).
Bug fixes for security issues in 3.3.x will end 12 November 2018 (18 months).

'spirit of sharing', Ken

In reply to Ken Task

Re: Disabled category

by Matthew Landseadel -

Ken - thanks again! That did help to reveal a bit more. When I switched the theme, the categories and courses displayed as I would have expected them to.  If I'm interpreting what I'm seeing here correctly, we're using a theme called "Plus".  It looks like it is a custom theme based on "Boost".

Not sure why the heck it's not functioning the way one would expect.  I'll see if I can dig more into that template. I'm really just pulling at straws on how the template works.

On the custom Plus theme, if I bump the order of the categories, it adjusts live...the disabled one is still disabled. 

So...a little more info though on how this project was delivered to answer your question on 3.3... So, they basically lobbed the delivery over the wall at me. They gave me a mysql dump, a moodledata gzip, and a moodle gzip, and pointed me to the moodle website for instructions.  I unzipped the folders/files, restored the dump, changed config file to point to the new paths, and based on instructions on moodle site, set permissions and crons, set the website path,etc. All the while, I've never installed moodle from scratch or used it before.  So, the code they had installed pre-delivery and customized was 3.3 and they handed that over to me a couple of months ago.  I've done no upgrades because I'm lacking a good understanding of what beast I have here and how to operate moodle in general.  I've been fiddling and figuring things out as I can, with a lot of googling.

All of the educational course content is scorm. They've done a good job with that part, but this company has different teams on different continents. The project people we are working with are not technical. The content people have done good with the actual material. The tech people I can't get any info from/to because the project manager basically worms around like a contract mercenary telling us that we decided to host/install ourselves to cut costs and we don't have a support contract, so they can't get info from the techs.  It's rather upsetting.

In reply to Matthew Landseadel

Re: Disabled category

by Ken Task -
Picture of Particularly helpful Moodlers

So it's a bug in the customized theme that was already installed in the end point of what Moodle calls a migration - ie, moving a server to another server.

Can't seem to find the Plus theme ...

https://moodle.org/plugins/?q=PLUS%20theme%20type:theme%20moodle-version:3.3

Thus, I would change the theme to something stock ... that came with 3.3 ... clean or more and leave it at that.   Why?  Theme appears to have a bug and it doesn't sound like you'll be able to acquire one from the company where you purchased.   One of these days you will be compelled to upgrade and a customized theme could mess that up - that's never any fun.

Matter of fact, think I'd go to Site Admin -> Server -> Environment and update the component.   Then check 3.4, and 3.5 for that Moodle says you need to fix/update.   Do that before upgrading.

Would also learn, if you have not done so yet, how to backup the site ... code directory, DB dump, and maybe a minimal on moodledata which is moodledata/filedir/

Pay special attention to changes/issues in the SCORMS forum.

https://moodle.org/mod/forum/view.php?id=1951

since you say it has a bunch.

I'd also fill out my profile (yours, not mine) so you don't have to write about your server all the time if you have questions/issue in a forum ... Moodle version, OS, PHP version , MySQL version and a little about the site ... but no url to it.   In the your forum posting, just suggest readers go to your profile to see server info/specs.

A comment about technical support ... well ... Moodle is open source and not having a support contract with company may not have been the wisest decision ...  at least for one year.   That would have given you time to talk to the techies and get the lay of the land.   Now, for you, it's a lot of googling/reading,etc. and participation in community forums.

Nature of the beast! smile  Admin of a Moodle is an 'adventure'.

One last recommendation ... install MySQLTuner (Google that) and run it on a regular basis.  At the heart of Moodle is the DB and the DB server.   Keep that well tuned and you won't regret it later.  Just like regular habits in backing up the DB and at least minimal moodledata/filedir won't be regretted when/if there is a major issue.

'spirit of sharing', Ken


In reply to Ken Task

Re: Disabled category

by C Behan -

Just to add to this for what it's worth ... I only work through the UI myself but just in case you haven't checked already I would see if you have any kind of configuration options in Plus. This would likely be at https://www.hfalearning.org/admin/settings.php?section=themesettingplus

In developer tools I deleted the disabled class and the link was clickable. Interestingly, it seems to me that the image itself seems to be semi-transparent. It's not just a 'disabled' effect. Compare  with 

The images for each category are not a usual Moodle setting. So I think where you choose these images would be in the theme settings.

In reply to C Behan

Re: Disabled category

by Matthew Landseadel -

Thank you - you're correct. It looks like their hard-coded theme is setting things to disabled, overriding Moodle.  But the university graphics, they actually have semi-transparent.  

Why take a dynamic, DB-driven software and hard-code it?  Laziness or expecting it to require them to fix it.  It would have been reasonable to have the graphics named “category2.png” and “category3.png” and code categorygraphic=”category”+ categoryID+”.png”.  Then it would work for any category.  Graphics can be greyed out with CSS, if need be.  Not impressed.

Thanks!

In reply to Ken Task

Re: Disabled category

by Matthew Landseadel -

Ken - Thank you, thank you!

I dug into the template. Grr. It's hard-coded and overrides everything. They literally have IF statements which say if it's Cat2, then display knowledge Park icon, BG, description, ELSE, show University disabled. Then I found another IF statement for the course, which says if it's Course2, then display course2's graphic/desc, ELSE show Course3's info disabled.  No room for expansion to second Category or even a second Course, beyond the first one they delivered.   Crappy coding and amateurish.

For now, I'm going to fix the immediate crap, but I do think I need to restart with a stock theme.

On your tech support comment, totally agree. Our plan wasn't to go without, but when they dropped the ball on delivery, we've dug in our heels about moving forward with support with them.

Thanks for all your help. I'm sure we'll be chatting in the future. THANKS!

In reply to Matthew Landseadel

Re: Disabled category

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmmm ... am the type of person who tries to 'read between lines' ... hard coded sounds like they might have done things in a non-moodle-standard way to 'encourage' the purchase of 'support contract' (gotta make a living somehow, right? :\)

If they did it with the theme, there could be other locations where core files were changed or slightly modified.

Thus, when you get ready to update or upgrade the site, strongly suggest cloning the entire site and test updates/upgrades on the clone first.

And, to add 2 cents to your learning curve ... that clone I'd setup using git.  Reason, git goes after core updates ... if there is anything ... and I mean anything ... that's different in a core file, git will not only complain, it will tell you what file.  Could be saving you some sleuth time.

'spirit of sharing', Ken


Average of ratings: Useful (1)