|
8 | 8 | %a{href: home_guide_path}
|
9 | 9 | instructor's guide
|
10 | 10 | for more information.
|
11 |
| - %h4.text-danger All fields are required. |
| 11 | + %h4.text-danger All fields are required |
| 12 | + %h4.text-danger Note: LMS fields are not required to create textbooks |
12 | 13 |
|
13 | 14 | / .form-group
|
14 | 15 | / = label_tag :name, 'Canvas course Name', class: 'control-label col-xs-2'
|
|
79 | 80 | / %i.fa.fa-info-circle.action{ data: { toggle: 'modal', target: '#inst-book-help-modal' } }
|
80 | 81 |
|
81 | 82 | .form-group
|
82 |
| - = label_tag :lms_instance_select, 'Canvas Instance:', class: 'control-label col-xs-1' |
| 83 | + = label_tag :lms_instance_select, 'LMS Instance:', class: 'control-label col-xs-1' |
83 | 84 | .col-xs-3
|
84 | 85 | = collection_select nil, nil, LmsInstance.all, :id, :url, { prompt: 'Select', selected: nil },
|
85 | 86 | { id: 'lms-instance-select', class: 'form-control' }
|
86 | 87 |
|
87 | 88 | #lms-access-token-group.form-group
|
88 |
| - = label_tag :name, 'Canvas access token', class: 'control-label col-xs-2' |
| 89 | + = label_tag :name, 'LMS access token', class: 'control-label col-xs-2' |
89 | 90 | .col-lg-4.col-md-4.col-xs-4
|
90 | 91 | = text_field_tag :lms_access_token, nil, id: 'lms-access-token', class: 'form-control', maxlength: 100, disabled: 'true'
|
91 | 92 | %small.col-xs-11.text.text-warning#lms-access-token-desc
|
92 |
| - Your access token allows the OpenDSA application to generate the book instance in your Canvas course on your behalf. First, you need to generate Canvas access token by following |
| 93 | + Your access token allows the OpenDSA application to generate the book instance in your LMS course on your behalf. First, you need to generate LMS access token by following |
93 | 94 | the instructions <a href="https://guides.instructure.com/m/4214/l/40399-how-do-i-obtain-an-api-access-token-for-an-account" target="_blank">here</a>. Second, go to the OpenDSA
|
94 | 95 | = link_to "LMS Accesses", admin_lms_accesses_path, :target => "_blank"
|
95 | 96 | page to add or update your access token.
|
96 | 97 | #lms-access-update-btn.col-xs-1
|
97 |
| - = link_to admin_lms_accesses_path, title: "Update your access token for the selected Canvas instance", class: 'btn btn-default', :target => "_blank" do |
| 98 | + = link_to admin_lms_accesses_path, title: "Update your access token for the selected LMS instance", class: 'btn btn-default', :target => "_blank" do |
98 | 99 | %i.glyphicon.glyphicon-new-window
|
99 | 100 | #lms-access-token-check.col-xs-1.fa.fa-check
|
100 | 101 |
|
101 | 102 | .form-group
|
102 |
| - = label_tag :name, 'Canvas course Id', class: 'control-label col-xs-2' |
| 103 | + = label_tag :name, 'LMS course Id', class: 'control-label col-xs-2' |
103 | 104 | .col-lg-4.col-md-4.col-xs-4
|
104 | 105 | = text_field_tag :lms_course_id, nil, id: 'lms-course-num', class: 'form-control', maxlength: 25
|
105 | 106 | %small.col-xs-11.text.text-warning
|
106 |
| - Create a new course at the selected canvas instance and copy the course Id here (e.g. Course Id of https://canvas.instructure.com/courses/1076903 is 1076903). |
| 107 | + Create a new course at the selected LMS instance and copy the course Id here (e.g. Course Id of https://canvas.instructure.com/courses/1076903 is 1076903). |
107 | 108 |
|
108 | 109 | .form-group
|
109 | 110 | .col-xs-offset-2.col-xs-2
|
110 |
| - %button#btn-submit-co.btn.btn-primary Submit |
| 111 | + %button#btn-submit-co.btn.btn-primary Create New Course Offering |
| 112 | + |
| 113 | + .form-group |
| 114 | + .col-xs-offset-2.col-xs-2 |
| 115 | + - textbook_lms_instance = LmsInstance.find_by(url: "TEXTBOOK") |
| 116 | + %button#btn-gen-textbook.btn.btn-primary{disabled:textbook_lms_instance.blank?} Create Non LMS Textbook |
| 117 | + %small.col-xs-11.text.text-warning |
| 118 | + = textbook_lms_instance.blank? ? 'Textbook LMS Instance not found' : '' |
| 119 | + |
111 | 120 |
|
112 | 121 | #lms-instance-help-modal.modal.fade{role: 'dialog', tabindex: '-1' }
|
113 | 122 | .modal-dialog.modal-md{ style: 'overflow-y: scroll; max-height:85% margin-top: 50px; margin-bottom:50px;' }
|
|
0 commit comments