Commit Graph

161 Commits

Author SHA1 Message Date
Ahmad Amireh 6b8d55a77b Controlling visibility of student quiz scores
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>
2013-11-20 22:08:21 +00:00
Simon Williams 4100508763 fix grade by question for question banks
grade by question now works by question index instead of question id.  this
should work the same for normal quizzes where everyone has the same questions
in the same order.  however, for quizzes with questions groups, it means that
when navigating from the third question of Student A to Student B, you will
stay on the third question even if it is a different question.

fixes CNVS-9117

test plan:
- make sure grade by question works the same for normal quizzes
- make sure grade by question works with question banks
- you should see a warning on quizzes with question banks

Change-Id: Idf7e3201197fc52c508da9ee27ad78cb44ca3cbc
Reviewed-on: https://gerrit.instructure.com/25935
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-11-07 22:35:59 +00:00
Derek DeVries 6b3e8a58df correctly calculate number of questions affected by multiple regrades
fixes CNVS-8717

test plan:
- things to check for original regrade count ticket
  - add a quiz with at least 3 questions and allow multiple attempts
  - take the quiz as a student
  - regrade the quiz once only changing one question - choose correct only option
  - regrade the quiz again choosing 2 more questions - choose correct only option
  - view the quiz results as a student
  - it should show the correct total number of questions affected by the regrade
  - make a second attempt as a student
  - regrade notifications should no longer appear
  - regrade the question 2 more times and make sure that the questions affected counts are correct

- other things to check that were touched by this commit
  - make sure the versions table for attempts on quizzes#show works correctly
  - make sure that viewing submissions for past versions works correctly
  - make sure student analysis generates correctly for previous versions

Change-Id: If8bac35094cb7d73820ab826041d3089a6151b52
Reviewed-on: https://gerrit.instructure.com/25628
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2013-11-04 15:00:51 +00:00
Zach Pendleton edd5f5d82d remove dimdim plugin
dimdim no longer exists; no need to keep this code
around.

Change-Id: I3b1b360b71eccd7b10fd36c577bdac7b6f81976a
Reviewed-on: https://gerrit.instructure.com/24512
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-10-07 21:56:10 +00:00
Cody Cutrer d3f0b18684 validate nullness in the db on a bunch of columns
fixes CNVS-7414

Change-Id: I60978f66d88d916dc5736dbb975715172bd1e14b
Reviewed-on: https://gerrit.instructure.com/23141
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2013-09-12 22:20:39 +00:00
Cameron Matheson e89849cea8 speedgrader setting for beta quiz nav
closes CNVS-7318

Test plan:
  * Open a quiz in speedgrader
  * Click the settings link and enable beta quiz navigation
  * You should see a quiz navigation bar at the top
  * the beta nav setting should only display for quizzes

Change-Id: I546c6032680bdef4fd56c9fed9e8fd79454e3f42
Reviewed-on: https://gerrit.instructure.com/23834
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-08-31 21:47:00 +00:00
Stanley Stuart 9b76539a3e add the ability to regrade a quiz
This commit gives teachers the ability to regrade quizzes by using
different options per quiz question:

* Current Correct Only
* Full Credit (regardless of answer choice)
* Previous and Current Correct
* No Point change (for updating the display of a question)

Test Plan:
  You'll want to run through each question regrade option making sure
  scores change appropriately.

"I seldom end up where I wanted to go, but almost always end up where I
need to be." - Douglas Adams

Change-Id: I9dbb88154cd3ac630bf59dbf3e997a87f75649dc
Reviewed-on: https://gerrit.instructure.com/22018
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-08-19 17:29:26 +00:00
Jon Jensen e04b052d87 require terms by default, fixes CNVS-7330
they were required prior to our new settings refactors. this way we don't
need to go set it in prod

test plan:
1. terms should be required when registering at /register
2. terms should be required when activing an account (via course
   invitation email)
3. in the console, do Setting.set('terms_required', 'false')
4. terms should no longer be required on those pages

Change-Id: Idb13727839b847845cd4dacde4797e4e1571b42f
Reviewed-on: https://gerrit.instructure.com/22988
Reviewed-by: Mark Ericksen <marke@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-08-12 15:57:51 +00:00
Derek DeVries 2d52c85430 quiz index page redesign for draft state
fixes CNVS-5674

changes
  1. implement redesign of quizzes index with publish icon
  2. adds header toggler to styleguide for item groups and condensed item groups
  3. refactor publish button code to fix onmouseleave event issue

