File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
views/pd/workshop_dashboard Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,7 @@ const StageLockDialog = React.createClass({
111
111
} ,
112
112
113
113
viewSection ( ) {
114
- /// TODO - build a way to get code_org_url from dashboard
115
- window . open ( `http://localhost.code.org:3000/teacher-dashboard#/sections/${ this . props . selectedSection } /assessments` , '_blank' ) ;
114
+ window . open ( `${ window . dashboard . CODE_ORG_URL } /teacher-dashboard#/sections/${ this . props . selectedSection } /assessments` , '_blank' ) ;
116
115
} ,
117
116
118
117
handleRadioChange ( event ) {
Original file line number Diff line number Diff line change 1
- /* global TEACHER_DASHBOARD_URL */
2
-
3
1
/**
4
2
* Workshop view / edit. Displays and optionally edits details for a workshop.
5
3
* Routes:
@@ -228,7 +226,7 @@ const Workshop = React.createClass({
228
226
} ,
229
227
230
228
getSectionUrl ( ) {
231
- return `${ window . dashboard . workshop . TEACHER_DASHBOARD_URL } #/sections/${ this . state . workshop . section_id } /manage` ;
229
+ return `${ window . dashboard . CODE_ORG_URL } /teacher-dashboard #/sections/${ this . state . workshop . section_id } /manage` ;
232
230
} ,
233
231
234
232
renderSignupPanel ( ) {
Original file line number Diff line number Diff line change 30
30
//= require details-polyfill/jquery.details
31
31
//= require details-polyfill/details-polyfill
32
32
33
- //= require selectize
33
+ //= require selectize
34
+
35
+ // window.dashboard is used to communicate between dashboard/apps in a variety
36
+ // of places. In this case we want to make availale to our JS the url of the
37
+ // pegasus portion of our site (i.e. http://code.org vs. http://studio.code.org)
38
+ window . dashboard = window . dashboard || { } ;
39
+ window . dashboard . CODE_ORG_URL = "<%= CDO.code_org_url %>" ;
Original file line number Diff line number Diff line change 6
6
7
7
:javascript
8
8
window.dashboard.workshop = {
9
- TEACHER_DASHBOARD_URL: "#{CDO.code_org_url '/teacher-dashboard'}" ,
10
9
TYPES: #{Pd::Workshop::TYPES},
11
10
COURSES: #{Pd::Workshop::COURSES},
12
11
SUBJECTS: #{Pd::Workshop::SUBJECTS.to_json},
You can’t perform that action at this time.
0 commit comments