Commit Graph

40 Commits

Author SHA1 Message Date
Michael Nomitch de759895db added 255 character max title length to rubric in model
fixes CNVS-7136

Change-Id: I021afc50ba7c1d16e2d4c45276c3503b3c1e6a71
Reviewed-on: https://gerrit.instructure.com/26814
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Mike Nomitch <mnomitch@instructure.com>
2013-12-02 23:52:22 +00:00
Jacob Fugal 9b3bfbfeef avoid :conditions argument to find, count, etc.
use arel's where() instead. use of :conditions in has_many/has_one
remains, and a small handful of cases where rails2 sharding needs the
conditions in the find.

also, cleanup distinct_on() to only allow the :select/:option values it
works with directly; other finder options should be scoped in before the
distinct_on call.

fixes CNVS-8754

test-plan:
 [1] communication messages API
 - fetch /api/v1/comm_messages?user_id=self as a non-siteadmin; should
   not error, should include the expected messages

 [2] course roster
 - load /courses/<id>/users
 - invite a new student to the course; do not have that student accept
   the invitation
 - reload and open the web console; ENV.courses.pendingInvitationCount
   should be 1

 [4] list enrollments API endpoint
 - full regression

 [5] list conversations API endpoint
 - fetch /api/v1/conversations; should not error, should include the
   expected messages

 [6] rubrics
 - create a rubric with title "Example Rubric"
 - create a second rubric with the same title; title should be changed
   on save to "Example Rubric (1)"
 - repeat to get "Example Rubric (2)"

Change-Id: I411676285348653044696d850efacf2e1a9e6585
Reviewed-on: https://gerrit.instructure.com/24996
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2013-10-14 19:29:27 +00:00
Cody Cutrer 419877ff9d clean up sorting all over
* use sort_by instead of sort where possible to avoid repeating yourself
 * use new SortFirst/SortLast sentinels to avoid strange magical constants
 * fix a few places of complicated logic for tiered sorting to just use
   an array

Change-Id: I184ef0b4e31fa18294c9beb32770101d383bbea1
Reviewed-on: https://gerrit.instructure.com/24867
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-02 21:38:08 +00:00
Cody Cutrer 266a89e7db use unicode sorting for ruby and db stuff
fixes CNVS-7199, CNVS-4414

abstract some ICU stuff out to Canvas::ICU, and add some missing
functionality in FFI-ICU

test plan:
 * create a bunch of groups in the same category, named 1-10.
   10 should sort after 9, not 1
 * repeat for creating and publishing quizzes *with the same due date*.
   go to the quiz index, and 10 should sort after 9, not 1

Change-Id: I323eb12dfb5bd23dbcbb3b543fa1b90a72f4341b
Reviewed-on: https://gerrit.instructure.com/24732
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2013-10-02 21:38:03 +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
Simon Williams a8fb912d02 update all rubric associations when data changes
fixes CNVS-7745

test plan:
- create a rubric with and outcome and add it to an assignment
- verify that both the rubric and assignment are aligned to the outcome
- from the course rubrics page, remove the outcome from the rubric
- verify that both the rubric and assignment alignments were removed
- quick regression around delete rubrics from different contexts

Change-Id: Ibfca5df68423a5a81e1ef2c73920d2e932c463d6
Reviewed-on: https://gerrit.instructure.com/23871
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-08-30 21:28:25 +00:00
Simon Williams 26214e33a4 fix existing out of sync outcome alignments
fixes CNVS-7620

test plan:
- NOTE: before apply this patchset
  * create some rubrics with and without outcomes attached to assignments
  * remove some of them
- after applying this patchset, the active ones should still be active, and
  the deleted ones should still be deleted.
