Creating a custom page and mapping it with a uri path at the backend

Hi Team/@regis ,

I am trying to add a custom home page called “home.html” available at url like “https://demolms.xxxxx.com/home” which contains summary view of my enrolled courses and some static content. When user logs into “https://demolms.xxxxx.com”, he should be able to see the attached sample home page and not default dashboard. I tried including the dashboard.html file using <%include file='dashboard.html' /> in “home.html” to get the “My Courses” dynamic content, but it gives 500 error. What steps/configurations/modifications am I missing here. I am using “tutor” with a custom-theme in the tutor ec2 instance. I appreciate it if anyone could help.

Thanks,
Santosh Divate

Did you try to follow this? Changing the appearance of Open edX — Tutor documentation

The 500 error should give you a clue. A 500 error is an error on the server. Right after you trigger the error, what is the output of tutor local logs --tail=100 lms? The resulting stacktrace will give you an indication of what is going on.

Good luck.

Hi Regis,

I checked the logs and I got the below logs:

lms_1 | 2022-02-07 04:45:49,344 INFO 10 [tracking] [user 7] [ip 117.195.87.206] logger.py:41 - {"name": "/home", "context": {"user_id": 7, "path": "/home", "course_id": "", "org_id": "", "enterprise_uuid": ""}, "username": "santosh.kumar.divate", "session": "1c7b444879fc9a2373db1774689c5a57", "ip": "117.195.87.206", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36", "host": "https://demolms.host.com", "referer": "", "accept_language": "en-US,en;q=0.9,es;q=0.8", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2022-02-07T04:45:49.344027+00:00", "event_type": "/home", "event_source": "server", "page": null}
lms_1 | [pid: 10|app: 0|req: 24/165] 172.18.0.5 () {56 vars in 2201 bytes} [Mon Feb  7 04:45:49 2022] GET /home => generated 14189 bytes in 76 msecs (HTTP/1.1 404) 7 headers in 491 bytes (1 switches on core 0)

Is there any file where we can map the home.html file which I added in the custom theme to the path “/home” in the backend and display that once a user logs in instead of showing dashboard? I am not sure how to make this happen in tutor. I checked lot of posts and blogs but none of them tell how to add new and custom pages and how to configure them in tutor so that the backend can serve us that custom page. Please help me with this.

Thanks,
Santosh Divate

Are you running Open edX on your personal computer? If yes, https will not work. I strongly recommend you disable https for local testing.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.