Skip to content

Commit

Permalink
Fix creation of missing submissions (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
damianhxy committed Sep 11, 2022
1 parent d77597d commit 7080f1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/views/components/_autocomplete.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script type="application/javascript">
/* requires @usersEncoded and @users to be set, i.e. via retrieve_autocompletion_data! */
/* requires @usersEncoded and @users to be set, i.e. via Course.get_autocomplete_data */
jQuery(function() {
/* match user name/email with cud_id */
/* escape_javascript prevents issues with backslashes in names, etc. */
Expand Down
8 changes: 4 additions & 4 deletions app/views/submissions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<% content_for :javascripts do %>
<%= render partial: "components/autocomplete", locals: { hiddenCUDField: "#submission_course_user_datum_id" } %>
<% end %>

<h2>Create Submission for <%= link_to @assessment.display_name, [@course, @assessment] %> </h2>

<p>
Expand All @@ -26,6 +22,10 @@
<td>
<% if params[:course_user_datum_id].nil? then %>
<% content_for :javascripts do %>
<%= render partial: "components/autocomplete", locals: { hiddenCUDField: "#submission_course_user_datum_id" } %>
<% end %>

<div class="input-field">
<input type="text" size="3" id="student_autocomplete" class="autocomplete" autocomplete="off"/>
<label for="student_autocomplete">Start typing student name or email</label>
Expand Down

0 comments on commit 7080f1c

Please sign in to comment.