- if you had old alignments that should have been deleted, but where not, they
  should now be deleted (it's difficult to get them to test, at this point)

Change-Id: I813e083357a99a38eb22611b5b5848fbf9525156
Reviewed-on: https://gerrit.instructure.com/23475
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-08-23 23:27:09 +00:00
Simon Williams 147d171aa1 correctly maintain assignment/rubric <-> outcome links
There are a few old LearningOutcomeResults that have a nil artifact, and
many that have a Submission as an artifact.  We want to get rid of these
because they come from bad data, and step 1 toward that goal is to stop
creating them and hide them in the UI.

The LORs with a nil artifact are very old and I believe came from a very
early incarnation of outcomes.  The LORs with a Submission as an artifact
came from a combination of two code problems.  The first was old code
that allowed an assignment that was aligned with an outcome but did not
have a rubric to create LORs directly based on it's submission.  The
second was a bug that prevented the assignment <-> outcome link from
being destroyed when a rubric with an outcome was removed from an
assignment.

fixes CNVS-7495
fixes CNVS-7498

test plan:
- try different combinations of adding a rubric with an outcome to an
  assignment.
- when you grade the assignment, the grade create a learning outcome result
  (which can be seen on the outcome show page, or in the account outcome
  report) if the rubric+outcome are currently attached to the assignment.
- so for example, add a rubric with an outcome, check, remove just the outcome
  row, check, add a new outcome row, check, remove the whole rubric, check.
- be sure to check both the show page and the outcome report

TODO:
- datafix migration

Change-Id: I37700e3e5c08fc6cfb8fcf1cac42ea6693fcaba3
Reviewed-on: https://gerrit.instructure.com/23303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-08-20 22:40:01 +00:00
Cody Cutrer 5254bfc09d clean up some rubric assessment requests stuff
refs CNVS-7414

first, start at RubricsController#assessments. there is no route for it,
so remove the action and it's view. The rubric_association partial was
only used from that view, so remove it as well. Then in
RubricAssessmentController and RubricAssociationsController #create,
note that nothing ever provides an invitations param, so remove that,
and cascade down to removing or simplifying a few other methods
(particularly RubricAssociation#invite_assessors, which created users
in a bad way, and RubricAssociation#invite_assessor, which never
assigned assessor_asset, which will shortly be non-null, and is
obviously never used cause that column is never null in production).

Finally, fix some specs to properly create rubric assessments since
the (bad) helper methods are now gone.

test plan:
 * specs
 * basic regression test around using rubrics for grading and
   peer reviews

Change-Id: Ibd7713d9fc1f847d49c47b95d8c51ce28fa41e92
Reviewed-on: https://gerrit.instructure.com/23412
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-08-20 17:34:36 +00:00
Simon Williams 07fbf664a4 don't allow editing rubric rows linked to outcomes
fixes CNVS-1789

test plan:
- create an outcome
- create a rubric with two rows, one normal and one linked to the outcome
- save, and then edit again
- you should be able to edit the normal one but not the linked one

Change-Id: Id8a99dab45bf1cc79cc51957de9ce527bd819265
Reviewed-on: https://gerrit.instructure.com/23073
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2013-08-08 22:55:35 +00:00
James Williams 4a8328927b preserve account-level rubric associations on course copy
test plan:
* create an account level outcome
* create an account level rubric
* attach the outcome to the rubric

* in a course, attach the rubric to an assignment
* copy the course
* check the new assignment in which you linked the rubric to
  the outcome was carried over, and the association with
 the account-level rubric should be preserved,
 (and by extension the association with the learning
 outcome)

fixes #CNVS-4200

Change-Id: I0bfa11124d599ca1a96ed3b6e684b966974e397b
Reviewed-on: https://gerrit.instructure.com/21548
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2013-06-19 19:23:48 +00:00
James Williams 6b3bde6df3 fix and refactor content migration issue messages
test plan:
* import a package containing an item that is
 invalid so it will create a
 "Couldn't import the" item warning, but also
have an extremely long title (~250 characters)
(an example is attached to the ticket)
* confirm that when trying to import,
 the entire migration does not fail silently,
 and thus hang in the import phase,
 but instead creates a proper migration issue
 for the invalid item and continues the import
 normally

fixes #CNVS-5467

Change-Id: I2659ac0c5531ad609f3f58abc1fc0960e9d85c51
Reviewed-on: https://gerrit.instructure.com/19961
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-04-26 21:33:24 +00:00
Cody Cutrer 8c94e53dc7 arel-ify scopes
s/named_scope/scope/g

refs CNVS-4707

Change-Id: I930d229fc9985c7c0096a0f4888933addd4f3aee
Reviewed-on: https://gerrit.instructure.com/18834
Reviewed-by: Duane Johnson <duane@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 21:57:16 +00:00
Cody Cutrer d9111f5414 arel-ify models
closes CNVS-4707

Change-Id: I32c8ec5a53525f89cf232890eaac790fbc2b4744
Reviewed-on: https://gerrit.instructure.com/18745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2013-04-01 18:42:38 +00:00
James Williams 2c97618f78 create separate permission for managing rubrics
creates new permission :manage_rubrics, which was
previously a subset of the rights in :manage_grades

test plan:
* confirm that a new permission for
outcomes and rubrics is available in the ui
* confirm that this permission restricts the
creation and editing of rubrics

fixes #CNVS-266

Change-Id: I40d108b53e2771890d8fdbb108e1de24364aa055
Reviewed-on: https://gerrit.instructure.com/17763
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2013-03-29 18:27:21 +00:00
Simon Williams cb3576c87f maintain rubric-outcome associations in course copy
the looked like they were being maintained, but the content tag links between
rubric and outcome and between assignment and outcome were not being generated
properly after a course copy.

fixes #CNVS-1274

test plan:
- create and account level outcome and a course level outcome
- in the course create two assignments, with rubrics
- in one, add the course level outcome
- in the other add the account level outcome
- grade a student with the rubrics
- ensure that alignments and mastery look correct
- copy the course
- in the new course grade a different student
- ensure that alignments and mastery look correct

Change-Id: I04c240256f007791613e4f29b8288f1bc7729849
Reviewed-on: https://gerrit.instructure.com/15908
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2012-12-07 17:15:04 -07:00
Jacob Fugal ac3cfe743f Merge branch 'master' into dev/learning_outcome_refactor
Change-Id: I48090d9965442b56eb4d73cbca91dfbf7c18517a
2012-09-17 10:23:26 -06:00
Jake Sorce 346077a819 don't allow too-long rubric titles, fixes #8776
test plan:
  - try to create a new rubric with a title longer than 255 characters

Change-Id: I83f17aafbd6e322132a9af67a10971aff5382d0a
Reviewed-on: https://gerrit.instructure.com/13707
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-09-14 10:22:40 -06:00
Jacob Fugal 976c33ada6 fixup failing specs and add temporary plugin shims
the shims will be removed in a later commit. that commit will need to
wait for the plugins to be fixed before it can be submitted.

test-plan:
 - specs pass

Change-Id: Ifd6e2a254f0272a58d507c845cdae58b7392801c
Reviewed-on: https://gerrit.instructure.com/12798
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-08-22 09:53:19 -06:00
Bracken Mosbacker 9f9e56e362 export/import and copy new outcome functionality
Change-Id: Id3b056dc527af48b08a514e309b7654da95b3829
Reviewed-on: https://gerrit.instructure.com/12705
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2012-08-22 09:52:13 -06:00
Bracken Mosbacker 82d4003320 learning outcomes refactor
This list is *NOT* complete, some items may have snuck in that I forgot
to note, and/or some of the noted items may not be completely functional
yet.

Specs need to be written around a lot of this, other specs will no doubt
need to be fixed.

Some things, particularly around LearningOutcomeGroups will need data
migrations that aren't there yet.

 * remove LearningOutcome.non_rubric_outcomes? and replace with false
   where invoked
 * remove LearningOutcome.enabled? and replace with true where invoked
 * remove never-taken branches
 * remove the shared/aligned_outcomes partial and it's supporting
   javascript, since it's now empty
 * remove js handler for add_outcome_alignment_link and supporting
   method since it only occurred in never-taken branches
 * mix LearningOutcomeContext into Course and Account
 * replace LearningOutcomeGroup.default_for(context) with
   LearningOutcomeContext#root_outcome_group
 * rename LearningOutcome#content_tags to LearningOutcome#alignments
 * rename LearningOutcomeGroup#content_tags to
   LearningOutcomeGroup#child_links, and properly restrict
 * remove ContentTag[Alignment]#rubric_association_id, add
   ContentTag[Alignment]#has_rubric_association? that looks at the
   presence of the content's rubric_association_id
 * condition off the assignment having a rubric_association rather than
   filtering tags by has_rubric_association (which just looks back at
   the assignment). all or none of the assignment's alignments are
   forced to have the association (via the assignment). this was true in
   practice before, is now codified (and more efficient)
 * rename AssessmentQuestionBank#learning_outcome_tags to
   AssessmentQuestionBank#learning_outcome_alignments
 * rename Assignment#learning_outcome_tags to
   Assignment#learning_outcome_alignments
 * rename Rubric#learning_outcome_tags to
   Rubric#learning_outcome_alignments
 * move/rename (Course|Account)#learning_outcome_tags to
   LearningOutcomeContext#learning_outcome_links
 * move/rename Account#learning_outcomes (corrected) and
   Course#learning_outcomes to
   LearningOutcomeContext#linked_learning_outcomes
 * move/rename Account#created_learning_outcomes and
   Course#created_learning_outcomes to
   LearningOutcomeContext#created_learning_outcomes
 * clarify and correct usage of linked_learning_outcomes vs.
   created_learning_outcomes
 * move/rename (Account|Account)#learning_outcome_groups to
   LearningOutcomeContext#learning_outcome_groups
 * remove unused Account#associated_learning_outcomes
 * just remove one link to a learning outcome when deleting
 * merge Account#has_outcomes?, Course#has_outcomes? and
   Course#has_outcomes into LearningOutcomeContext#has_outcomes?, add a
   use in Context#active_record_types
 * kill LearningOutcomeGroup#root_learning_outcome_group (unused)
 * rename LearningOutcomeResult#content_tag to
   LearningOutcomeResult#alignment
 * kill unused (and broken) OutcomesController#add_outcome_group
 * kill unused OutcomesController#update_outcomes_for_asset
 * kill unused OutcomesController#outcomes_for_asset
 * remove unused (outside specs, correct specs)
   AssessmentQuestionBank#outcomes=
 * remove unused ContentTag#learning_outcome_content
 * replace ContentTag.learning_outcome_tags_for(asset) (only ever called
   with asset=an assignment) with call to
   Assignment#learning_outcome_alignments
 * remove unused ContentTag.not_rubric
 * remove (now) unused ContentTag.include_outcome
 * remove unused LearningOutcome#learning_outcome_group_associations
 * avoid explicit use of ContentTag in outcome-related specs
 * replace LearningOutcomeGroup#learning_outcome_tags with
   LearningOutcomeGroup#child_outcome_links (and only use for outcome
   links; not tags for child groups)
 * split ContentTag#create_outcome_result into
   Submission#create_outcome_result,
   QuizSubmission#create_outcome_result, and
   RubricAssessment#create_outcome_result. fix some bugs along the way
 * refactor ContentTag.outcome_tags_for_banks and some code from
   QuizSubmission#(track_outcomes|update_outcomes_for_assessment_questions)
   into QuizSubmission#questions_and_alignments
 * refactor RubricAssociation#update_outcome_relations and
   Rubric#update_alignments into LearningOutcome.update_alignments
 * don't use ContentTag#rubric_association with outcome alignments; use
   the tag's content's rubric_association in its place (they should have
   been equal anyways)
 * refactor LearningOutcome.available_in_context and
   @context.root_outcome_group.sorted_all_outcomes (only time
   sorted_all_outcomes is used) into
   LearningOutcomeContext#available_outcomes and
   LearningOutcomeContext#available_outcome
 * overhaul LearningOutcomeGroup#sorted_content and rename to
   LearningOutcomeGroup#sorted_children. it not returns ContentTags
   (outcome links) and LearningOutcomeGroups, vs. LearningOutcomes and
   LearningOutcomeGroups; fix usages appropriately
 * fix UI for arranging/deleting outcome links and groups within a group
   to refer to the outcome link rather than the outcome