test plan:
  in styleguide
  1. check that item group headers toggle open/closed

  on quizzes#show with :enable_draft = true
  1. publish button continues to publish/unpublish and remember state
  2. disabled the publish button when there are student submissions

  on quizzes#index :enable_draft = false
  1. make sure quizzes index page functions the same as before draft state features

  on quizzes#index as a teacher with :enable_draft = true
  1. shows 'no quizzes' message when there are no assignment or open quizzes
  2. greys out unpublished quizzes
  3. can publish and unpublish with the new publish icon in each row
  4. disables the publish icon on the row when there are student submissions
  5. editing/deleting quizzes works (and deleting prompts to confirm)
  6. the 'search for quiz' widget filters the quizzes as you type

  on quizzes#index as a student with :enable_draft = true
  1. unpublished quizzes are not visible
  2. publish icon or edit/delete links are not visible

Change-Id: Ida140d5e30761a520b118d0c62fb45bcf1a3a008
Reviewed-on: https://gerrit.instructure.com/22121
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2013-07-18 22:33:20 +00:00
Derek DeVries fd128b726a draft state quiz edit view
fixes CNVS-5677, CNVS-6805

changes
  1. implement redesign of quiz edit page
  2. put 'published' status on edit page behind feature flag

test plan:
  on quizzes#edit :enable_draft = false
  1. page looks the same as before draft state
  2. 'published' status no longer shows up

  on quizzes#edit with :enable_draft = true
  1. header bar added and admin links moved to the header bar
  2. padding removed around footer area

Change-Id: Id7855164fa132e078ade3720adc81c1048e8a729
Reviewed-on: https://gerrit.instructure.com/22406
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2013-07-18 21:57:47 +00:00
Derek DeVries 510113826c remove extra publish button on quiz show page, add feature flag for draft state
fixes CNVS-6415, CNVS-6594

various adjustments to make the quizzes show page look closer to the ui design.
1. lighten up the publish cloud icon on the publish button's unpublished state.
2. publish button disabled state shows correct tooltip and is not 'depressed'
3. consolidate all buttons in the header bar to match the ui changes.
4. Fix issue where questions would not appear after publishing a quiz

test plan:
  with :enable_draft = false
  1. make sure publishing functions the same as before draft state features

  with :enable_draft = true
  1. visit an individual quiz page.
  2. the buttons should now all be consolidated on the top header bar
  3. the "this quiz is unpublished" message should display underneath the bar if
     the quiz is unpublished
  4. publish a quiz and then start the quiz to make sure the questions are shown
  5. submit quiz as student and ensure the published button disables
  6. make sure the disabled state of the publish button looks correct

Change-Id: I27766a88950878cb4ba9b88400f8b326b7f46b5f
Reviewed-on: https://gerrit.instructure.com/21874
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2013-07-09 17:08:39 +00:00
Stanley Stuart b307dad00b show instructions to students while taking quiz
Fixes a bug where quiz instructions could not be seen by students while
taking the quiz or by teachers when previewing the quiz.

Test Plan:
  - As a teacher, create a quiz. Enter a long body of text into the
    "Quiz Instructions" field and save. Make sure the quiz has at least
    one question. Preview the quiz. You should see "Quiz Instructions"
    at the top of the page followed by the description. Previewing the
    quiz should work as usual.
  - As a student, take the quiz. When you are taking the quiz, the "Quiz
    Instructions" field should be visible at the top. Taking the quiz
    should work as normal.

fixes CNVS-1626

Change-Id: I18b4531930a77c2f85d3e98be63bbedfb7a5ee89
Reviewed-on: https://gerrit.instructure.com/21831
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-06-28 22:48:33 +00:00
Ethan Vizitei 45dc45c7f9 edit page draft state
fixes #CNVS-6293

this adds a draft state indicator to the edit
page, no functionality is attached, per the mockups
mentioned in the ticket.

TEST PLAN:
1) login as an instructor
2) go to the quizzes index and edit a quiz
3) you should see an indicator that is GREEN if
the draft state is currently published.  If it's not
the indicator should be a light grey and say 
'Not Published'

Change-Id: I3247c145c8ddd9731a901090c0e1dca1a43af2fb
Reviewed-on: https://gerrit.instructure.com/21460
Reviewed-by: Ethan Vizitei <ethan@12spokes.com>
Product-Review: Ethan Vizitei <ethan@12spokes.com>
QA-Review: Ethan Vizitei <ethan@12spokes.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-06-26 21:09:37 +00:00
Mark Ericksen 7b8fe27e82 redesign conferences index page and edit form
fixes CNVS-5985, CNVS-5661

testing instructions
=====================
on the conferences page:
* create a new conference
* can edit and update an existing conference
* can delete a conference
* after deleting all conferences in a group,
  the text showing "no conferences" should appear
* web conference type selection is disabled
  but visible when there is only 1 conference type
* conference type selection is visible and enabled
  when there are multiple types to choose from.
