Problems after upgrading to Moodle 3.4

Problems after upgrading to Moodle 3.4

Karishma Tiwari -
回帖数:28

We have just upgraded our moodle from 2.7 to 3.0, and then to 3.4


After version 3.4, we noticed the below discrepancies:


1) Calendar is loading, and layout is distorted, and on the left, below 'CALENDAR', there is the loading ring

calendar


2) Upon selecting the calendar, the dates appear twice:


calendar


3) Titles/topics, appear twice:

topic


4) And there is the phrase 'hidden from students' appearing out of nowhere:


hideen


Can someone provide me with some info as to why and how to solve this?

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Switch your theme - I am presuming that you are using a theme that is not compatible.  Switch to Boost.

回复Emma Richardson

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

boost is a theme? this means I will lose all theme settings?

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Rick Jerz -
Particularly helpful Moodlers的头像 Testers的头像

I think that your current theme settings will be retained if you switch back to it.

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

Yes, but if your theme is not working, it might be time for a change... or is there a newer version?  What theme are you using?  Your other option would be to use css to fix the various issues but you are missing a lot by not using a boost based theme...

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

Regardless... you need to eliminate the theme as the issue. If your theme is broken then you'll need to do *something*

回复Howard Miller

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

OK so I am looking to customise the boost theme for our use, but I am so bad with css stuff. Can someone advice, given the below files in my existing theme, which are the css and layout files, how/which ones do I put into the custom scss for boost?

Just wondering, is there any way to seamlessly import theme settings from moodle 2.5 to moodle 3.4?


[root@Moodle2001 style]# ls -lrt

total 40

-rwxr-xr-x. 1 apache apache 5559 Jul  4 09:39 pagelayout.css

-rwxr-xr-x. 1 apache apache  146 Jul  4 09:39 editor.css

-rwxr-xr-x. 1 apache apache   62 Jul  4 09:39 settings.css

-rwxr-xr-x. 1 apache apache 2759 Jul  4 09:39 admin.css

-rwxr-xr-x. 1 apache apache 7805 Jul  4 09:39 core.css

-rwxr-xr-x. 1 apache apache  684 Jul  4 09:39 menu.css

-rwxr-xr-x. 1 apache apache 4502 Jul  4 09:39 report.css

[root@Moodle2001 style]# cd ../layout

[root@Moodle2001 layout]# ls -lrt

total 36

-rwxr-xr-x. 1 apache apache 4379 Jul  4 09:39 frontpage.php

-rwxr-xr-x. 1 apache apache 4994 Jul  4 09:39 report.php

-rwxr-xr-x. 1 apache apache 1802 Jul  4 09:39 scorm.php

-rwxr-xr-x. 1 root   root   6509 Jul  5 15:50 general.php_5Jul2018

-rwxr-xr-x. 1 apache apache 6510 Jul  5 15:51 general.php

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

Read this - https://docs.moodle.org/dev/Themes

Then if (when?) you have specific questions please post them in the Themes forum... you will get lots of great help over there 大笑

回复Howard Miller

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

ok will do, thx!

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

I've got another problem here since the upgrade - this is pertaining to educator site experience.


We enter a course and try to list the participants and get this error:

get_related_contexts_string() is removed, please use $context->get_parent_context_ids(true) instead


I checked the lib/accesslib.php is using the correct get_parent_context_ids(true):

$contexts = $context->get_parent_context_ids(true);


I realised that user/index.php was still calling the old get_related_context_string at line 365, so I changed it to:

$contextlist = get_parent_context_ids(true);


However I am still getting some error:

$contextlist = get_parent_context_ids(true);


Is the parameter 'true' correct or should be something else?

I tried turning the debugging on, this is what I get:

Exception - Call to undefined function get_parent_context_ids()

More information about this error

Debug info: 
Error code: generalexceptionmessage
Stack trace:

Exception - Call to undefined function get_parent_context_ids()

More information about this error

