File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 192192 messages = check_completeness ( true ) ;
193193 if ( messages . length !== 0 ) {
194194 form_alert ( messages ) ;
195- $ ( '#btn-gen-textbook' ) . prop ( 'disabled' , false ) ;
195+ $ ( '#btn-gen-textbook' ) . attr ( 'disabled' , false ) ;
196196 return ;
197197 }
198198 organization_id = $ ( '#organization-select' ) . val ( ) ;
Original file line number Diff line number Diff line change 6464 - course = Course.find_by(id:offering.course_id)
6565 - organization = Organization.find_by(id:course.organization_id)
6666 - term = Term.find_by(id:offering.term_id)
67- - if ENV[" opendsa_branch" ] == " staging"
68- = link_to " Textbook URL" , " https://opendsax.cs.vt.edu/ODSA/" + " /Books/#{ organization.slug } /#{ course.slug } /#{ term.slug } /#{ offering.label } /html/"
67+ - route = " Books/#{ organization.slug } /#{ course.slug } /#{ term.slug } /#{ offering.label } /html/" .gsub(" " ," _" )
68+ - if ENV[" host_url" ].include? " localhost"
69+ - route = ENV[" host_url" ].gsub(" -lti" ,"" ) +" /" + route + " index.html"
70+ - elsif ENV[" opendsa_branch" ] == " staging"
71+ - route = " https://opendsax.cs.vt.edu/ODSA/" + route
6972 - elsif ENV[" opendsa_branch" ] == " master"
70- = link_to " Textbook URL" , " https://opendsa-server.cs.vt.edu/ODSA/" + " /Books/#{ organization.slug } /#{ course.slug } /#{ term.slug } /#{ offering.label } /html/"
71- - else
72- = link_to " Textbook URL" , ENV[" config_api_link" ].gsub(" /api/configure/" ," /Books/#{ organization.slug } /#{ course.slug } /#{ term.slug } /#{ offering.label } /html/index.html" )
73+ - route = " https://opendsa-server.cs.vt.edu/ODSA/" + route
74+ = link_to " Textbook URL" , route
7375 %td
7476 - inst_book = InstBook.find_by(course_offering_id:offering.id)
7577 - form_name = 'compile_book_' + inst_book.id.to_s
You can’t perform that action at this time.
0 commit comments