Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
69 changes: 33 additions & 36 deletions app/views/assignments/_read.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<% short_identifier = @assignment.is_peer_review? ?
"#{@assignment.parent_assignment.short_identifier} #{PeerReview.model_name.human}" :
@assignment.short_identifier %>

<h2><%= "#{short_identifier}: #{@assignment.description}" %></h2>
<h2><%= t('assignments.assignment_information') %></h2>

<div class='block-content'>
<% if @assignment.message %>
Expand Down Expand Up @@ -134,6 +130,32 @@
</div>
<% end %>
<% end %>
<% unless @assignment.starter_file_updated_at.nil? || @grouping.nil? %>
<% if allowed_to?(:download_starter_file?, @grouping) %>
<h3><%= I18n.t('assignments.starter_file.title').downcase.capitalize %></h3>
<p><%= I18n.t('assignments.starter_file.provided') %></p>
<p><%= I18n.t('assignments.starter_file.changed_at',
changed_date: I18n.l(@assignment.starter_file_updated_at)) %></p>
<p>
<%= button_to t(:download_the, item: t('assignments.starter_file.title')),
download_starter_file_course_assignment_groups_path(@current_course, @assignment),
method: 'get' %>
</p>
<% # Display the URL of this group's repository if applicable
if allowed_to?(:access_repo?, @grouping) %>
<p>
<%= 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) } } %>
</p>
<% end %>
<% end %>
<% end %>
<% if !peer_review && (!@assignment.is_timed || !@grouping&.start_time.nil? || @grouping&.past_collection_date?) %>
<h3><%= Submission.model_name.human.pluralize %></h3>
<% if @grouping.nil? %>
Expand All @@ -146,19 +168,20 @@
</p>
<% end %>
<ul>
<li><%= link_to t('submissions.student.files_submitted', count: @num_submitted_files),
file_manager_course_assignment_submissions_path(course_id: @assignment.course_id,
assignment_id: @assignment.id) %>
</li>
<% if @num_submitted_files > 0 %>
<li>
<%= t('submissions.student.last_revision_date') %>
<%= l(@last_modified_date) %>
</li>
<% end %>
<li><%= t('submissions.student.files_submitted', count: @num_submitted_files) %></li>
</ul>

<h3><%= Assignment.human_attribute_name(:assignment_files) %></h3>
<% if @assignment.assignment_files.length == 0 %>
<p><%= t('assignments.no_required_files') %></p>
<% else %>
<% if @assignment.assignment_files.length > 0 %>
<h3><%= Assignment.human_attribute_name(:assignment_files) %></h3>
<ul>
<% @assignment.assignment_files.each do |assignment_file| %>
<li><%= assignment_file.filename %></li>
Expand All @@ -175,30 +198,4 @@
<% end %>
<% end %>
<% end %>
<% unless @assignment.starter_file_updated_at.nil? || @grouping.nil? %>
<% if allowed_to?(:download_starter_file?, @grouping) %>
<h3><%= I18n.t('assignments.starter_file.title') %></h3>
<p><%= I18n.t('assignments.starter_file.provided') %></p>
<p><%= I18n.t('assignments.starter_file.changed_at',
changed_date: I18n.l(@assignment.starter_file_updated_at)) %></p>
<p>
<%= button_to t(:download_the, item: t('assignments.starter_file.title')),
download_starter_file_course_assignment_groups_path(@current_course, @assignment),
method: 'get' %>
</p>
<% # Display the URL of this group's repository if applicable
if allowed_to?(:access_repo?, @grouping) %>
<p>
<%= 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) } } %>
</p>
<% end %>
<% end %>
<% end %>
</div>
6 changes: 5 additions & 1 deletion app/views/assignments/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
<% end %>
<% end %>

<% content_for :title, "#{Assignment.model_name.human} #{@assignment.short_identifier}" %>
<% short_identifier = @assignment.is_peer_review? ?
"#{@assignment.parent_assignment.short_identifier} #{PeerReview.model_name.human}" :
@assignment.short_identifier %>

<% content_for :title, "#{short_identifier}: #{@assignment.description}" %>

<div class='pane-wrapper'>
<div class='pane block'>
Expand Down
4 changes: 2 additions & 2 deletions config/locales/views/assignments/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
en:
assignments:
assignment_has_groupings: Assignment has groupings.
assignment_information: Assignment information
average_annotations: "%{average_annotations} annotations per marked submission"
configuration_zip_file: Configuration Zip File
deadline_with_extension: You have an extension until %{extension_deadline}.
Expand Down Expand Up @@ -31,7 +32,6 @@ en:
hidden: "%{assignment_text} (hidden)"
manage_course_work: Manage Course Work
marking_scheme: 'Marking Scheme: %{identifier}'
no_required_files: There are no required files for this assignment.
none: There are currently no assignments.
scanned_exam:
under_review: This exam is still under review.
Expand Down Expand Up @@ -64,7 +64,7 @@ en:
populate_repo_confirm: Are you sure you want to add the starter files to your repository? If they already exist in the repository, any changes will be overwritten.
populate_repo_error: Unfortunately, the starter files could not be added to your repository. Please download them as a zip file instead.
populate_repo_success: Starter files successfully added to your repository.
provided: Starter files have been provided for this assignment
provided: Starter files have been provided for this assignment.
rename: Rename Selected File or Directory
starter_file_rule: Starter File Assignment Rules
starter_file_rule_types:
Expand Down
2 changes: 1 addition & 1 deletion config/locales/views/groups/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ en:
not_allowed_to_delete_group: If you would like to remove this group, you must contact your instructor.
not_allowed_to_form_group: You are not allowed to form a group yourself. Please wait until your instructor forms your group.
section_groups_only: You can only form a group with students in your section.
students_work_alone: Students work individually.
students_work_alone: You must complete this assignment individually.
url_repository: Repository URL
work_alone: Work alone
working_alone: You have indicated you are working individually on this assignment. If you change your mind and want to create or join a group, first delete your group using the button below.
Expand Down