How to learn the template?

24 views
Skip to first unread message

xyaw Li

unread,
Apr 2, 2019, 6:27:27 AM4/2/19
to General Open edX discussion
I try to modify the file :      /edx-platform/lms/templates/student_account/account_settings.underscore
I add the code in red . But it is not working . 

I would like to know :
  1.  What is the kind of the template grammar?( Python template? or others? )  ( I would like to learn and then I could modify my code )
  2. I could not find what's wrong with the code in red  . Do you have any suggestion ?


<div class="account-settings-sections">
<% _.each(accountSettingsTabs, function(tab) { %>
<div id="<%- tab.name %>-tabpanel" class="account-settings-tabpanels <% if (!tab.class) { %> hidden <% } %>" aria-label="<%- tab.label %>" role="tabpanel"></div>
<% }); %>
<% if (tab.name === "nid_tab_name") { %>
.......the code I want to do.........
<% } %>

</div>

vicente rios

unread,
Apr 2, 2019, 7:02:45 AM4/2/19
to General Open edX discussion
EDX uses underscore js 

EDX has logs at edx/apps/edx/bin/log for each section. 

You probably know wether the html file you have belongs to CMS , LMS or both due to the folder structure and you can check what is going on exactly.

Tab.name is properly opened and closed, I am pretty sure the "role="tabpanel" is not properly closed as it should be  "role="tabpanel"" and it makes no sense to open double brackets within a double bracket field.
Consider using single brackets within double bracket fields  making it "role='tabpanel'" but this is barely a start on fixing what is wrong. 

The log has all the information you need. 
Reply all
Reply to author
Forward
0 new messages