Modifying the CMS' create course page

53 views
Skip to first unread message

M. L. AARIZOU

unread,
Jan 5, 2016, 4:21:49 PM1/5/16
to General Open edX discussion
Hello everyone,
I want to change a litte bit the "create course" page on the openEdx Studio. Actually, I want to add a button component to be able to import a java applet application to the course. I tried to find the html file which is responsible of publishing courses just to get the context and the idea of the all think. But I juste get lost in all the views.py, the urls and thousands of other files. 
Any leak please? Thank you in advance 

Andy Armstrong

unread,
Jan 5, 2016, 4:58:45 PM1/5/16
to edx-...@googlegroups.com
That is a good question. Here are some hints on how to get started adding code to Studio:

1. Use cms/urls.py to find the view that handles the page you are interested in

For example, the URL for the main course outline page is /course/COURSE_ID. You can see the URL definition here:
  
  url(r'^course/{}?$'.format(settings.COURSE_KEY_PATTERN), 'course_handler', name='course_handler'),

2. Find the view handler 

In this case, the method is called course_handler, which my IDE tells me is defined in cms/djangoapps/contentstore/views/course.py. If you look at the "GET" clause, this in turn calls the function course_index.

3. Determine the template being used

Looking in course_index, you can see that it renders the template "course_outline.html". You can find this file in cms/templates/course_outline.html

Is that enough to get you started? When you are ready to start writing code, there's a lot of useful guidance here:


I hope this helps.

 - Andy

  

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/eb09e555-56d2-43d3-80b1-93c563e687ac%40googlegroups.com.



--

Andy Armstrong

edX | UI Architect  | an...@edx.org  

141 Portland Street, 9th floor

Cambridge, MA 02139

http://www.edx.org

http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566

M. L. AARIZOU

unread,
Jan 5, 2016, 5:45:48 PM1/5/16
to General Open edX discussion
Yes this is very helpful. Actually I started as yous said but I get lost in ths second step. I found that the URL is define by component_handler which is defined in views.component.py but then I didn't know how to continue. Thank you, I will teke a look. 
In the other hand I got a suggestion from the slack comunity to forget about changing the code because it will be very difficult and insteed use the existent components to add the applet
Reply all
Reply to author
Forward
0 new messages