* concluded conferences can be deleted
* users should not be able to update or delete
  when they don't have permission
* long running conference that is started
  should show the "Join" button and the
  "End" button that will close the conference.

Wimba Conferences:
* "Manage Advanced Settings..." link
  shows up for and does not appear for other
  conference types

BBB Conferences:
* make sure the "recording" checkbox appears and
  is persisted properly
* test recording and playback of BBB conferences

Change-Id: Id97e9d4bdc509396b6d995a2b18e600f9426aba2
Reviewed-on: https://gerrit.instructure.com/20939
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2013-06-01 00:18:37 +00:00
James Williams d71b258ed2 allow any wiki page to be set as front page
test plan:
* confirm that wiki pages can be created and updated
with the parameter wiki_page[front_page]
 * if true, this will set the wiki page as the
 front page for the context (assuming the page is
 not hidden to students)
 * if false, this will unset the page as the front page
 (assuming it was the front page to begin with)

* confirm that /courses/:course_id/front_page acts
as a proper endpoint for show/update/destroy and
acts just as /courses/:course_id/pages/:url
for whichever page is set as the front page

* confirm that none of the above page breaks
normal wiki functionality

closes #CNVS-5528

Change-Id: I3f51d740e90ff0a5a39f2aafc988a1a33947ca18
Reviewed-on: https://gerrit.instructure.com/20938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-05-30 02:51:35 +00:00
Stanley Stuart c191d1068b show link to download file upload submissions & some refactoring
Things moved:
  - Moves the submission download dialog for quizzes to a partial
  - Moves the javascript for the submission download dialog to its own
    file (instead of being in a script tag) and created a bundle for it.
  - Changed the submission download dialog to optionally use an
    environment variable for the title of the dialog (so if we need to
    reuse it later, the title won't always be "Download Assignment
    Submissions").

Behavior changed:
  - Quiz statistics page for file upload questions now just shows a link
    to download all files.
  - "Download All Files" link should be hidden for quizzes on the quiz
    show page unless the quiz has a file upload question.

Test Plan:
  - As a teacher, create a quiz without a file upload question. When you
    go to the quiz's show page, you shouldn't see a link on the right
    side for "Download All Files."
  - As a teacher, go to the quiz show page for a quiz with a file upload
    question. You should see a "Download All Files" on the right side,
    and it should work as usual.
  - As a teacher, go to the quiz statistics page for a quiz with a file
    upload question. Make sure some students have submitted the quiz
    before you do this.You should see a "Download All Files" link.
    Click it, you should get a dialog that will let you download all
    quiz submissions like on the quiz show page.

fixes CNVS-3058

Change-Id: Ibdc7664e4bc6418d7fd1b4fbcbdcbcdd03f8d12b
Reviewed-on: https://gerrit.instructure.com/20760
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2013-05-22 22:36:22 +00:00
Eric Berry 7e57b12a4b added aria support for radio/checkbox labels in quiz
fixes CNVS-4941

test steps:
- create a quiz with multiple choice (checkbox and radio)
- use JAWS to hear the options and ensure that the question
  is repeated after each choice's value

Change-Id: I444a0b2f995a2bd640f4dd8f78b9db6f7a94fa2d
Reviewed-on: https://gerrit.instructure.com/20431
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
QA-Review: Stanley Stuart <stanley@instructure.com>
2013-05-22 22:34:14 +00:00
Mark Severson 88ca0e82da add account quotas tab
test plan:
 * account admins with 'Manage storage quotas' should:
   * see the 'Quotas' tab in account settings
   * be allowed to modify quotas on the 'Quotas' tab
   * be allowed to modify quotas through the accounts api
 * admins without 'Manage storage quotas' should:
   * not see the 'Quotas' tab in account settings
   * not be allowed to modify quotas through the accounts api
 * accounts api should
   * allow updating the default_storage_quota_mb
   * allow updating the default_user_storage_quota_mb
   * reject values for these fields that are too large

closes #CNVS-4798

Change-Id: Icebe863b8e155efac1849a387b0bd7b3f47590fd
Reviewed-on: https://gerrit.instructure.com/19849
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-05-11 02:56:32 +00:00
Mark Severson 83e192a7e8 updated the syllabus to better handle public courses
- added assignment links for public courses
- fixed images in the syllabus body for non-enrolled admins

test plan:
 * syllabus page is shown (including when the course home page is set to the syllabus)
 * images in the syllabus body are shown
 * links are presented when the user has access to the content (assignment, event, etc)

public and non-public courses for all role types, including:
 * teacher, ta, etc
 * student
 * anonymous (not logged in)
 * admin (with & without 'View Course Content' right)

fixes: CNVS-5364

Change-Id: Ieea5987530e67563c97eec2b495cfb8b712f8a03
Reviewed-on: https://gerrit.instructure.com/19822
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2013-04-26 17:57:37 +00:00
Mark Severson 26a4204b87 fix failing specs (caused by libxml2 upgrade)
test plan:
 * specs pass

Change-Id: I2041fa39cbabfd11a51de5aae28d611cacb280e5
refs: #CNVS-5269
Reviewed-on: https://gerrit.instructure.com/19687
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
2013-04-18 16:29:44 +00:00
Jon Jensen 2f17a059e7 account-level password policy support, fixes CNVS-4211
test plan:
1. set up a new password policy via the console, e.g.
   a = Account.default
   a.settings[:password_policy] = {:min_length=>6, :max_sequence=>3, :max_repeats=>3, :disallow_common_passwords=>true}
   a.save!
2. go to /register and sign up as a student
3. make sure the password policy is enforced, i.e.
   1. confirm that the password must be at least 6 chars
   2. confirm that the password cannot be a common one (e.g. football)
   3. confirm that the password cannot contain a run of 4 or more chars
      (e.g. abc123lol is ok, abcd1234 is not)
   4. confirm that the password cannot have the same char repeated 4 or
      more times (e.g. aaa000bb is ok aaaabbbb is not)
4. verify the password policy is enforced when changing your password as
   an existing user (via user profile/settings)
5. verify the password policy is enforced when adding a login for a user
6. verify the password policy is enforced when resetting your password
   (via forgot password on login page)
7. invite a new user into a course, and as that user verify the password
   policy is enforced when you set up your account

Change-Id: Ie619fc255dc940249676bf5e510ce68eaf17441c
Reviewed-on: https://gerrit.instructure.com/19104
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2013-04-05 20:13:26 +00:00
Jeremy Stanley 4e20d4706f plumb media comment types to grade summary page
fixes CNVS-1839

test plan:
 - as a student, submit an assignment
 - as a teacher, record video and audio comments for the submission
   in speedgrader
 - (wait for kaltura to process the media comments...)
 - as the student, go to the grades page and click the "full details"
   button
 - make sure that the video and audio comments both play properly

Change-Id: I2ab093fde1a2ceec292f149cd535739eca3b1880
Reviewed-on: https://gerrit.instructure.com/19070
QA-Review: Adam Phillipps <adam@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-04-03 02:36:53 +00:00
Jeremy Stanley aafadc431f add :manage_storage_quotas permission
refs CNVS-4782

test plan:
 - BEFORE applying database migrations, create two account
   roles, one that enables "Manage account level settings",
   and one that disables it.
 - ... apply database migrations ...
 - an account setting "Manage storage quotas" should appear
   and should be enabled for roles that have "Manage account
   level settings", and disabled otherwise
 - ensure the following values cannot be changed
   (are not editable on the web forms) if
   "Manage storage quotas" permission is revoked:
  in Account Settings:
   - Default Course File Quota
   - Default User File Quota
  in Course Settings:
   - File Storage
 - also ensure that a user lacking this permission
   cannot set a course quota via the courses API
   (creating or updating a course). the value should
   be ignored if the user does not have permission
   to set it.

NOTE: This permission applies to accounts and courses.
      There are also quotas for entire sites (for users,
      course files, and media files), but these are managed
      by a plugin and are not affected by this commit.

Change-Id: I4a3b0b332a5a4e74596f167360db37e2653eab70
Reviewed-on: https://gerrit.instructure.com/18887
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-03-29 18:27:39 +00:00
Jon Jensen 624f8d0150 remove some unused views
test plan:
N/A, they weren't used

Change-Id: Icb078fb8e9a2386f22a07e1b5ce543e9b29f72e5
Reviewed-on: https://gerrit.instructure.com/19086
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-03-29 18:17:25 +00:00
Cameron Matheson 0fcb643db3 clean up Quiz#statistics return value
refs CNVS-4698

Test plan:
  make sure the quiz statistics page still works

Change-Id: I15567b8ef2624c374c38cd700040bcbe84df65b8
Reviewed-on: https://gerrit.instructure.com/18917
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-03-28 21:35:50 +00:00
Simon Williams fbf163ab92 warn students when a quiz is unpublished
fixes CNVS-4516

test plan:
- as a teacher, create an unpublished quiz
- on the show page, you should see the warning with the option to publish
- as a student, go to the quiz
- you should see the warning (but no option to publish)

Change-Id: I894926e03ac093c1cee5a5c64b2cad549dbdb342
Reviewed-on: https://gerrit.instructure.com/18468
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Bryan Madsen <bryan@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2013-03-09 10:14:12 -07:00
Ethan Vizitei 80c2b2d031 cleanup and sharding fixes in grade_summary
Simple "with_each_shard" fix for the
actual enrollment loading code.

I also pushed the data transformations down into
a presenter since there were so many
instance variables, and added some focused
specs around the presenter. (and updated
the view to reference all collections
from the presenter, memoizing to ensure
nothing gets transformed more than once)

Finally, to make the grade book summary work,
had to branch off of Jacob's fix for foreign
keys across shards and make use of
'relative_id_for' in the gradebooks_controller

fixes CNVS-2201

TEST PLAN:
1) login as a user who has enrollments
in 2 courses on different shards.

