DigiDago / moodle-format_softcourse

A course format for Moodle. This course format displays sections with only an image and an optional text on the course homepage. Users don’t see the detail of the section, for instance, resources or activities.
https://pimenko.com
1 stars 4 forks source link

Exception - Call to a member function out() on null #88

Closed onword closed 2 years ago

onword commented 3 years ago

Subject of the issue/enhancement/features

Using Moodle 3.10.3. After selecting course format -> Soft Course, I receive the error "Exception - Call to a member function out() on null." I have tried with Boost theme and RemUI theme. The same error occurs in both themes.

Steps to reproduce

I simply installed the Soft Course zip through the Moodle plugin installer, saved the settings, went to a course and chose course format Soft Course, and received the error after saving and returning to the course.

Expected behaviour

I should see and be able to use the Soft Course course format in the course.

Actual behaviour

I only see the error "Exception - Call to a member function out() on null."

Screenshots (if you can)

RemUI theme Screenshot 2021-06-06 8 37 04 AM

Boost theme Screenshot 2021-06-06 8 38 35 AM

CrymSonir commented 3 years ago

Hello,

Can you tell us which version of softcourse you are using? (for that go to "Site administration >> Plugins >> Plugins overview")

Do you have an activity in a section? If so, please tell us the type of activity used.

Best regards, Sylvain - Pimenko Team

onword commented 3 years ago

Thank you for the quick reply. I am using Soft Course version 3.11rc1.2.

There are only 2 pages, 2 folders and 2 glossaries in the course. Each page and folder has its own section, and the glossaries are together in the last section for a total of 5 sections.

CrymSonir commented 3 years ago

I think the concern comes from folders and/or glossaries or an other activity.

Can you put a page type activity as the first activity in every sections and tell me if you still get this error message.

onword commented 3 years ago

Thank you Sylvain. I added pages to each section without them and tried again and it worked.

Along the way I noticed I had empty sections in there for some reason. I deleted those sections, then also deleted the extra pages, and the course format still worked.

So, I believe the issue was caused by having empty sections. The other course formats are able to work even if empty sections exist, though. So maybe that can be addressed?

It brought up another issue as well. I will post separately for that.

The help is much appreciated! This course format is a great idea.

CrymSonir commented 3 years ago

Okay I will leave this ticket open and we will do some tests next week to try to reproduce the outcome :)

onword commented 3 years ago

Thank you, please let me know if you need my help to reproduce or troubleshoot it.

CrymSonir commented 2 years ago

Hello, This problem should have been fixed with the latest version of the plugin for Moodle 4.0. So I close this ticket :)