Commit Graph

54 Commits

Author SHA1 Message Date
James Williams c186393f10 don't include quizzes locked by date in epub export
test plan:
* have a quiz set to be locked until a future date
* a student should not be able to see the quiz
 content in a epub export

closes #ADMIN-842

Change-Id: I323bc3df36b8078e88331a08a85abb7914c92efb
Reviewed-on: https://gerrit.instructure.com/142958
Tested-by: Jenkins
Reviewed-by: Mysti Sadler <mysti@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-03-09 17:11:48 +00:00
James Williams 001ecd52e1 copy nil values for quiz hide_results
test plan:
* have a quiz in a course with "Let Students See their
 quiz responses" checked
* copy it into another course
* uncheck the setting in the original quiz
* re-copy the quiz into the same course
* it should uncheck the setting in the copied quiz

(also applies to blueprint courses)

closes #CNVS-39464

Change-Id: I36ae2dd514b466404efede9714770c07041ca75c
Reviewed-on: https://gerrit.instructure.com/127345
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2017-09-27 19:03:56 +00:00
James Williams b8eb9b04d2 call translated license names in a lambda
Change-Id: Ibdbca9847de64e79f472df8d3ff886e3b9c4a4ba
Reviewed-on: https://gerrit.instructure.com/122503
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-08-14 13:03:04 +00:00
Jeremy Stanley 459337cecd propagate removal of due/available dates in blueprint sync
test plan:
 - ensure that if due or availability dates are removed
   from a locked assignment, quiz, or graded discussion topic,
   dates will be removed from the associated courses'
   copies of the items after sync
 - ensure that in a normal course copy, if you copy an item
   to a new course, remove dates from the source item, and
   re-copy, the dates are _not_ removed from the target
   course's copy of the items

fixes MC-214

Change-Id: I98440491127c404e898bcff3970dedebc8939014
Reviewed-on: https://gerrit.instructure.com/112157
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-05-23 15:34:53 +00:00
Landon Wilkins f1359d33e2 da licença part 27
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I331826e3e3be8b7d73bbf4f6afe3a79ec1340f54
Reviewed-on: https://gerrit.instructure.com/110051
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:53:31 +00:00
James Williams a81d6c3852 master courses: restrict assessment questions and banks
treats questions as part of bank content

TODO: extend to quiz questions

closes #MC-19 #MC-22

Change-Id: Ib3e142832772958495c305e7151c191c2cba2d57
Reviewed-on: https://gerrit.instructure.com/97816
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-12-28 15:09:50 +00:00
James Williams 85ce1a971d master courses - use new shard-aware migration ids
maybe this is totally overkill but whatever
it'll put my mind at ease about conflicts in the future

also we can hack this later if we want to make
content exports for future courses shard-aware too

Change-Id: I1568e47ec1037d6e7554e7ccb0ea80965842db49
Reviewed-on: https://gerrit.instructure.com/96482
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-12-05 16:15:54 +00:00
Christian Prescott 9598a09fd5 Include overridden dates in AssignmentOverride course copy
Just copy all the date attributes of the override. Probably should have
been this way in the first place.

refs CYOE-390

Test Plan
1. Apply the Mastery Paths override to an assignment, discussion, or quiz
2. Copy the course or import the assignment.
3. Ensure the copied assignment still has the MP override and its due
   date if it has one.
4. Ensure the copied assignment appears in the assignment show page's due
   dates table.

Change-Id: I7d1277e270d0b7d64748cac4257de1cf02663428
Reviewed-on: https://gerrit.instructure.com/95456
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
2016-12-01 21:09:33 +00:00
Jon Willesen c51b101e98 don't show module locked discussion on index page
fixes CNVS-31042

test plan:
- create and publish some discussion topics
- lock some of the discussion topics via a module various ways
- students should not see the topics that are locked for them on the
  discussions index page
- teachers should still see all the topic in the discussions index page

Change-Id: Ie6cc27c2539e5a915ce9243318f5505a04fb1e82
Reviewed-on: https://gerrit.instructure.com/91922
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2016-10-24 14:56:18 +00:00
Christian Prescott a978231f74 Add "Mastery Paths" AssignmentOverride
refs CYOE-310

