Commit Graph

25095 Commits

Author SHA1 Message Date
Brian Whitmer d91eebfca4 module progressions for files not working
If a teacher said students must view a file before
continuing, then the system needs to be sure to
mark the file as viewed whether it's actually downloaded
or just viewed inline.  This wasn't happening
correctly.

Also DRYed up a few methods in the files controller.

fixes #4035

Change-Id: I5ed6fa6e556ed78d85319f99fe84ddee0b4d2033
Reviewed-on: https://gerrit.instructure.com/2640
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-15 14:04:49 -06:00
Brian Whitmer 2a5976b20b don't let question names be blank
fixes #4027

Change-Id: Ic1d590daf29ed5972c689de5554c68cf5c7b43cd
Reviewed-on: https://gerrit.instructure.com/2624
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-12 21:26:51 -07: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
Zach Wily 69ce189b3b redirect external server output correctly
Change-Id: If27f27fd3337b5566c0ccfde0de87cac3003052e
Reviewed-on: https://gerrit.instructure.com/2621
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-11 16:38:13 -07:00
Zach Wily c22428a232 allow a different browser to be specified in selenium config
Change-Id: I8d9fded2a14aae0ceaa9b5f2cd9e27872c3026fc
Reviewed-on: https://gerrit.instructure.com/2613
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-11 12:15:54 -07:00
Zach Wily 5d05c6e539 send server output during selenium tests to log file
Change-Id: Ic2e53ab581e665bf2c1b42ed8653280089d0db46
Reviewed-on: https://gerrit.instructure.com/2612
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-11 12:15:44 -07:00
Brian Palmer c863ea32a2 fix integration specs in plugin spec_canvas dirs
Something about the way we were loading them before caused them to
not have the integration methods like get() and post() available. By
loading the base dirs and letting rspec auto-discover the files under
each base dir, we get better behavior.

Change-Id: Ice3a163ddb2311a02f3c125773b6ab05a0895814
Reviewed-on: https://gerrit.instructure.com/2592
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-03-10 09:44:05 -07:00
Paul Strong 17e8f969f9 Fix user account associations not being updated properly on rare occasions.
User account associations were not being updated properly when updating pseudonym accounts multiple times.

Without this fix user account association updating breaks when the pseudonym account gets updated multiple times in a row
For ex.

    pseudonym.account = account1
    pseudonym.save
    pseudonym.account = account2
    pseudonym.save

 After running the code above the update_user_assocations code would update the user association to point to the first account instead of the second account.

Change-Id: I0f2666458cd9b1e54afb52d26e2b4ec858dccd26
Reviewed-on: https://gerrit.instructure.com/2589
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-09 16:34:08 -07:00
Brian Palmer f846e8b71e concrete support for http basic auth, specifically for the API
closes #3956

Change-Id: I8743aecef7126122ba57c06c8469300c5bc08ac7
Reviewed-on: https://gerrit.instructure.com/2536
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-03-09 10:13:00 -07:00
JT Olds 65b6f07050 add cross-listed account id to associated course accounts
Change-Id: I2d54baf24c704825a23be3d3c33d2a2d1da28462
Reviewed-on: https://gerrit.instructure.com/2517
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-03-09 09:24:53 -07:00
JT Olds b69ae6e248 fixing direct-to-s3 tests - requires a separate server process
or an attachment.rb/attachment_fu rewrite. this is easier

Change-Id: I1140e089671bbefb973cef5a0859976ef367d802
Reviewed-on: https://gerrit.instructure.com/2499
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-03-04 13:24:47 -07:00
Ryan Shaw d46070e330 switch to using selenium 2 (webdriver)
local file storage tests work, s3 tests fixed in
https://gerrit.instructure.com/2499

