Broke the Student Dashboard :(

Hi Admins ! I don’t know what I did, but my landing page for student log in look like this

On clicking the “View Message Wall” or any of “My Classes” links the things are normal.
But clicking on “Home” the page looks like the screenshot.
This is happening only for students and not for staff or Admin.

I have selected all permissions available for students but it is still showing the same no matter what I do :disappointed:

The last thing that I did before that was enrol the students to a Free Learning Class.

Any idea what may be the issue?

Flygye12, I have had some screens that looked similar during my initial test of Gibbon on a local network before recommending it to our school, once during an automatic Linux version upgrade, and once after a security audit changed some of Gibbon’s file permissions. I’ll leave the troubleshooting to others, but you might quickly go to Admin–>System Admin–>System Check. Look for any item without a big green check. It tends to shed light on a multitude of possible causes. – Glenn

Flygye12, I have had some screens that looked similar during my initial test of Gibbon on a local network before recommending it to our school, once during an automatic Linux version upgrade, and once after a security audit changed some of Gibbon's file permissions. I'll leave the troubleshooting to others, but you might quickly go to Admin-->System Admin-->System Check. Look for any item without a big green check. It tends to shed light on a multitude of possible causes. -- Glenn

Thanks Glenn, it looks like this. What do I do next?

Hi flygye12, this is not an issue I’ve seen before. I guess it is a CCS-related issue, as it seems that the styles are not being applied. If you use Inspect in Firefox or Chrome, are you seeing an errors in the console? If you view the source code for the file main.css, is this pointing to a file that exists? Odd that it is working for most pages, but not the home page. Cheers, Ross.

Hi Ross,

You’re right on other pages I am getting body style and what not. But on the home page (only for students)

I am getting this error:
“index.php:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)”

What do i do next? :neutral:

Please have a look at your apache and php logs. They should provide more answers. Good luck! :slight_smile:

I think this has something to do with it, because it all happened when I assigned a Free Learning Lesson to lots of Form groups. This is the latest error (when i tried logging in as student):

PHP Fatal error: Cannot redeclare makeBlock() (previously declared in /home/xxxx/public_html/gib.xxxn.com/modules/Free Learning/moduleFunctions.php:483) in /home/xxx/public_html/gib.xxxn.com/modules/Planner/moduleFunctions.php on line 171

What should be my next action? Uninstall Free Learning Module?

Yes ! That did the trick ! Thank you. I still don’t know what happened. Maybe you all can figure it out? Thank You once again.

Thanks for investigating @flygye12 and @meierrom for your input too!

@ross are you able to try and recreate and fix this issue?

Cheers : )

Ross

@flygye12 Yep looks like a bug, well caught. A quick fix is to turn off the Planner > View Resources permission for students. This should solve the cause of the bug (a function name collision) and return your student dashboard to working order.

The fix can be found here, which is part of the v20 development version. If you’re running v19 you can make the same change to your codebase to apply this fix to your install: https://github.com/GibbonEdu/core/commit/8ac7c23b9d61868bff6cf32e5d42cfbf10839985

@admin The fix works by preventing the tag cloud in the rare case that a name collision will happen. There’s not surprisingly a lot of shared function names between Planner and Free Learning, we’ll want to consider namespaces for additional modules at some point down the road.

Thanks for the quick fix Sandra, and absolutely something to consider as we ooify the module structure some time in v21 or 22 (I guess). Cheers.

Thank you @ross and @admin ! I am sorry for not replying earlier. I made the site live on that day and since then am inundated by Password reset requests :s

I really don’t know where/how to change the codebase. :#
For the time being I have uninstalled Free Learning.

Hi @flygye12,

No worries. Even without touching the codebase, you can safely keep Free Learning installed if you disable the Planner > View Resources permission for students via the Manage Permissions page.

@ross the Planner>View Resources is disabled for students (in fact, I disabled everything other than viewMyClasses for students when I was trying to disable them from adding files in the chat :# ).

Hi Sandra,
Is there any option on free learning module where the export option can be disabled. I am trying it out for the first time. Seems an interesting way to share notes with students like a virtual note book. But I dont want the export option as a PDF doc can be printed or shared.

Hi Paschal,

I believe the export option is only available for users that have the Browse Units_all permission. If you edit your permissions so users have the Browse Units_prerequisites permission then it looks like they will not have the option to export.

You can find out some more about the Free Learning module and philosophy here: https://www.ichk.edu.hk/home/learning/innovation/free-learning/

Thank you sandra. :slight_smile: