Skip to content

Commit 06f1480

Browse files
committed
Warn about submitting manually
1 parent 24b495a commit 06f1480

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

app/views/exercises/show.html.erb

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
<ul>
55
<li>
6-
<%= link_to_if @course.initial_refresh_ready?, 'Download project template (zip)', exercise_zip_url(@exercise) do %>
6+
<% if params[:use_clients] %>
7+
Download the project using our plugins (such as the Netbeans plugin). See your course material for instructions.
8+
<% else%>
9+
<% if @course.initial_refresh_ready? %>
10+
<%= link_to 'Download project template (zip)', exercise_zip_url(@exercise) %>. Please download the exercises using using our plugins (such as the Netbeans plugin).
11+
<% else %>
712
Project template (zip) not available during refresh.
813
<% end %>
14+
<%end %>
915
</li>
1016

1117
<% if @current_user.guest? %>
@@ -148,13 +154,21 @@
148154
<% end %>
149155
<% end %>
150156

151-
<% if @exercise.submittable_by?(current_user) %>
152-
<div class="row">
153-
<div class="col-md-12">
154-
<h2>Submit answer</h2>
155-
<%= render :partial => 'submissions/form', :locals => { :submission => @new_submission } %>
156-
</div>
157-
</div>
157+
<% if params[:use_clients] %>
158+
<h2>Submitting your answer</h2>
159+
Submit your answer using our plugins (such as the Netbeans plugin). See your course material for instructions. You may submit your answer using the plugin as many times as you like.
160+
<% else%>
161+
<% if @exercise.submittable_by?(current_user) %>
162+
<div class="row">
163+
<div class="col-md-12">
164+
<h2>Submit answer manually</h2>
165+
<div class="alert alert-danger">
166+
Only submit using this as a last resort! You should always submit the exercise using our plugins (such as the Netbeans plugin). See your course material for submitting instructions.
167+
</div>
168+
<%= render :partial => 'submissions/form', :locals => { :submission => @new_submission } %>
169+
</div>
170+
</div>
171+
<% end %>
158172
<% end %>
159173

160174
<% if signed_in? && !@course.hide_submissions? %>

0 commit comments

Comments
 (0)