Implement Noop AssignmentOverride set_type to persist a setless "tag"
Add MasteryPaths noop override to assignment, discussion, quiz edit
Add only_visible_to_overrides to Assignment copied attributes

Test Plan
1. Edit an assignment. From the "Assign to" dropdown select "Mastery
   Paths."
2. Ensure "Everyone Else" override is removed from Assign to.
3. After saving, ensure the assignment is no longer visible to students.
4. Ensure adding other overrides (section, student) alongside MP allow
   visibility as expected.
5. Ensure MP override is available and works as expected for other
   "assignment types" including quiz and discussion.
6. Ensure when an assignment with the MP override is copied or imported,
   its MP designation remains intact. (But any individual or section
   overrides do not)
6. With the Mastery Paths feature flag disabled, the option should not
   appear in the dropdown. If the flag is turned off, the MP override
   should disappear but the assignment should stay invisible to students
   until "Everyone" is added back again. If the flag is turned back on,
   MP should reappear.

Change-Id: I17ac8345f872c111d073886c23bd7a3dd9b5dbce
Reviewed-on: https://gerrit.instructure.com/91833
Tested-by: Jenkins
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-10-17 17:07:33 +00:00
James Williams a5726de41c copy "answer with precision" in numerical questions
test plan:
* create a numerical quiz question using the
 "answer with precision" answer type
* copy the course
* the new question should be copied correctly

closes #CNVS-32279

Change-Id: I5e2298f5318d8467d593d1c19d0db748e7092614
Reviewed-on: https://gerrit.instructure.com/91732
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-10-06 19:43:49 +00:00
James Williams 65d3249d9b extend external content migration framework for selective export
closes #CNVS-30349

Change-Id: Ia9e314f6495cf89127cf55ad38a28c5dc1791d10
Reviewed-on: https://gerrit.instructure.com/84594
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-07-08 16:07:06 +00:00
James Williams 93ba139e31 fix copied references to folders named "course files"
test plan:
* create a folder named "course files"
* add a file
* add a link to the file in html content
* copy the course
* it should copy the link correctly

closes #CNVS-27314

Change-Id: I3ff9a800ec2e19f9548b9ca0935b5ed920ba49ef
Reviewed-on: https://gerrit.instructure.com/72491
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-22 13:53:57 +00:00
Matthew Berns 4eb43afc2f remove unpublished items; apply rules for locked modules
closes CNVS-24830
closes CNVS-24776

- Adds `module_locked` field to export data for assignments, discussion
  topics, quizzes & wiki pages.
- epub converters updated to exclude module locked content.
- wiki page epub converter updated to exclude unpublished pages (woops).
- module epub converter updated to exclude unpublished modules.

test plan:
- have a course with some unpublished items and locked modules
- for full testing, make 5 locked modules, 2 time locked, 2 prerequisite
  locked, and one locked by both
- have one of the time locked modules have an unlock date that has
  already passed, have the student fulfill the requirement for one of the
  prerequisite locked modules
- export one ePub as a student and one as a teacher
- unpublished items should not appear in either ePub
- modules should all appear as unlocked for the teacher
- modules should be locked as appropriate for the student
- items that should be in the syllabus but in a locked module should still
  be in the syllabus, but not linked to
- items that are in locked modules should have their titles listed in the
  modules content, but the items themselves should not be in the ePub
  and the titles should be plain text instead of hyperlinks
- update settings so that content sorting is enabled.
- export one ePub as a student.
- content part of a locked module should not be present in the ePub.

- have a course with unpublished modules.
- export course with module-sorting enabled (the default).
- observe that unpublished modules are not present.

test plan for changes to content exporter:
- using the same course as above, export the course as a course
  cartridge.
- start a new course and import the above course into it.
- observe that all modules are present as expected.

Change-Id: I99394ae4bca251875c7a0cb614c3b1530e1c0f9b
Reviewed-on: https://gerrit.instructure.com/66600
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
2015-11-18 14:51:51 +00:00
John Corrigan 2aaf91a4e1 use Quizzes::ScopedToUser in CC::QTI::QTIGenerator#generate
fixes CNVS-21395

The content export tool is being updated so that it consders the
provided user's rights, so that the CC export can be used for the new
epub generation tool.