2) navigate to "/grades"

3) you should see all your courses, not just
the ones on your current shard.

Change-Id: I385bd94cce71bf2aee03b1ae7679157c08910924
Reviewed-on: https://gerrit.instructure.com/17667
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2013-03-07 15:44:20 -07:00
Cameron Matheson fb6fd951f9 set correct due_date for teachers on vdd assignments
closes CNVS-3756

Test plan:
  make sure assignment show up in the correct section of the page in
  /assignments for the following configurations:
    * no overrides
    * has a section override due date before the assignment due date
    * has a section override due date after the assignment due date

Change-Id: I7681416a102c9d8078f433fb03f8667cf2647e98
Reviewed-on: https://gerrit.instructure.com/17968
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2013-03-01 13:33:49 -07:00
Mark Ericksen 2eaba178c2 disable speedgrader in courses with large_roster flag.
fixes CNVS-3111

test plan:
  * enable the 'large_roster' flag on a course and verify
    that, in that course, links to the speedgrader are
    hidden in the following places:
    - graded discussion topic gear menu;
    - graded discussion entry gear menu
    - quiz show page (right side bar);
    - assignment show page (right side bar);
    - gradebook1 assignment header dropdown;
    - gradebook1 grade cell popup;
    - gradebook2 assignment header dropdown;
    - gradebook2 grade cell popup;
  * also verify that attempting to navigate to the
    speedgrader directly via /courses/:id/gradebook path
    displays a message that the speedgrader is disabled
    for that course.