Change-Id: I1281be4343d4fe554733db3519a90e0f88bbd545
Reviewed-on: https://gerrit.instructure.com/2446
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-04 13:24:40 -07:00
Brian Whitmer 974745822b don't allow deleting an assignment group that still has assignments
if you try to delete an assignment group that still has
active assignments in it, it'll pop up a dialog where you
can choose either to delete the assignments in the group
or move assignments in the group to another group.

fixes #3403

Change-Id: Ie7bc0617ac5b639c946e347950e7d550b27ca384
Reviewed-on: https://gerrit.instructure.com/2495
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-03 11:05:33 -07:00
Brian Palmer ba20f27352 optimize get_all_pertinent_contexts, especially for /calendar
By scoping the finds to the user, we can avoid a lot of grants_right
lookups and the associated db queries. This is especially helpful for
users who belong to a lot of groups or courses.

Change-Id: I31e22ecddf9456734d6c1297d776a8353e43a526
Reviewed-on: https://gerrit.instructure.com/2486
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-03-01 14:45:04 -07:00
Brian Whitmer 41c9f12988 enforce term/course/section start and end dates
before we were recording these values but not doing
anything about it.  This commit starts scheduling
delayed_jobs to activate/conclude enrollments
in the background when dates pass.

it does not conclude/publish courses/sections
automatically, though.  if we want that to be
automated based on dates then I think we should
do that in a separate commit.

fixes #3356

Change-Id: Id94356fbc5b82196dd041fdb250607a7633cee9f
Reviewed-on: https://gerrit.instructure.com/2431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-03-01 13:47:12 -07:00
Brian Whitmer 98c6d03cc9 speed improvements for files page
there's was a lot of unnecessary database calls going
on, should be a little faster now.

fixes #3939

Change-Id: I9a43e0d801bc632d16248ad92b7c9ff16d1673eb
Reviewed-on: https://gerrit.instructure.com/2484
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-03-01 13:21:03 -07:00
Jon Jensen 86b062bf61 wimba integration, fixes #2989
added wimba web conferencing support, moved dimdim config into plugin
settings, fixed a few web conferencing ui issues

Change-Id: I6b36b0e594a9f296d14cd35bec02186478bcbd13
Reviewed-on: https://gerrit.instructure.com/2343
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-25 14:35:14 -07:00
JT Olds bedb1d878e fix default host for tests
Change-Id: I88b59c05a39803c95e3d306b9f47b7ef0450d4c8
Reviewed-on: https://gerrit.instructure.com/2429
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-24 17:11:18 -07:00
JT Olds 77b31810c6 hide wiki pages marked hidden from students
closes #1865

Change-Id: I582d566fd83575e70502dd682ca0347a436e194c2
Reviewed-on: https://gerrit.instructure.com/2422
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-24 10:12:41 -07:00
Brian Palmer 4115014102 deliver messages to all recipients in one job, closes #1
If any individual message delivery fails, we'll reschedule it as its own
individual job.

Change-Id: I51ae5941fd001c61e6c6b708185ff12585d0a49f
Reviewed-on: https://gerrit.instructure.com/2390
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-22 16:23:58 -07:00
Brian Palmer 250d846d66 more selenium config options, and run the web server in-process
Change-Id: I08b31b89951ebc9328836ee75c4a943ab8d4010d
Reviewed-on: https://gerrit.instructure.com/2358
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-22 10:37:29 -07:00
JT Olds 148e66ac68 supporting designer/observer imports and make course_id optional
now one of course_id/section_id is required for enrollments, but not both

Change-Id: I4ebd19ac05988bf3eeffcb846d8bc1fafce73b40
Reviewed-on: https://gerrit.instructure.com/2316
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-18 13:25:29 -07:00
Bracken Mosbacker 840f365981 added undated assignments to assignments index page
closes #2187

Change-Id: I53d71c4c99a4889b7fb4f4736637dc166aad5e8f
Reviewed-on: https://gerrit.instructure.com/2319
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-16 15:17:17 -07:00
Brian Whitmer 8035e390f4 add observer role to csv import
and add a new column for linking it to a user

refs #3315