This PS employs Quizzes::ScopedToUser to make sure that the user
only gets the quizzes that they have the right to view.

test plan:
- Regression test for content export tool quizzes functionality.

Change-Id: I68d952c794afac35e6fa2fa472538159f275c16b
Reviewed-on: https://gerrit.instructure.com/59498
Reviewed-by: Brian Finney <bfinney@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2015-09-04 19:27:47 +00:00
Jeremy Stanley 01b8bae52d use BigDecimal to compute numeric error margin
test plan:
 - create numeric answer questions with error margins
 - copy the course
 - in the copied quiz, the error margins should match the
   original course (show as 0.0001 and not something like
   0.00009999999999889)

fixes CNVS-19615

Change-Id: Iba9e40f9e37323310e6414794139c68d0f1c061c
Reviewed-on: https://gerrit.instructure.com/51334
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-04-01 18:51:25 +00:00
James Williams 6c00886edd improve qti and course copy warnings
test plan:
* quiz imports and course copying should
 be unaffected

closes #CNVS-19012

Change-Id: I6000fce1d6f08459bb7266c97b9d47424bedc1de
Reviewed-on: https://gerrit.instructure.com/49762
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-03-04 13:51:26 +00:00
Jeremy Stanley 9bf7a20e9d export/import quiz attributes regarding viewing results
test plan:
 0. create a quiz with a limited number of attempts
 1. ensure the checkboxes in the quiz settings section
    "Let Students See Their Quiz Responses"
    are preserved across export/import and course copy.
    in particular:
      "Only once after each attempt"
      "Let students see the correct answers" /
        "Only after their last attempt"

fixes CNVS-18082
fixes CNVS-18200

Change-Id: I050c4c38bc2feb16a2ad3154bd90a9cebc9d7180
Reviewed-on: https://gerrit.instructure.com/47927
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-01-30 23:03:20 +00:00
James Williams 7019733ebb fix question bank de-duping on import
test plan:
* create a course with two question banks with
 the same name, each containing at least one question
* create a quiz with quiz groups that pick from the
 question banks
* copy the course
* should retain two separate question banks, and retain
the quiz groups
* the questions (and number of them) for each bank should
remain the same as the original course

closes #CNVS-14780

Change-Id: I8ed819220021cf965e3ca90206c7096e5bde717c
Reviewed-on: https://gerrit.instructure.com/42392
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-10-23 15:20:11 +00:00
Cody Cutrer 5d42d023d2 no more dynamic finders (lib)
refs CNVS-15126

Change-Id: I4087b1c2442c5b8f70ce2138bf4aeef6ef7e59cd
Reviewed-on: https://gerrit.instructure.com/41259
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-23 16:53:56 +00:00
Jeremy Stanley d518b6f131 exclude grading schemes/assignment groups in selective assignment export
test plan:
 0. have a course containing an assignment with a custom grading scheme
    and named assignment group. also a graded discussion topic in a
    different assignment group with a different grading scheme, and
    a published quiz in a third assignment group.
 1. copy the course. the destination course should copy the assignment
    groups and grading schemes and associate them with the copied objects
    correctly.
 2. repeat step 1, but do a selective course copy, and select the
    assignment, quiz, and topic specifically. you should get the
    same result as in step 1.
 3. use the content exports API to selectively export the three objects
    e.g.,
      select[assignments][]=X&select[quizzes][]=Y&select[discussion_topics][]=Z
    import this package into a new course. the three objects should be
    there, but should not have custom assignment groups or grading
    schemes.

fixes CNVS-14820

Change-Id: I871771284b4a3bbd3695a99a6f2af613d76a8ebf
Reviewed-on: https://gerrit.instructure.com/39914
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-29 19:48:13 +00:00
James Williams 2da43ddf33 keep assessment question and quiz question migration ids separate
fixes a difficult-to-reproduce problem with export packages
that causes quiz questions to be swapped with other quiz questions
that happen to have the same db id number as related assessment
questions

fixes #CNVS-14365