Change-Id: I85d99f2634f7206332cb1f5d5ea575b428988d4b
Reviewed-on: https://gerrit.instructure.com/12590
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2012-08-22 09:51:39 -06:00
Bracken Mosbacker ce12af199d undelete course objects on course copy
If you copied content into your course, then deleted an item
and copied it again it wouldn't be active. It is now.

Test Plan:
 * Create an assignment
 * Copy the course and delete the assignment in the new course
 * Copy the original course into the new one again
 * The assignment should be active

closes #8298

Change-Id: Ief8476d2befff999ed85a35039604d34253bfa1f
Reviewed-on: https://gerrit.instructure.com/10487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-05-07 09:24:14 -06:00
Bracken Mosbacker 961aad6d3b properly handle selective external migration imports
The selective imports mostly worked before, but if a
given section was completely unchecked the previous
code would import it anyway. This fixes that and makes all
the decision code in one place and easy to test.

Test Plan:
 * Import a content package and only choose certain items
 * Only the items you chose should be imported

closes #5528

Change-Id: Ia6c0c1f5f9a44497053733101140cc74d6239129
Reviewed-on: https://gerrit.instructure.com/9799
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-04 12:25:29 -06:00
Simon Williams 22f9590e15 allow multiple rubric associations for grading; fixes #7091
tweak our javascript so that the rubrics controller update method knows that we
want to save the rubric association even if we can't modify the rubric. also
clean up some unused code in the rubric spec that was confusingly named
read_only, but not related to the rubric read_only property.