Change-Id: I8333a0530bb2da5557385bf30f45cdd56b5eb261
Reviewed-on: https://gerrit.instructure.com/2266
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-16 13:49:18 -07:00
Brian Whitmer ee56f631b9 revising conferences open/closed logic
this logic didn't make sense to me, and it was obviously
broken, so I rewrote it.  These are the new assumptions
for web conferences:

- when the first participant joins a conference, we set
  started_at, start_at and end_at
- once nobody is using the conference anymore and end_at
  has passed, or it is more than 15 minutes past
  end_at, we set ended_at
- if ended_at is set and has passed, the conference is
  considered closed
- if ended_at is not set and a user tries to join an
  inactive conference, don't let them unless they're
  authorized to resume the conference
- conferences are resumable by those with permission, but
  only until the end_at date, after that it's all over

fixes #3827

Change-Id: I3f7474c314a99f0fd5a2b7f9222216d2fc3168a1
Reviewed-on: https://gerrit.instructure.com/2304
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-16 10:54:47 -07:00
Brian Whitmer 96e57d560a make sure parent observers can see linked student grades
refs #3315

Change-Id: I6cd929384d7a3da4b8fc0f865508b880f6631e56
Reviewed-on: https://gerrit.instructure.com/2264
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-02-11 23:35:53 -07:00
Brian Whitmer 15f6d0e1b8 ip filtering for quizzes
Teachers can specify an IP filter for a quiz, which
means students are only allowed to take the quiz
when their current computer's IP address matches
the specified filter.  The initial request to start
taking the quiz and any subsequent requests to
backup or submit the quiz attempt must all come
from a valid IP address.

Admins can pre-define named filters
so that teachers don't have to manually enter
filters all the time.  They can instead find them
from a provided list.

Change-Id: I59b6d8ddd31409fc9bd150ed695935ad2f458f86
Reviewed-on: https://gerrit.instructure.com/2167
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 22:16:47 -07:00
Brian Whitmer 89f5934bae quiz moderation
- added a moderation link on the quiz page
- moderators can see current quiz results for students
- moderators can add time to a current quiz attempt
- moderators can manually unlock a quiz for a student,
  which means the student can take the quiz even if
  it's locked for everyone else
- moderators can give a student extra time for every
  subsequent attempt of a quiz
- moderators can give a student extra attempts on a quiz
- moderators can also update these settings for multiple
  students at the same time

