|
1 | | -<% short_identifier = @assignment.is_peer_review? ? |
2 | | - "#{@assignment.parent_assignment.short_identifier} #{PeerReview.model_name.human}" : |
3 | | - @assignment.short_identifier %> |
4 | | - |
5 | | -<h2><%= "#{short_identifier}: #{@assignment.description}" %></h2> |
| 1 | +<h2><%= t('assignments.assignment_information') %></h2> |
6 | 2 |
|
7 | 3 | <div class='block-content'> |
8 | 4 | <% if @assignment.message %> |
|
134 | 130 | </div> |
135 | 131 | <% end %> |
136 | 132 | <% end %> |
| 133 | + <% unless @assignment.starter_file_updated_at.nil? || @grouping.nil? %> |
| 134 | + <% if allowed_to?(:download_starter_file?, @grouping) %> |
| 135 | + <h3><%= I18n.t('assignments.starter_file.title').downcase.capitalize %></h3> |
| 136 | + <p><%= I18n.t('assignments.starter_file.provided') %></p> |
| 137 | + <p><%= I18n.t('assignments.starter_file.changed_at', |
| 138 | + changed_date: I18n.l(@assignment.starter_file_updated_at)) %></p> |
| 139 | + <p> |
| 140 | + <%= button_to t(:download_the, item: t('assignments.starter_file.title')), |
| 141 | + download_starter_file_course_assignment_groups_path(@current_course, @assignment), |
| 142 | + method: 'get' %> |
| 143 | + </p> |
| 144 | + <% # Display the URL of this group's repository if applicable |
| 145 | + if allowed_to?(:access_repo?, @grouping) %> |
| 146 | + <p> |
| 147 | + <%= button_to t('assignments.starter_file.populate_repo'), |
| 148 | + populate_repo_with_starter_files_course_assignment_groups_path( |
| 149 | + course_id: @assignment.course_id, |
| 150 | + assignment_id: @assignment.id |
| 151 | + ), |
| 152 | + { method: :patch, |
| 153 | + data: { confirm: t('assignments.starter_file.populate_repo_confirm'), |
| 154 | + disable_with: t(:please_wait) } } %> |
| 155 | + </p> |
| 156 | + <% end %> |
| 157 | + <% end %> |
| 158 | + <% end %> |
137 | 159 | <% if !peer_review && (!@assignment.is_timed || !@grouping&.start_time.nil? || @grouping&.past_collection_date?) %> |
138 | 160 | <h3><%= Submission.model_name.human.pluralize %></h3> |
139 | 161 | <% if @grouping.nil? %> |
|
146 | 168 | </p> |
147 | 169 | <% end %> |
148 | 170 | <ul> |
| 171 | + <li><%= link_to t('submissions.student.files_submitted', count: @num_submitted_files), |
| 172 | + file_manager_course_assignment_submissions_path(course_id: @assignment.course_id, |
| 173 | + assignment_id: @assignment.id) %> |
| 174 | + </li> |
149 | 175 | <% if @num_submitted_files > 0 %> |
150 | 176 | <li> |
151 | 177 | <%= t('submissions.student.last_revision_date') %> |
152 | 178 | <%= l(@last_modified_date) %> |
153 | 179 | </li> |
154 | 180 | <% end %> |
155 | | - <li><%= t('submissions.student.files_submitted', count: @num_submitted_files) %></li> |
156 | 181 | </ul> |
157 | 182 |
|
158 | | - <h3><%= Assignment.human_attribute_name(:assignment_files) %></h3> |
159 | | - <% if @assignment.assignment_files.length == 0 %> |
160 | | - <p><%= t('assignments.no_required_files') %></p> |
161 | | - <% else %> |
| 183 | + <% if @assignment.assignment_files.length > 0 %> |
| 184 | + <h3><%= Assignment.human_attribute_name(:assignment_files) %></h3> |
162 | 185 | <ul> |
163 | 186 | <% @assignment.assignment_files.each do |assignment_file| %> |
164 | 187 | <li><%= assignment_file.filename %></li> |
|
175 | 198 | <% end %> |
176 | 199 | <% end %> |
177 | 200 | <% end %> |
178 | | -<% unless @assignment.starter_file_updated_at.nil? || @grouping.nil? %> |
179 | | - <% if allowed_to?(:download_starter_file?, @grouping) %> |
180 | | - <h3><%= I18n.t('assignments.starter_file.title') %></h3> |
181 | | - <p><%= I18n.t('assignments.starter_file.provided') %></p> |
182 | | - <p><%= I18n.t('assignments.starter_file.changed_at', |
183 | | - changed_date: I18n.l(@assignment.starter_file_updated_at)) %></p> |
184 | | - <p> |
185 | | - <%= button_to t(:download_the, item: t('assignments.starter_file.title')), |
186 | | - download_starter_file_course_assignment_groups_path(@current_course, @assignment), |
187 | | - method: 'get' %> |
188 | | - </p> |
189 | | - <% # Display the URL of this group's repository if applicable |
190 | | - if allowed_to?(:access_repo?, @grouping) %> |
191 | | - <p> |
192 | | - <%= button_to t('assignments.starter_file.populate_repo'), |
193 | | - populate_repo_with_starter_files_course_assignment_groups_path( |
194 | | - course_id: @assignment.course_id, |
195 | | - assignment_id: @assignment.id |
196 | | - ), |
197 | | - { method: :patch, |
198 | | - data: { confirm: t('assignments.starter_file.populate_repo_confirm'), |
199 | | - disable_with: t(:please_wait) } } %> |
200 | | - </p> |
201 | | - <% end %> |
202 | | - <% end %> |
203 | | -<% end %> |
204 | 201 | </div> |
0 commit comments