Debug info: 
Error code: generalexceptionmessage
Stack trace:
  • line 365 of /user/index.php: Error thrown

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

This sounds like either a cache problem or an incorrect upgrade procedure...how exactly was the upgrade done?  I suspect the new code was copied over the old code instead of replacing it entirely.  If that is the case, then you need to redownload the code, and follow the upgrade instructions to upgrade correctly.

回复Emma Richardson

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

I've cleared the cache a few times, so we can rule that out. Unless it is user related?


We did the upgrade by replacing the moodle folder entirely, and then we copied the needed files over for the settings.


回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

"....and then we copied the needed files over for the settings"

What *exactly* does that mean?

回复Emma Richardson

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

 I've cleared the cache a few times, so we can rule that out. Unless it is user related?


We did the upgrade by replacing the moodle folder entirely, and then we copied the needed files over for the settings.


Is the line 365 in user/index.php correct?


$contextlist = get_parent_context_ids(true);

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

user/index.php in moodle3.4 only has 358 lines...

I suggest redoing the install...or do you have some plugins that involve the user/index file?

回复Emma Richardson

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

You were right indeed Emma, we did not use the latest user/index.php in the upgrade. 

I fixed this to use the latest user/index.php, now we no longer get the function error, but I see the layout of the list of participants is a bit weird, the alphabets are appearing vertical instead of horizontal, how can I fix this?


participants

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Emma Richardson -
Documentation writers的头像 Particularly helpful Moodlers的头像 Plugin developers的头像

I cannot really help you if you have been picking and choosing which files to upgrade - how are we meant to know which files are old and which are new?  The entire moodle code needs to be replaced with the latest version.  Then, if you have issues, come back and we can help.

回复Emma Richardson

Re: Problems after upgrading to Moodle 3.4

Cleo Prakash -
Hi Emma,


I am new to a role where an upgrade to Moodle 3.4 had taken place prior to my start (six months ago) and I have the same issue of the listing in vertical format when I need them in Horizontal format. Any help in this regards is much appreciated. 

Thank you

Kind regards

Cleo Prakash

回复Cleo Prakash

Re: Problems after upgrading to Moodle 3.4

Cleo Prakash -

The upgrade was performed as per instructions. I changed the theme to More but no changes and still it's vertical. Please help.


Thank you


Kind regards

Cleo Prakash

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Howard Miller -
Core developers的头像 Documentation writers的头像 Particularly helpful Moodlers的头像 Peer reviewers的头像 Plugin developers的头像

I'm guessing that you have made changes to core Moodle code and have now found out why it's a really bad idea. 

What you can't do is to copy the old versions into the new code and hope it works. There are various things you can do but, basically, you need to re-make the changes in the new version. 

However, again, don't do that. It's very bad practice and leads to this sort of thing. 

回复Howard Miller

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

@emma @howard agree its not ideal, this is the legacy moodle  learning system that we have got from our client.

Thanks for all your inputs!

回复Howard Miller

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

Can someone help me with the codes at user/index.php, moodle 3.4, how can I edit to make the below alphabets appear in horizontal instead of this vertical?


user list

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

we added the below lines in custom css for our theme to remove the vertical alphabets, it works for us (my pc and my colleague, both on different networks) but at the client side they still view the alphabets. Is there something else at work here? firewall?


form#participantsform div.initialbar.firstinitial,

form#participantsform div.initialbar.lastinitial,

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Karishma Tiwari -

ok so the above problem, was that when we login as admin (which is us) it shows correctly, other logins does not show the css changes. How to override this?

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Cleo Prakash -

Hi Karishma,


Did the issue raised got fixed? I see the same vertical listing under assessments as well as participants. How did you overcome by changing to horizontal please.


Any help is much appreciated.


Thank you


Kind regards

Cleo Prakash

回复Karishma Tiwari

Re: Problems after upgrading to Moodle 3.4

Gail Jackson -

Its look like your theme is not supporting this install other theme and try again