test-plan:
- create a rubric
- create two assignments that have the same points
- associate the rubric with the first assignment and select it be used for
  grading. make sure it sticks across refresh (and the rubric is not
  duplicated)
- same for the second assignment

Change-Id: I2c32d4da35eff508680f0a19c97cb1111fe4cef1
Reviewed-on: https://gerrit.instructure.com/8981
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-01 14:35:28 -07:00
Cameron Matheson 03238a2851 don't regard deleted rubrics' titles for dup check
fixes #4818

test plan:
- create a rubric
- delete it
- make a new rubric with the same title
- it should not have a '(1)' appended to its title

Change-Id: I984d1e11d634a2426cb30adbbe53c728c5776062
Reviewed-on: https://gerrit.instructure.com/8939
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-02-24 14:42:04 -07:00
Simon Williams 64d687ec87 handle decimal points in rubrics correctly
allow points in rubric criteria and ratings to have decimal values. in working
with brian, we're operating under the following assumptions:
- round to 2 decimal places
- splitting always gives you a integer by default (you can change it yourself after)
- if there's not room to split with an integer, repeat the low value

test plan
- create a new rubric
- change a criterial value to something with a decimal point
- try setting specific ratings with decimals
- try to split between a large space (ie 10.5 and 0), should be 5
- try to split between a small space (ie 0.5 and 0), should be 0

