Skip to content

Commit a5b290c

Browse files
chickenwaddle77freyazjiner
authored andcommitted
Improved assignment view for students (MarkUsProject#7533)
1. Changed from "Assignment <short identifier>" to "<short identifier>: <description>". 2. Changed text in "Policies" section to be written in second-person ("You must complete this assignment individually."). 3. Make "Required Files" only show when there are files needed. 4. Moved "Starter Files" subsection to immediately above the "Submissions" subsection. 5. Modified title so "Files" in "Starter Files" is not capitalised. 6. Added period to the end of first line in starter files. 7. Moved to make "<X> files submitted" the first bullet point in "Submissions" and made it link to the "Submissions" tab.
1 parent 2e445cd commit a5b290c

File tree

4 files changed

+41
-39
lines changed

4 files changed

+41
-39
lines changed

Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
### ✨ New features and improvements
88
- Improved layout and labeling in the assignment settings form for both standard and timed assessments. (#7531)
9-
- Replaced assignment summary statistics in the "Status" column on the instructor Assignments page with a link to the assignment summary page. (#7553)
9+
- Improved Assignment view for students (#7533)
10+
- Replaced assignment summary statistics in the "Status" column on the instructor Assignments page with a link to the grades page. (#7553)
1011

1112
### 🐛 Bug fixes
1213

app/views/assignments/_read.html.erb

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
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>
62

73
<div class='block-content'>
84
<% if @assignment.message %>
@@ -134,6 +130,32 @@
134130
</div>
135131
<% end %>
136132
<% 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 %>
137159
<% if !peer_review && (!@assignment.is_timed || !@grouping&.start_time.nil? || @grouping&.past_collection_date?) %>
138160
<h3><%= Submission.model_name.human.pluralize %></h3>
139161
<% if @grouping.nil? %>
@@ -146,19 +168,20 @@
146168
</p>
147169
<% end %>
148170
<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>
149175
<% if @num_submitted_files > 0 %>
150176
<li>
151177
<%= t('submissions.student.last_revision_date') %>
152178
<%= l(@last_modified_date) %>
153179
</li>
154180
<% end %>
155-
<li><%= t('submissions.student.files_submitted', count: @num_submitted_files) %></li>
156181
</ul>
157182

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>
162185
<ul>
163186
<% @assignment.assignment_files.each do |assignment_file| %>
164187
<li><%= assignment_file.filename %></li>
@@ -175,30 +198,4 @@
175198
<% end %>
176199
<% end %>
177200
<% 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 %>
204201
</div>

app/views/assignments/show.html.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
<% end %>
2525
<% end %>
2626

27-
<% content_for :title, "#{Assignment.model_name.human} #{@assignment.short_identifier}" %>
27+
<% short_identifier = @assignment.is_peer_review? ?
28+
"#{@assignment.parent_assignment.short_identifier} #{PeerReview.model_name.human}" :
29+
@assignment.short_identifier %>
30+
31+
<% content_for :title, "#{short_identifier}: #{@assignment.description}" %>
2832

2933
<div class='pane-wrapper'>
3034
<div class='pane block'>

config/locales/views/groups/en.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ en:
8686
not_allowed_to_delete_group: If you would like to remove this group, you must contact your instructor.
8787
not_allowed_to_form_group: You are not allowed to form a group yourself. Please wait until your instructor forms your group.
8888
section_groups_only: You can only form a group with students in your section.
89-
students_work_alone: Students work individually.
89+
students_work_alone: You must complete this assignment individually.
9090
url_repository: Repository URL
9191
work_alone: Work alone
9292
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.

0 commit comments

Comments
 (0)