Change-Id: I0d7ccfd6bf4f3ef10169443ca4e994dcc935f053
Reviewed-on: https://gerrit.instructure.com/38043
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>
2014-07-24 14:21:15 +00:00
Jeremy Stanley cb10625dcc export CC 1.3 assignment extension
test plan:
 - have an assignment in a course that has points possible
   and submission types
 - use the content exports API to export the course,
   supplying the currently undocumented parameter
   version=1.3
  a) examine the exported XML and verify that it follows
     the IMS standards
     http://www.imsglobal.org/cc/ccv1p3/AssignmentContentType.html
     http://www.imsglobal.org/cc/ccv1p3/CCv1p3Variantguidelines.pdf
  b) ensure the exported course re-imports correctly

fixes CNVS-13503

Change-Id: Iad8a54e94696962d362cfdb48fe03e06a90937ff
Reviewed-on: https://gerrit.instructure.com/36283
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-01 14:41:37 +00:00
James Williams abf9d8f0cd assessment question bank migration content selection
test plan:
* should be able to select question banks and quizzes
 separately for migrations in any combination, for
 any package type

closes #CNVS-8526 #CNVS-13333

Change-Id: I566ab00f906369c3c28848b9d8985e7965378d1d
Reviewed-on: https://gerrit.instructure.com/35354
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-06-05 19:56:03 +00:00
James Williams 1d7f77d4fc export canvas meta data in qti exports
test plan:
* create a quiz with a description
* export the quiz in a qti export
* import into another course
* should retain the description

fixes #CNVS-8852

Change-Id: I454db916692b6bc58b908322301d5956c99d9901
Reviewed-on: https://gerrit.instructure.com/34886
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>
2014-05-20 12:35:36 +00:00
Joshua Simpson ae814421e0 namespace all of quiz into quizzes module
This commit namespaces the rest of quiz related code into a Quizzes
namespace: controllers, views, models, and classes that previously lived
under lib/ that are Quiz-related.

Test plan:

Full regression test on all quiz related items

refs CNVS-10457

Change-Id: If54b61213945056539e03271a936d233abb66188
Reviewed-on: https://gerrit.instructure.com/29351
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-02-18 22:17:13 +00:00
Luis Camargo bdbcc1dd57 add support for respondus monitor
Adds the require_lockdown_browser_monitor and lockdown_browser_monitor
data Quiz attributes and makes them accessible through the Quiz API.

Test Plan:
 * With lockdown browser enabled:
 * Should be able to read/set lockdown properties through quiz api:
   require_lockdown_browser, require_lockdown_browser_for_results,
	 require_lockdown_browser_monitor, lockdown_browser_monitor_data
 * if use_lti_tool plugin setting is set (enabled in different commit)
   then the LB options are hidden in quizzes UI

closes PLAT-291

Change-Id: Ic45a4946d5632a01f32709b76ce2907b1141f351
Reviewed-on: https://gerrit.instructure.com/29648
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-02-10 16:33:21 +00:00
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
Brian Palmer 3fbb9a6574 fix typo in module definition
Change-Id: I9d1eef6b423f81c4ce1e471e95d3cb5c1f0fa6ae
Reviewed-on: https://gerrit.instructure.com/24574
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
QA-Review: Brian Palmer <brianp@instructure.com>
2013-09-23 15:57:26 +00:00
James Williams b993954788 enable import/export with file_upload_question types
test plan:
* Enable the file_upload_question type for
 the root account in the console:
 > a = LoadAccount.default_domain_root_account
 > a.settings[:file_upload_quiz_questions] = true
 > a.save!

* Create a course with a question of type
"File Upload Question"
* Copy the course
* Confirm that the course copies successfully
 and that the new question is the same type

closes #CNVS-1158

Change-Id: I99d872ee8557a83647fb2fa1425050c20a4ba518
Reviewed-on: https://gerrit.instructure.com/20013
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2013-04-29 15:57:44 +00: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
Bracken Mosbacker 8109fb48e3 don't fail when exporting a quiz question with no answer
The canvas UI doesn't force you to enter answers for
fill in multiple blank questions, so they sometimes won't
have answers. This allows those to be exported/copied.

Test Plan:
 * Create a FIMB question with no answers set
 * Copy or export/import the course
 * The question should be in the new course in the same state

closes #10357

Change-Id: Ibfe6d0d30c3197b594082e86884dc70e21d5331f
Reviewed-on: https://gerrit.instructure.com/13577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-09-10 14:16:40 -06:00
Brian Palmer 0382fbbdd7 omit deleted questions when exporting question banks
fixes #9816