Change-Id: Iab82bd7281208f6e2d3745bb3184c90068090535
Reviewed-on: https://gerrit.instructure.com/17710
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
Tested-by: Eric Berry <ericb@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2013-02-15 16:38:45 -07:00
Ryan Florence 57fb1e1d90 disable uploading scores in large_roster courses
closes CNVS-3091

test plan:
1. visit gradebook2
   - note the ability to upload scores
2. set large_roster to true for a course in
   script/console
3. visit gradebook2 again
   - note the option to upload scores is gone

Change-Id: I1995cbf878cd6898eee1167d0e80f25ef21261b6
Reviewed-on: https://gerrit.instructure.com/17649
QA-Review: Cam Theriault <cam@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-02-13 22:20:14 -07:00
Mark Severson 22dbdc5bd4 convert the course syllabus page to use Backbone
use the calendar_events api and appointment_groups api rather than
being statically rendered

modify the i18n strftime to allow formatting of numeric only dates
without needing to introduce internationalization into the tests

test plan:
 * syllabus events
   * should show all course events, assignments, and appointment groups
     (including overridden due dates)
   * should be in the user's configured timezone (not the browser's)
   * should be sorted in date and time order
   * should be sorted by title (if the date and time are the same)
   * overrides should indicate why they are overridden
     Note: if the user is a student and therefore only sees the event
     once, there should _not_ be an override indicator
   * should show more than one page of results for each type
     This is controlled by the 'api_max_per_page' and
     'syllabus_per_page' settings; default is 50 per page

 * interaction
   * hovering a mini calendar day
     * should highlight the day
     * should highlight associated syllabus events
   * hovering a syllabus event
     * should highlight the event
     * should highlight associated mini calendar day
     * should highlight associated (overridden) events
   * mini calendar next/previous buttons
     * should change the calendar month
     * should show indicators on days with syllabus events
   * "Jump to Today"
     * should change to today's month
     * should highlight today
     * should highlight syllabus events for today
   * "Hide/Show ... specific dates"
     * should not be visible unless there are overridden events
     * should collapse overridden events (events w/override indicators)
     * no mini calendar indicator for syllabus days that are now hidden

 * "Edit Syllabus Description" should still work

 * run qunit tests

fixes #CNVS-442

Change-Id: I25650fb939e7f18e771803e6a33822ca9b834a34
Reviewed-on: https://gerrit.instructure.com/16959
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-02-13 13:28:09 -07:00
Simon Williams 5cc715b967 refactor assignment show/edit to use backbone
change and clean up the assignment show and edit pages to use new code
standards and to follow the style guide.  separates the logic for viewing and
editing an assignment and moves editing into a backbone model.o

closes CNVS-930