closes #5355

Change-Id: I17e26fe18dda0847fa59dd40976e4d6f38851287
Reviewed-on: https://gerrit.instructure.com/7882
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-01-06 16:34:48 -07:00
Jacob Fugal 1a761c2d1f explicit utc db times in update_all
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.

Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-30 16:46:25 -06:00
Cody Cutrer 7f5cc0693b optimize AdheresToPolicy
Basically, don't call a bazillion procs everytime you check_policy;
just the "given" statement.  Everything else is evaluated just once,
and cached on the class.  This does lose functionality (the ability
to access the instance inside of set_policy, and set methods), but
none of it was currently in use.

Change-Id: I736879d98beb4115a2e8c492931c755076291d08
Reviewed-on: https://gerrit.instructure.com/4665
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-07-14 13:25:28 -06:00
Bracken Mosbacker a1fa31f8ac i18n rubrics
Change-Id: Ia42a5469152c8211345c2a065f6ed098bd2c7eba
Reviewed-on: https://gerrit.instructure.com/4298
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-20 16:44:41 -06:00
Bracken Mosbacker a03dd41895 don't allow single item failures to stop a whole import
Before if any single item had an error the whole import
errored out. This lets items fail and the rest continue to
import. The single item failures are logged as warnings in
the ContentMigration and this allows the user to know what
failed.