Change-Id: I31c34097fc6e19d8c6e377a6059568e591ffbab8
Reviewed-on: https://gerrit.instructure.com/2166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-11 22:08:42 -07:00
Brian Palmer d8f9ee6174 revert an explicit permission to the proper default
In /accounts/*/role_overrides

The value was being saved correctly, but the UI was incorrect and super
confusing. It'd always show a bold "explicit" green checkmark, rather
than the semi-transparent check/cross depending on the actual default.

refs #3711

Change-Id: Ide0a0603b6c820ea0ec94646c4327239d980b09c
Reviewed-on: https://gerrit.instructure.com/2194
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 12:54:21 -07:00
JT Olds dc1cc82a9c test file uploads from homework submissions page
Change-Id: Ifdaf61db104cf06f9edfbdc80eca6133a258886a
Reviewed-on: https://gerrit.instructure.com/2101
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:20 -07:00
JT Olds f39cab0237 discussion page file upload selenium tests
Change-Id: I77c8a4e3b292e0eb32a145aa0b59322e7939b92a
Reviewed-on: https://gerrit.instructure.com/2100
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:50:13 -07:00
JT Olds ba735d41b6 direct-to-s3 server side changes
Change-Id: Ie7b415b84f403c98d82f0e67212ae2e7b051b67d
Reviewed-on: https://gerrit.instructure.com/2096
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-11 10:49:47 -07:00
Brian Palmer e693c6ebba make the "remember me" cookie httponly, fixes #3763
Change-Id: I1d7a0eab74c23dbdb4dfdca186b73009dc6aeb6d
Reviewed-on: https://gerrit.instructure.com/2230
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-10 10:05:06 -07:00
Brian Palmer 87b37e72d4 flush the role_override cache on each request, fixes #3711
Once we're storing these permissions caches in a shared memcache
cluster, we can flush them only when they've actually been invalidated.
But until then, we have to flush on each request, in case a role
override was changed on a different app server.

Change-Id: I4479605b96a4fcf36a686033939be4a158aa9699
Reviewed-on: https://gerrit.instructure.com/2224
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-02-10 09:52:24 -07:00
Brian Palmer 6fad15dd0e undefine Spec::DSL::Main#context
We check responds_to?(:context) on many objects in our app, to duck type
context-owned objects. So in test mode when rspec is loaded, this causes
a lot of issues since every object ends up responding to :context.

Change-Id: I97f804e696e0e553b6fc7ef9b0700d0bdea7e9b2
Reviewed-on: https://gerrit.instructure.com/2221
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-09 13:57:32 -07:00
Brian Palmer a043962097 fix time zone issues in specs
Change-Id: I32082cfd4f7686d9a9c20d6cc7ecff1e68de2c96
Reviewed-on: https://gerrit.instructure.com/2207
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-08 14:12:17 -07:00
Bracken Mosbacker 8efe72a0d7 cleaner external urls when importing
This also prevents blank wiki pages from being created
when there are unsupported import types

closes #3739

Change-Id: I6c1aa7f34de07db83d6c45d134c5e967dc7506d9
Reviewed-on: https://gerrit.instructure.com/2195
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-02-08 13:31:34 -07:00
Brian Whitmer 6ee9726e56 assignment grading fixes
- if you change the points possible for an assignment, the
  'grade' column for submissions is no longer accurate.
  This fix makes sure the grade column stays up to date (but
  does not update any old versions of the submission)
- if you have a letter grade assignment, we should accept
  lowercase versions of the grade if there's not an exact
  match.

Change-Id: I6277c9a216e23bd068fc0381cac1da2e9d718d1a
Reviewed-on: https://gerrit.instructure.com/2193
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-02-08 12:59:57 -07:00
Brian Palmer ad438b6234 add the default enrollment term on root acct creation
fixes #3730

Change-Id: I912f1381eeb0e8eba0ac4869f37e655e3f25b4bb
Reviewed-on: https://gerrit.instructure.com/2186
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-08 12:47:42 -07:00
Brian Palmer d8e0e10a13 retain the grade if another submission API PUT is made without one
fixes #3718

Change-Id: I04868f68defcccf11cc51a40ca65047a2e38d935
Reviewed-on: https://gerrit.instructure.com/2169
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-04 15:54:18 -07:00
Brian Palmer 663ed5bf86 don't return deleted assignments in the assignment group API
fixes #3709

Change-Id: Ie684cc868454215941363959e0bfac9be4d90860
Reviewed-on: https://gerrit.instructure.com/2161
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-04 13:56:13 -07:00
Brian Palmer e1b6f066b4 improved auto-linkification of text fields, refs #3706
Change-Id: I6ffe2f4f946b551c527eeb4249dfff959f77a22e
Reviewed-on: https://gerrit.instructure.com/2154
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-04 12:10:27 -07:00
Brian Palmer 4f38867a4b only infer the due at on assignment/quiz creation, fixes #3698
Change-Id: Id0336ba184dc80dca7c3a41aef62ffb0d66cdc75
Reviewed-on: https://gerrit.instructure.com/2143
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-02-03 13:15:15 -07:00
JT Olds f0b9d21cfd fixing broadcast mailboxes and corresponding tests
Change-Id: Ic0c064379198b6eeb985c6771d03c8fdbebcf746
Reviewed-on: https://gerrit.instructure.com/2117
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: JT Olds <jt@instructure.com>
2011-02-01 17:36:33 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00