Change-Id: I8a10679218b9a6ff8485b7822a21c704bdfaa398
Reviewed-on: https://gerrit.instructure.com/29213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
QA-Review: James Williams <jamesw@instructure.com>
fixes CNVS-10679
this commit refactors quiz into a quizzes namespace. it contains various
shims to facilitate the data migration of polymorphic relationships
('Quiz' -> 'Quizzes::Quiz'). JIRA contains several tickets linked to
the above tickets in regards to removing these shims after the data
migration, as well as the strategies on reverting the shims once the
data migration is complete.
Change-Id: I30c566d60a87af6ee83e9d0041fdcb909ead6a89
Reviewed-on: https://gerrit.instructure.com/28573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
Teachers can now control when, and for how long, students get to see the
correct answers to their quiz submissions.
The patchset introduces two new columns to Quiz and a CSS rework of the
quiz options form. See linked references for more info.
Quiz#show_correct_answers should no longer be directly accessed, use
Quiz#show_correct_answers? instead.
== Test plan
CAs stands for Correct Answers.
- Create a quiz with 3 questions
- Take the quiz as a student, and:
- get 2/3 of the questions answered correctly
- submit it
Case A - Showing CAs the moment the submission goes in:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Leave both date fields empty
- Save quiz
- Refresh student view
- You should see the CAs
Case B - Showing CAs after some date:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show Correct Answers At" to 3-days from now
- Refresh student view:
- You should not see the CAs
- Edit the quiz, and:
- Set the date to 3-days back
- Refresh student view:
- You should see the CAs
Case C - Hiding CAs after some date:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Hide Correct Answers At" to 3-days from now
- Refresh student view:
- You should see the CAs
- You should see an alert that tells you the CAs will be hidden at
the date you chose earlier
- Edit the quiz, and:
- Set the date to 3-days-back
- Refresh student view:
- You should no longer see the CAs
- Alert should read that the answers stopped being visible as of the
date you chose earlier
Case D - Creating a time-frame for showing CAs:
- Edit the quiz, and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show Correct Answers At" to yesterday
- Set the "Hide Correct Answers At" to 3-days from now
- Refresh student view:
- You should see the CAs
- You should see an alert that tells you the CAs will be visible
between yesterday and 3 days from now
- Edit the quiz, and:
- Set the "Show At" date to tomorrow
- Refresh student view:
- You should no longer see the CAs
- Alert should still tell you that the CAs will be visible starting
tomorrow until 3 days from now
Case E - Choosing a bad range
- Edit the quiz and:
- Tick the 'Let Students See Their Score Points' checkbox
- Set the "Show at" to tomorrow
- Set the "Hide at" to today, or tomorrow
- You should see an error-box
== Notes and really wild things
- http://docs.kodoware.com/canvas/cnvs-8103-take2
- http://docs.kodoware.com/canvas/cnvs-8103 (legacy changes)
refs CNVS-8103, CNVS-9386
Change-Id: Ib241ee5f143b87164105b7541aadac00f38f79ad
Reviewed-on: https://gerrit.instructure.com/25505
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
added tour popover to quiz edit/questions for teachers
when they edit quiz question on regrade
test plan:
edit a question of a quiz that students have already taken,
change the answer to reveal regrade options and verify popover
exists. Verify that its Ok, got it button works.
Change-Id: I13446746d90e05fb6da3a8632a045871c067e92b
Reviewed-on: https://gerrit.instructure.com/23680
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Change-Id: I9d02e3d937bdfbd73e7dc6553f9f3f53f2607cb1
Reviewed-on: https://gerrit.instructure.com/21579
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
this will be based on an account setting the defaults to false until this
functionality is fully implemented
closes CNVS-1152
test plan:
- first ensure that you cannot add a file upload quiz question by default
- then, in a test account, run the following:
# where ACCOUNT_ID is the id of your root testing account
acct = Account.find(ACCOUNT_ID)
settings = { :file_upload_quiz_questions => true }
acct.save
- then go to add a quiz question again.
- file upload should be a question type.
- make sure creating the quiz works with that question type, comments work,
switching between this question type and others works, etc.
Change-Id: I9b154028290551583cd44a059a5d1c23e247bbf6
Reviewed-on: https://gerrit.instructure.com/19616
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
test plan:
- new specs should pass
- go through and make sure assignment overrides work
for quizzes by using the editor on the quiz
edit page.
fixes CNVS-469
Change-Id: I6b647575bb7db34235b2a1742558f6274b2605fc
Reviewed-on: https://gerrit.instructure.com/17437
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Notes:
* Changed the quiz edit page into a tabbed interface
* Quiz settings were moved from the right sidebar to the default
tab in the main content panel.
* Questions were moved to a second tab behind the quiz settings.
* Selenium specs were modified to interact with the tabs
* Checkboxes that "enable" a text field now place focus on their
respective text fields when checked
* Admin links ("gear" menu) added with assignment rubric and
delete options
* Changed bottom form action buttons to Cancel and Save; save
button now takes user back to quiz show screen
* Publish and preview buttons to be added to quiz show page
closes CNVS-2949
Change-Id: I7d8cd579ef5789e32f91610c290820cb5fd96568
Reviewed-on: https://gerrit.instructure.com/17146
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
we were adding the text of the placeholder word directly as a class, and so
using certain words, like 'answer', had the potential to interact strantely
with javascript
fixes #CNVS-2029
text plan:
- create a quiz, with a multiple drop down question
- user [answer] as the placeholder text in the question
- create a few possible answers
- save the question
- re-edit it
- you should not see an extra, blank, correct answer option
Change-Id: I9642a1e820dd18d55f1ba71a7a47693779bc5043
Reviewed-on: https://gerrit.instructure.com/16074
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
test plan:
1. login as a teacher
2. create a new quiz
3. click on 'Allow Multiple Attempts'
4. click on 'Allowed Attempts'
5. enter a number larger than 3 digits
and click out of the box
6. alert should popup with error message
7. text input should be cleared after alert is dismissed
8. enter a couple of letters for quiz attempts
and click out of the box
9. validate steps 6-7
10. enter a couple of letters and numbers for quiz attempts
11. alert should popup with error message
12. validate steps 6-7
13. validate you can enter a 3 digit number for
quiz attempts and the quiz saves fine with
the correct number of quiz attempts
Change-Id: I9f78871f05dac66dfa757f106a1f85e19a2444f9
Reviewed-on: https://gerrit.instructure.com/13820
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Hide the "select correct answer" arrows that display next to
answers but only for "Fill in multiple blanks" question types.
All answers listed are considered correct and it doesn't make
sense to allow selecting a "correct" one. Doing so would
cause the other answers to appear as incorrect (red) but
it would still not treat the answers as incorrect. This change
makes it more consistent with current "fill in the blank" question
types.
Testing Notes:
==========
* Create/edit a quiz
* Create/edit a "Fill in multiple blanks" question
* Verify that the arrows for selecting a correct
answer no longer appear.
* Verify that the arrows appear for other questions
that need ability to select correct answers.
Change-Id: Ieadd5667d5a349e9693771f43c01aac36f9327f6
Reviewed-on: https://gerrit.instructure.com/13541
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
test:
1. removed skip_if_ie usages
2. changed single line blocks to {} and
multi-line blocks to do end
3. replaces .displayed? and !displayed with
.should .should_not be_displayed
4. removed some extra selectors
5. refactored helpers\basics\specs
Change-Id: I35bdc50594ee97774da35703d97a6bbab05654a4
Reviewed-on: https://gerrit.instructure.com/13532
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jake Sorce <jake@instructure.com>
The following issues are corrected with this:
* wasn't showing "You Answered" arrow on incorrect answer
for multiple-drowpdowns
* The "Correct Answer" arrow was not showing up on the quiz edit
page when use clicks "Show Question Details" checkbox
* On questions where the correct answer can be selected
(t/f, multiple checkboxes, etc), it was no longer showing
the persistent green arrow of the currently specified correct answer.
Testing Plan:
===========
* When editing an existing quiz, click the "Show Question Details" and
verify that the "Correct Answer(s)" arrow appears and points to the
answer area.
* Edit a t/f question (for example) and change the "correct" answer.
After updating, verify that the "Correct Answer" arrow updates to the
new correct answer.
* Take a quiz (preview or otherwise) and for a multiple dropdown question,
verify that a blank or incorrect choice shows the red "You Answered"
arrow and it is surrounded by the red error box.
Change-Id: I004896b9272b69bfe224379f153d577a17e82f66
Reviewed-on: https://gerrit.instructure.com/13280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
also refactored selenium/helper files to include
the selenium common file so any file using a common
file only has to include one file
Change-Id: I133f757da0e15a2f5e31999b45f137567f679ed7
Reviewed-on: https://gerrit.instructure.com/11986
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
fixes#7310
jQueryUI .sortable change event fires before stop,
moved change logic to the stop handler so the dom
is completely updated before sending data back to
the server.
also, we weren't sorting properly on page load
within question groups (even though we were
updating the database properly)
test plan:
1. create a quiz with two questions and one group
2. reorder the items, refresh page, verify order
3. nest questions into the group, refresh, verify
order
4. reorder items in the group, refresh, verify
5. move one question out of the group, refresh,
verify
Change-Id: I5624c4ed24c20d3109d4ce1252b048ea9b635e21
Reviewed-on: https://gerrit.instructure.com/9151
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
test plan:
1. create a quiz
2. change it to a graded survey
3. save settings
4. create and save a question
5. refresh the page
6. edit the question
7. change an answer
8. save the question
9. observe no "you need to pick a correct answer"
error bubble
Change-Id: I09a49185b94823acd0003eb956dd56b1880eeb59
Reviewed-on: https://gerrit.instructure.com/8984
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
test plan:
1. edit a quiz
2. add a multiple choice question
3. click the pencil on the first answer
4. add stuff to tiny
5. click done
6. click "update question"
7. reload page, note the HTML answer
8. repeat now that the answer is saved (make sure
new and existing questions are handled
identically)
9. Mess around w/ the question types to ensure
no weird behavior
Change-Id: Idaf741777635fd2b697747a5d331a6b7e34dee8d
Reviewed-on: https://gerrit.instructure.com/8823
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>