test plan:
- make sure you can still view and edit existing assignments.
- make sure all fields in the assignment form work (enable turnitin and
  assignment freezing for a comprehensive test)
- make sure submitting an assignment as a student still works
- make sure downloading and uploading submissions as a teacher still works
- make sure adding a new assignment group, group category, grading standard,
  and rubric still work
- make sure the show page renders correctly for both a student and a teacher.

Change-Id: I9ca6c5d56eb386d35a62f6b816a03ebebda662d4
Reviewed-on: https://gerrit.instructure.com/16823
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
2013-02-12 13:22:18 -07:00
Jon Jensen a1cef3e359 clean up Course#settings a bit, don't show hide_final_grades to students
refactor so that adding settings is less painful, and accessors are
automatic. change code to use accessors everywhere, and ensure settings
are handled by course import/export. also fix filter_attributes_for_user
call so that it correctly excludes hide_final_grades in api responses for
students

test plan:
1. toggle course settings (hide_final_grade / hide_distribution_graphs /
   allow_student_discussion_topics)
2. they should work as advertised

Change-Id: I152e2236099b1bc1a42730babef12ac9cc2f9733
Reviewed-on: https://gerrit.instructure.com/17534
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2013-02-08 16:11:00 -07:00
Jeremy Stanley 9194e78de4 don't escape the quotes around 'display:none;'
fixes #CNVS-3711

test plan:
 - go to a course settings page
 - you should not see the contents of the Reset Course Content
   dialog underneath the Reset Course Content button
   (see screenshot attached to ticket)

Change-Id: I98c3f0d833f3e2dc7d0be1c86ddb62ea44b291db
Reviewed-on: https://gerrit.instructure.com/17542
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-02-08 10:52:40 -07:00
Zach Pendleton ec953191c7 display varied due dates on discussion topic show page.
fixes CNVS-751

test plan:
  * create a discussion assignment with assignment
    overrides;
  * as a teacher, view the discussion and verify that
    all of the due dates are visible;
  * as a student, view the discussion and verify that
    the due date applicable to you is visible.

Change-Id: I455260a6993d6d04bad8a526ea60d3cc223805e8
Reviewed-on: https://gerrit.instructure.com/17030
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-02-01 17:20:22 -07:00
Cameron Matheson 62e4d84dd8 show warning in gb1 for invalid assignment groups
closes CNVS-1924

Test plan:
  * set up one or more assignment groups that have no points possible
  * go to gradebook1
  * you should see similar warnings to the ones that appear in gb2

Change-Id: Icf11684e020a3eff4e654ebf73ee9ad2b9c159b1
Reviewed-on: https://gerrit.instructure.com/17069
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2013-01-31 16:29:29 -07:00
Bracken Mosbacker 4d1e54f33f allow loading wiki page in edit mode
Some iFramed pages can force the browser to forward to a new
page. If you had one of those on a wiki page you couldn't
get to the page to edit it because it forwarded too quickly.
Now you can add ?edit=1 on the wiki page url and it won't
render the wiki's content when the page loads, allowing you
to edit it.

This also white-listed the 'sandbox' attribute for iframe
nodes. Sandbox isn't supported by all browsers, but adding
it to the iframe would prevent it from forwarding if you
don't want it to.

Test Plan
 * embed an iframe in a page that tries to forward the page
 * add ?edit=1 to the wiki page and notice that it doesn't forward you
 * add the 'sandbox' attribute to the iframe and save the wiki page
 * the sandbox attribute should not have been scrubbed when saving

closes #CNVS-1288

Change-Id: I5f257e88c81db93ff19d09798ad46a77abfd69bd
Reviewed-on: https://gerrit.instructure.com/17250
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-01-30 15:15:16 -07:00
Cody Cutrer 795ac516d6 add a specific setting for self registration refs #2660
test plan:
 * a fresh account should not be able to visit /register
 * enable self_registration in script/console for the account
   (see the migration)
 * you should now be able to visit /register
 * no other changes should be visible

Change-Id: Ibfd6a0d23d3c3e37243ffb762e284b8907cd45cc
Reviewed-on: https://gerrit.instructure.com/16713
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Cody Cutrer <cody@instructure.com>
2013-01-11 10:19:39 -07:00
Zach Pendleton aeb2328ccf add new collaborator picker interface. fixes #CNVS-1160
test plan:
  * set up etherpad and google docs collaborations at
    /plugins;
  * navigate to a course collaborations page and test
    creating both an etherpad and google docs
    collaboration (for google docs, make sure that each
    user has a gmail account set up);
  * verify that the picker properly loads and alphabetizes
    course users and groups;
  * verify that you can select both users and groups to
    collaborate with;
  * as a student, verify that the picker only displays
    groups that you are a member of;
  * verify that editing a collaboration works as expected
    and that, on update, the collaborators list is
    properly updated;
  * navigate to a group's collaborations page and verify
    that it also works as expected, but that the
    people/groups filters are not displayed and that only
    users can be selected.