All the warnings/failures are also shown on the migration
list page to help admins diagnose problems.

refs #4903

Change-Id: I66b81ce1c243258dfc8c1d7d1381b2ea8daa3e72
Reviewed-on: https://gerrit.instructure.com/4268
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-06-17 12:21:59 -06:00
Jacob Fugal 33ff87ba89 clarify column ambiguities
for some reason, this ambiguity conflict was only showing up when running the
specs under spork. you may want to try that if you can't repro on your own.

Change-Id: I3cd22a1d79aebf6db4e19af1fae8ce41d8fa3cc9
Reviewed-on: https://gerrit.instructure.com/4053
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-06-03 13:40:05 -06:00
Cody Cutrer f774f1a0a7 don't version both saves in a single method refs #4189
Change-Id: Ic406b2d0a29d0c0904d2e9da47acccf6add7cf85
Reviewed-on: https://gerrit.instructure.com/3946
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-05-31 15:53:03 -06:00
Cody Cutrer bdbebfaec8 check all models for protecting attributes refs #3847
Change-Id: I7cba6e26ad98e91723e2ccf0a28b8db79bb37b5c
Reviewed-on: https://gerrit.instructure.com/3631
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-05-25 17:38:50 -06:00
Zach Wily 20092fb2c9 fix more find_by_id cases where we could pass in an empty string
Change-Id: I6bd72dd78f739edac6377f863f298fa14283be38
Reviewed-on: https://gerrit.instructure.com/3299
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-04-27 10:45:09 -06:00
Bracken Mosbacker cf6908801a fixes to make importing a canvas cartridge from ui work
this commit fixes a bunch of problems with importing
a whole export package and updates the UI

refs #3396

Change-Id: Ia344b385e06df2f08bb75878234a7712a036e4b3
Reviewed-on: https://gerrit.instructure.com/3085
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-18 08:09:34 -06:00
Bracken Mosbacker 61771933bb importing more canvas export objects
This imports the syllabus, rubrics, and modules

refs #3396

Change-Id: Ie7802aa5a064f8cee471af9bfe0a23bf224831a6
Reviewed-on: https://gerrit.instructure.com/3064
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-04-18 08:09:28 -06:00
Jon Jensen f745f40073 Merge branch 'master' into dev/postgres
Conflicts:
	app/models/user.rb
	config/initializers/active_record.rb

Change-Id: Idc3b52dad873146efbb9268ecac28cac840f115e
2011-03-22 16:23:04 -06:00
Jon Jensen 4ea607cea4 postgres support and misc bugfixes, fixes #3574, #3943
Change-Id: I16aa188175a588b02dd6460baa83daae805aec9f
Reviewed-on: https://gerrit.instructure.com/2474
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-11 18:01:02 -07:00
Brian Whitmer d6e9f03968 rubrics getting deleted incorrectly
a rubric should only be deleted once it's not
being used anymore.  It should only be unbookmarked
from a given context when it's not being used in
that context anymore.

fixes #3309

Change-Id: Icb8a79baeb0c0ec2195b7e19b1d9768eadfeb97e
Reviewed-on: https://gerrit.instructure.com/2518
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-09 11:29:08 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00