test plan: create a question bank, add a couple questions, and delete at
least one question. copy the course, verify that the new course doesn't
have the deleted question in the bank, but has the others.

Change-Id: Icdbe4cf4a8a98d04aa755e1f89b0f87538b08023
Reviewed-on: https://gerrit.instructure.com/12908
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-14 12:12:01 -06:00
Bracken Mosbacker b49ef4a950 don't copy deleted assignments linked to topics or quizzes
Test Plan:
 * Create a topic for grading
 * Change it to not be for grading anymore
 * Copy the course
 * There shouldn't be an assignment for the topic

closes #8948

Change-Id: Ieeda35ab22988e8ed173ff25dea76b4cf8b354fe
Reviewed-on: https://gerrit.instructure.com/11652
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-06-20 08:30:34 -06:00
Bracken Mosbacker cc5c877a88 copy text question answers as text not html
If a user had html as answers in their text quiz question
answers it would be copied as html, and thus rendered instead
of showing the desired text

Test Plan:
 * Create a multiple choice question with text answers
 * As the answers do something like: <br />
 * Copy the course
 * The answers in the new quiz should be the same

closes #8771

Change-Id: Ia29fcffe861eef789f99a05e1e8828b2879b7403
Reviewed-on: https://gerrit.instructure.com/11203
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-06-04 13:21:07 -06:00
Bracken Mosbacker b34ced0bcb assignment freezing improvements and fixes
Adds an option to not allow already copied assignments from
being copied again

Assignment groups that contain a frozen assignment can not
be deleted

When an assignment is copied that didn't have the flag set
to be frozen, the copied flag isn't set. This allows the
assignment to be locked in the new course, but still edited

Test Plan:
 * In the plugin settings for assignment freezer check the option to not allow assignments to be copied twice
 * Create an assignment and flag it to be frozen
 * Copy the course, verify it is frozen
 * Try to copy the course again as a non-admin - The frozen assignments should not be copied
 * As a teacher try to delete an assignment group for a frozen assignment. The trash can should not appear
 * Copy an assignment that is flagged to be frozen
 * In the new course, you should be able to set the flag and still edit the assignment

closes #8736 #8549 #8537

Change-Id: Ia3f1be4d5c1b6112507338df7e5a49dd76a5ed7f
Reviewed-on: https://gerrit.instructure.com/10995
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-05-24 15:37:34 -06:00
Bracken Mosbacker 65db1c051d copy attachments referenced in html content when copying course
This only gets files linked to in html content, files referenced
by context modules will come in a different commit

Test Plan:
 * Upload some files to a course
 * reference those files from various html content in the course like wiki pages, assignment descriptions, syllabus body, etc.
 * Copy the course, but do a selective copy and don't select any attachments to copy
 * When the copy is finished the new course should have the referenced files and the html content should appear correctly

closes #8410

Change-Id: If81979b850ef71d06a56b88561e2991fd864e66f
Reviewed-on: https://gerrit.instructure.com/10577
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2012-05-09 10:31:02 -06:00
Bracken Mosbacker 94cd9e34c9 copy all html properties for quizzes
Test Plan:
 * Copy quizzes that have html in the answers
 * The resultant quizzes should have the html

closes #8236

Change-Id: I18efdca6e915aeab2a8d117b49324591289ef824
Reviewed-on: https://gerrit.instructure.com/10314
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-04-25 15:23:07 -06:00
Bracken Mosbacker 6a47fdd990 add referenced question banks to course copy
If a question bank outside of the course was referenced by
a quiz group the export for its quiz would fail. This fixes
that and tries to connect the group to the same bank on the
import step.

Test Plan:
 * Create a question bank on an account and one on a course
 * On a different course create a quiz that has two groups that point to each of those banks
 * Copy the course to a new one
 * The quiz groups should still point to their original banks

closes #8159

Change-Id: Idffb4e7c1ac3d00945d3544a9f0ace4ee241e45a
Reviewed-on: https://gerrit.instructure.com/10119
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-04-18 17:50:30 -06:00
Bracken Mosbacker 5a34ab8854 make a qti-only export type
There is not UI in this commit, it just makes ContentExports
capable of creating QTI-only exports.

