Skip to content

Commit 93eb2e2

Browse files
committed
pass explicit submission_type for assignment quick add
turns out, according to the mozilla spec, some browsers will fall back to the text of an option if the value is not specified. so just to be clear, we'll explicitly specify 'none' as our submission type for assignment quick add fixes CNVS-16548 test plan: - in IE10, go to the assignment index page - if an assignment group doesn't already exist, create one - click the '+' icon to add an assignment to that group - leave type specified as "Assignment" - hit save - it should work - also make sure other types still work Change-Id: I06b810a4824535066962c2f915f6edd4c1ea9f56 Reviewed-on: https://gerrit.instructure.com/48838 Tested-by: Jenkins Reviewed-by: Benjamin Porter <bporter@instructure.com> QA-Review: Adam Stone <astone@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
1 parent 3b6f8ba commit 93eb2e2

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

app/views/jst/assignments/CreateAssignment.handlebars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</label>
99
<div class="controls">
1010
<select type="text" id="{{uniqLabel}}_assignment_type" name="submission_types">
11-
<option value>{{#t "assignment"}}Assignment{{/t}}</option>
11+
<option value="none">{{#t "assignment"}}Assignment{{/t}}</option>
1212
<option value="discussion_topic">{{#t "discussion_type"}}Discussion{{/t}}</option>
1313
<option value="online_quiz">{{#t "quiz_type"}}Quiz{{/t}}</option>
1414
<option value="external_tool">{{#t "external_tool_type"}}External Tool{{/t}}</option>

spec/coffeescripts/views/assignments/CreateAssignmentViewSpec.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,8 @@ define [
234234
errors = view.validateBeforeSave(data, [])
235235
ok errors["points_possible"]
236236
equal errors['points_possible'][0]['message'], 'Points possible must be a number'
237+
238+
test 'passes explicit submission_type for Assignment option', ->
239+
view = createView(@group)
240+
data = view.getFormData()
241+
equal data.submission_types, 'none'

0 commit comments

Comments
 (0)