how to override LMS static JS views for custom theme

Viewed 726

I'm attempting to modify the following file, defaulted by the OpenEDX lms.

account_settings_factory_spec.js

account_settings_view.js

But upon rerunning paver, files aren't changing. Is it actually possible to override the JS in themes? My end goal is to remove the tabs in the account section as well as edit the additional infomation.

Any help towards reaching a solution would be appreciated!

Thanks.

1 Answers

Is it actually possible to override the JS in themes?

yes, tricky

copy & paste from original and edit/modified "account_settings_view.js" and "account_settings_factory.js" to your theme folder

/edx/app/edxapp/themes/my_theme/lms/static/js/student_account/views/account_settings_view.js /edx/app/edxapp/themes/my_theme/lms/static/js/student_account/views/account_settings_factory.js

and copy(from original) & paste "account_settings.html" to your theme folder

/edx/app/edxapp/themes/my_theme/lms/templates/student_account/account_settings.html

and find this line and edit, this path should be your theme JS path. Check how your custom CSS or JS linked in the header(see image below, "payne" is my theme name).

<%static:require_module module_name="YOUR_THEME/js/student_account/views/account_settings_factory" class_name="AccountSettingsFactory">

enter image description here

I just changed here you can see below. Just added "xxxx" Here I used Docker devstack. enter image description here

Related