A QTI-specific manifest file is created and the HTMLExporter
was adapted to find referenced attachments in html content
so that those files can be exported automatically.

Test Plan:
 * Run a QTI export form the console and check out the resultant content package

refs #7760

Change-Id: Idf7f6a40ea385684ef996fc3e92a07020bb42be2
Reviewed-on: https://gerrit.instructure.com/9940
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-16 14:43:47 -06:00
Bracken Mosbacker a942ede9c6 convert course copy to use export/import functionality
This adds the ability for ContentMigration to copy courses
by exporting to a content package and then importing that
package. For attachments it just creates a new Attachment
object instead of exporting/importing them.

The course copy API did not change.

The endpoints used by the course copy UI did change and this
commit doesn't allow selective copying, it only has the
option to copy everything. Selective copying will come in
another commit.

There are also various bug fixes for export/import

Test Plan:
 * copy a course through the API
 * copy a course through the Content Imports path
 * copy a course through the Copy Cours button on the course settings page
 * export a course

refs #4645

Change-Id: Ie577329ab7caaea8dfb9359542224a1a2657e167
Reviewed-on: https://gerrit.instructure.com/9742
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-02 17:29:01 -06:00
Bracken Mosbacker 37a65cec7c allow selective course exports
Test Plan:
  * There is no UI for this yet, so check the specs.

refs #4645

Change-Id: Ibe159d222ba9a05e2edc4ead5eeb3e48b77c3542
Reviewed-on: https://gerrit.instructure.com/9741
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-04-02 17:28:51 -06:00
Brian Palmer 150491a217 refactor user content rewriters
One in course copy, and one in common cartridge export.

refs #5739

Change-Id: I4ba016f643a22f0cf3f6dbbe6b00dcd7d228a10a
Reviewed-on: https://gerrit.instructure.com/5979
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-10-10 15:05:15 -06:00
Bracken Mosbacker 349eacb763 add assessment importing to common cartridge importer
refs #4153

Change-Id: I60a4e8d88f8d121f8b928564f257819b3bca1d26
Reviewed-on: https://gerrit.instructure.com/5726
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:28:03 -06:00
Bracken Mosbacker b4f08ddf07 improve error handling for course exports
single-item failures don't stop the whole export
all errors are saved to the export object and also
written to the manifest file of the export

Change-Id: Ib92d33c2d205b1f5d09f8d60c5b87bf18abb56ed
Reviewed-on: https://gerrit.instructure.com/4588
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-07-07 10:28:48 -06:00
Brian Palmer 8add06407e don't error on incomplete calc quiz question export, fixes #4643
Change-Id: Ic96d29d5f1cf7b38f7dad3f6ca4c758dc1cc4773
Reviewed-on: https://gerrit.instructure.com/3834
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-05-24 11:52:45 -06:00
Brian Palmer 186fd8486b only export media objects that are used in RTE fields by the export
closes #4388

Change-Id: I24ae7f6dc0fef5c552c7eab43c76533a164b57f9
Reviewed-on: https://gerrit.instructure.com/3312
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-28 07:52:20 -06:00
Bracken Mosbacker d8a300ebeb make sure quizzes with multiple <p> get imported correctly
closes #4376

Change-Id: If1670c4373e2f03439232dbc55d56ce8a1efe732
Reviewed-on: https://gerrit.instructure.com/3267
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-04-26 08:15:34 -06:00
Brian Palmer 9de2e9b9f1 export quiz question names, closes #4374
Change-Id: I8b019dd2a92b9c270be6ca820d79cb81fa8fdef8
Reviewed-on: https://gerrit.instructure.com/3263
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-04-25 23:25:12 -06:00
Bracken Mosbacker 4e47be2c15 allow old quizzes to import unpublished
old quizzes will have an assignment even if they're
not published, this caused them to be published when
imported. This adds the available flag to know whether
the quiz is supposed to be published.

Also added another respondus column to the quiz export

closes #4351
closes #4347

Change-Id: Ic1f42f91dbee422a71e18fd9e627e303eb6ee27c
Reviewed-on: https://gerrit.instructure.com/3238
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-04-25 08:37:32 -06:00