Change-Id: I99372daff141f2d0847dacbe88c5d289d117a5f9
Reviewed-on: https://gerrit.instructure.com/16343
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Zach Pendleton <zachp@instructure.com>
2013-01-11 09:57:04 -07:00
Bracken Mosbacker 5585c3a203 add custom role support to course users tab
You can add enrollments with the custom roles and see who
has the roles.

Test Plan:
 * Create custom roles for each enrollment type
 * Test all the settings page's functionality like adding/deleting users with custom roles
 * Make custom observers observe students in various combinations of custom roliness
   - verify that the new observer role has the custom role
 * Make sure the section limited check box shows up for custom tas/teachers by selecting those options in the new user select box

closes #cnvs-1166

Change-Id: I5f133bf1b5b1438d7f8e34297b450ff561d401d0
Reviewed-on: https://gerrit.instructure.com/16272
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2012-12-26 15:46:12 -07:00
Jon Jensen bc15ef9b99 let plugins require (and customize) terms checkbox on cc confirm page
refs #CNVS-2297, #CNVS-1318, #CNVS-1301

test plan:
1. sign up via open registration (/register)
2. go to the link in your email to set a password
3. you should not have to agree to the terms again (since you did on the
   /register page)
4. refer to plugin test plan for other scenarios

Change-Id: Ie31a3424c9a8126e4c28e794b1a96da6faa7382c
Reviewed-on: https://gerrit.instructure.com/16294
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
QA-Review: Cam Theriault <cam@instructure.com>
2012-12-21 16:48:16 -07:00
Simon Williams 34bf7cb4af add course setting to disable student distribution graphs entirely
there are various concerns about the distribution graphs available on the
student grades page revealing too much about other students scores.  give
teachers the option to remove these for all students in their course.

fixes #CNVS-1063

test plan:
- as a teacher, grade > 5 students for an assignment
- as a student, verify that you can see the box and whisker plot of the grade
  distribution on your grades page.
- as a teacher, go to course settings > more options > and check "hide
  distribution graphs"
- as a student, verify that you cannot see the graph anymore.

Change-Id: Ieab4137e52b616a394a3de0ee313cfd0a0abcc0d
Reviewed-on: https://gerrit.instructure.com/16191
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
2012-12-21 12:45:15 -07:00
Stanley Stuart f4b8c3c8ef add the ability to take quizzes one question at a time
fixes #11781

This commit also adds the ability for quiz creators to restrict students
to only submit their answers for a question once, preventing them from
returning to a question they have already answered.

test plan:
- create a normal quiz, a 1-question at a time quiz, and a quiz that locks
  answered questions
- as a student, take each of these quizzes, making sure they work as expected
- make sure to use the next/previous buttons, the sidebar links, and try
  submitting in the middle of a quiz vs at the end of a quiz
- try to get back to a previous question on a locks answers quiz, make sure
  there is no way to do this.
- normal quizzes should function as you would expect.

Change-Id: Icb7efc646a51549269e3a4ead2c7f34b00e94103
Reviewed-on: https://gerrit.instructure.com/15292
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Dave Donahue <dave@12spokes.com>
2012-12-01 22:59:31 -07:00
Jon Willesen 88658a9291 add account setting to toggle scheduler in calendar 2
fixes #11764

test plan:
 - as a site admin, go to the account settings and enable
   calendar2 and the scheduler.
 - go to calendar 2 and see the scheduler button is there.
 - go back to the account settings and disable the scheduler.
 - go back to calendar 2 and see the scheduler button is gone.

Change-Id: Iab1cb555216b9ce124588b86aa93955411e4f421
Reviewed-on: https://gerrit.instructure.com/15359
Reviewed-by: Marc LeGendre <marc@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-11-21 10:10:28 -07:00
Simon Williams 0fd409c86b speed up submission categorization for grade summaries
fixes #11777

we were filtering the list of submissions once for every assignment in the
course, rather than filtering once and saving that filter.

test plan:
- in a large course (eg 700 students, 50 assignments, 40k submissions)
- go to a student grade page (/courses/x/grades/y)
- it should load
- make sure grade distribution graphs still work for regular sized courses

Change-Id: Ib14718d4725aa9ddd547018d3875449fb515e073
Reviewed-on: https://gerrit.instructure.com/15351
Reviewed-by: Stanley Stuart <stanley+gerrit@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-15 14:41:00 -07:00
Ryan Shaw 713d0b8c91 replace all .button(s) with .btn
in order to not have to support buttons with .ui-button AND
.button AND .btn classes this simplifies and and makes our
codebase more consistent by deprecating the .button class
with .btn

