diff --git a/Changelog.md b/Changelog.md index 134ee919bd..957cd8f1c8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ ### ✨ New features and improvements - Improved layout and labeling in the assignment settings form for both standard and timed assessments. (#7531) +- Improved Assignment view for students (#7533) ### 🐛 Bug fixes diff --git a/app/views/assignments/_read.html.erb b/app/views/assignments/_read.html.erb index 7037e4f12f..d8cf2098b9 100644 --- a/app/views/assignments/_read.html.erb +++ b/app/views/assignments/_read.html.erb @@ -1,8 +1,4 @@ -<% short_identifier = @assignment.is_peer_review? ? - "#{@assignment.parent_assignment.short_identifier} #{PeerReview.model_name.human}" : - @assignment.short_identifier %> - -

<%= "#{short_identifier}: #{@assignment.description}" %>

+

<%= t('assignments.assignment_information') %>

<% if @assignment.message %> @@ -134,6 +130,32 @@
<% end %> <% end %> + <% unless @assignment.starter_file_updated_at.nil? || @grouping.nil? %> + <% if allowed_to?(:download_starter_file?, @grouping) %> +

<%= I18n.t('assignments.starter_file.title').downcase.capitalize %>

+

<%= I18n.t('assignments.starter_file.provided') %>

+

<%= I18n.t('assignments.starter_file.changed_at', + changed_date: I18n.l(@assignment.starter_file_updated_at)) %>

+

+ <%= button_to t(:download_the, item: t('assignments.starter_file.title')), + download_starter_file_course_assignment_groups_path(@current_course, @assignment), + method: 'get' %> +

+ <% # Display the URL of this group's repository if applicable + if allowed_to?(:access_repo?, @grouping) %> +

+ <%= button_to t('assignments.starter_file.populate_repo'), + populate_repo_with_starter_files_course_assignment_groups_path( + course_id: @assignment.course_id, + assignment_id: @assignment.id + ), + { method: :patch, + data: { confirm: t('assignments.starter_file.populate_repo_confirm'), + disable_with: t(:please_wait) } } %> +

+ <% end %> + <% end %> + <% end %> <% if !peer_review && (!@assignment.is_timed || !@grouping&.start_time.nil? || @grouping&.past_collection_date?) %>

<%= Submission.model_name.human.pluralize %>

<% if @grouping.nil? %> @@ -146,19 +168,20 @@

<% end %> -

<%= Assignment.human_attribute_name(:assignment_files) %>

- <% if @assignment.assignment_files.length == 0 %> -

<%= t('assignments.no_required_files') %>

- <% else %> + <% if @assignment.assignment_files.length > 0 %> +

<%= Assignment.human_attribute_name(:assignment_files) %>