Change-Id: I4802d785a47b36aa477f302e6ac8c87715db8a62
Reviewed-on: https://gerrit.instructure.com/15194
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-14 13:29:30 -07:00
Cody Cutrer b85ed5a22e make CommunicationChannelsController#confirm sharding-aware
* Add CommunicationChannel#merge_candidates and use that in
   CommunicationChannelsController#confirm, UsersController#create,
   and profile settings view
 * change a few pseudonym accesses to be based off the account, not
   the user
 * search all_pseudonyms in a few places
 * shorten @communication_channel.confirmation_code to @nonce in
   several places

test plan:
 * create a normal user in shard 1. invite the same e-mail address to
   a course in shard 2. accept the invitation as you're existing user
   (you should have to log in)
 * invite a different e-mail address to a course in shard 2. accept
   the invitation while logged in as the user from the previous step

Change-Id: I9e7a4adb0b816650f444210c7a110b08858ec037
Reviewed-on: https://gerrit.instructure.com/15121
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-11-12 10:34:09 -07:00
Simon Williams dd62ef5805 new dashboard design
the new dashboard design categorizes recent activity into buckets that can be
expanded/collapsed, and inidividual messages can be dismissed.  the categories
are announcements, conversations, discussions and assignments.  this redesign
applies to the homepage dashboard, the group home page, and the course homepage
when "recent activity dashboard" is selected as the course home page type.o

the motiviation is that the dashboard should capture and present in one place
important information happening in all the user's courses or groups, and allow
for jumping into this information to see more details:

- announcements/discussions should show on the dashboard when they are created,
  or when there are root replies to recent announcements
- conversations should show on the dashboard when there is new activity
- assignments should show on the dashboard when they are created, or when
  changes are made at least a couple hours after being created

the presence of a dashboard item means there is activity for that item that may
be of interest to the user.  additionally, the dashboard items will show
read/unread state (excluding assignments) for items which the user has not yet
viewed.

additionally, global messages such as course inivitations, account level
announcements, and new user messages have been restyled, but will keep their
place above the recent activity widget on the dashboard.

test plan:
- visit many exising user's dashboards and make sure they are functional in the
  new style.
- visit canvas as a brand new user (no enrollments), a new user enrolled in
  a new course and make sure the dashboard is restyled and the messaging makes
  sense.
- make an account level announcement and make sure it shows up on user's
  dashboards.
- create all different types of conversations: single, group, bulk private,
  from submission comment, add user to convo, etc. and make sure the
  appropriate dashboard items appear and make sense
- create discussions and announcements, reply to them at the root level and at
  the sub entry level (sub entries will not make new dashboard items), test
  from both a read and unread user's perspective, making sure dashboard items are
  correct. (note that read/unread state will not be correct for existing items
  before this code is applied, but should be correct for future items moving
  forward)
- dismiss dashboard items and account announcements, make sure they stay
  dismissed.
- test creating assignments, waiting > 2 hours, and updating due dates or other
  assignment details. make sure items appear. note that unread state will not
  exist for assignment notifications.

closes #10783
refs #11038
refs #11039

Change-Id: I276a8cb1fae4c8a46425d0a368455e15a0c470c5
Reviewed-on: https://gerrit.instructure.com/14540
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-11 21:56:16 -07:00
Stanley Stuart 1a2779eb12 add varied due date functionality to the main assignments page
test plan:
  REFERENCE:
    * "Main Assignments Page": "localhost:3000/assignments", or click on
    "Assignments" in the menu bar near the top of the page.
    * "Right Side Bar": Go to the Main Assignments Page, it's on your
    right.
    * "Course Assignments Page": Hover over "Courses" in the menu bar
    * near the top of the page, click on the course you set up. Once
    that page loads, click on "Assignments" tab on the left hand side.
  STEPS:
    * https://gist.github.com/f12b3694016f3dcc979e

Change-Id: I9a5884ec1057f196ba5b731a2978c874141bec5b
Reviewed-on: https://gerrit.instructure.com/15006
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-11-09 23:21:44 -07:00
James Williams 598590d942 don't show "add user" for concluded courses
prevent active enrollments from being added for concluded courses
and causing authorization problems

(revision: took jeremy's advice and moved tests from
selenium to views)

(revision #2: took more of jeremy's advice and added checks
in controller and api, rather than just removing the button)

(also, I forgot to add files to the commit.. durr)

test plan:
 * Conclude a course
 * Try to add a user

closes #9691 #11552

Change-Id: Ibb267f5d714b43fa033d40dad93511e443b17790
Reviewed-on: https://gerrit.instructure.com/14865
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-11-08 09:59:39 -07:00