Commit Graph

3238 Commits

Author SHA1 Message Date
Jon Jensen 0f8f0a9340 upgraded mathquill, fixes #7391, refs #6462, #6858
latest mathquill:
 1. fixes copy/paste oddity
 2. reverts broken \left / \right / bracket behavior
 3. implements more commands
 4. various other fixes/features (refer to
    https://github.com/laughinghan/mathquill git history)

test plan:
 1. paste latex into the equation editor (within the subset mathquill
    supports) and confirm that it renders correctly and creates a valid
    codecogs image after you save
 2. type and click buttons in the equation editor and confirm that it
    renders correctly and creates a valid codecogs image after you save
 3. ensure you can still edit previously inserted equations

Change-Id: Ia7a771ec24f3ec691ee313ff359a9f302a462633
Reviewed-on: https://gerrit.instructure.com/9099
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 14:49:16 -07:00
Cody Cutrer 70ca4d3f10 step up transition warning to red
refs #7166

test plan:
 * create user in a non-default account
 * login at the default account with that user
 * should get a red flash telling you to log in at the correct place

Change-Id: I80805b5a08a96b67bc1193a4961aaf90c110eca9
Reviewed-on: https://gerrit.instructure.com/9181
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-03-05 14:43:34 -07:00
Ryan Florence 5642e3a366 require -> define in public/javascripts
Change-Id: I66f37744c278fac29fcf6f8e85326c84512da468
Reviewed-on: https://gerrit.instructure.com/9174
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 14:19:50 -07:00
Cody Cutrer 88adc8df95 do gradebook upload diffing server side
close #6088, fixes #7244

test plan:
 * upload a gradebook with no changes; should show no changes
 * upload a gradebook changing a single score; should only show
   the assignment with the score that changed
 * upload a gradebook with a new assignment; that assignment should
   show
 * upload a gradebook with a changed assignment name, but no score
   changes; should show no changes
 * upload a gradebook with a changed assignment name, and one score
   change; should show assignment
 * upload a gradebook with a name changed, and ids nulled out; once
   matched with the correct user, it should show no changes
 * upload a gradebook with a name changed, and ids nulled out, with
   one score changed; once matched with the correct user, it should
   show only the assignment with the changed score
 * in a course with > 100 students, upload a gradebook with a new
   assignment; it should upload correctly, and only create a single
   new assignment

Change-Id: Id8167a106c302b486c9f5043693975b2d413cc3a
Reviewed-on: https://gerrit.instructure.com/7372
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-05 13:32:46 -07:00
Zach Wily 8e2e48f2fb don't include api urls in hrefs for hiding todo items
test plan:
 * Ensure you can still hide todo items from your dashboard. (There is also an
   existing selenium spec).

Change-Id: Idef5ec52c90d52c8a586f610c167a8cddfe54bbf
Reviewed-on: https://gerrit.instructure.com/9178
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-05 12:49:04 -07:00
Bracken Mosbacker fb68a31dd1 correctly update quiz submisison when changing grade in gradebook
Before only the Submission was being updated and not the
QuizSubmission. Now the fudge points on the current QS are
updated to reflect the score set in the gradebook.

This prevented modules from progressing if the value was
changed in the gradebook.

Because the score set there should be the absolute score,
if the quiz is set to take the highest a flag is set to
prevent a previously-higher score from being the kept_score

Test Plan:
 * Create a quiz with a question with 5 points and publish it
 * Create a module item to to that quiz that needs 10 points to complete
 * Take the quiz as a student, the module should not unlock
 * As the teacher set the grade to 11 in the gradebook
 * The module item should be unlocked for the student

closes #7331 #4174

Change-Id: I30d92bfe865584b5b526cda36ef336348a647de4
Reviewed-on: https://gerrit.instructure.com/9091
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-05 11:48:32 -07:00
Jacob Fugal f8c1bf3af4 loosen spec that didn't play nice with plugins
test-plan: run the spec

Change-Id: I56b7036a81e2f5e8bb566da822fabb3841d4a1f6
Reviewed-on: https://gerrit.instructure.com/9173
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-05 10:43:31 -07:00
Zach Pendleton 30a747995c increase height of swf files on module pages. fixes #5991
change hard height of 500px for swf files to a 600px min height
and change height to 80% of the container to allow larger browser
windows to display larger swf files.

all of this is to hopefully avoid or delay having to determine the
height and width of swf files on upload (because we'd have to read
the swf into memory and store it somewhere and it's nasty).

Change-Id: I6686dd7291e659599e8a84720e1c2717ab60afab
Reviewed-on: https://gerrit.instructure.com/9152
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 10:38:28 -07:00
Simon Williams d03b0adfa8 include concluded enrollments in interaction report; fixes #7024
allow admins to view interaction reports on concluded courses, and include
concluded enrollments in the interaction reports.

test-plan:
- create a course with a concluded student
- should be able to view interaction reports from course user page
- conclude the course
- as an admin, should be able to view teacher activity report for teacher.

Change-Id: I8722ca86a5836da03994db31e5c7753a86516824
Reviewed-on: https://gerrit.instructure.com/9107
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-05 09:43:26 -07:00
Brian Palmer 041c90e6ba fix intermittent spec failure
... i think

Change-Id: If872327a311def6896d9df1ab2afebee6b37659e
Reviewed-on: https://gerrit.instructure.com/9166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2012-03-05 09:11:25 -07:00
Brian Palmer 8fd44dce02 fix displaying of running jobs
test plan: have a job running, visit /jobs, ensure it's displayed correctly

Change-Id: I2b96155f147c08aceef0168abd87a0526773b4b4
Reviewed-on: https://gerrit.instructure.com/9165
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Brian Palmer <brianp@instructure.com>
2012-03-03 10:17:50 -07:00
Jake Sorce 33dbb5834a spec: add selenium spec to calendar2 file refs #6986
Change-Id: Ie4f1c3622dbb0750c52dac49c65dd1ebcfb80c66
Reviewed-on: https://gerrit.instructure.com/9150
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 16:58:38 -07:00
Jake Sorce 2dbfa743b3 spec: add selenium spec to gradebook2 file refs #7540
Change-Id: If672a04e6e6cacf5078ea5d44f29f9f80fe1657d
Reviewed-on: https://gerrit.instructure.com/9140
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 16:58:23 -07:00
Rob Orton fa0f116457 fixes discussion submission submitted_at times for certain discussions
fixes #7319
fixes #7015

if a user deleted a discussion entry an then re submitted one
it would take the date of the original entry

if a teacher made a comment on a no submission and then the
student submitted the entry it would take the date of the comment

test plan
 * create a discussion topic assignment
 * submit two entries as student
 * delete one
 * the date should equal the oldest existing submission
 * create a discussion topic assignment
 * make a comment on a students non existent submission
 * submit the assignment as the student
 * the submission submitted_at should be the real submission date

Change-Id: I09b643eba575a9d84f3903ab6eefaf52b7801bb1
Reviewed-on: https://gerrit.instructure.com/9070
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-02 16:22:31 -07:00
Rob Orton ff847d8475 allow download submissions if all are graded
fixes #7354

fixes download submissions logic and number of submissions
graded logic.

test plan
 * create an assignmnet in course
 * download submissions button should not be there
 * ratio of submissions should not be there
 * as student submit assignment
 * downoad submissions button should be there
 * graded submissions ration should be there
 * verify button and ratio are there after 100% of
  submissions are graded
Change-Id: I9fb6e0657775fbc45e775bbc180faa996a0cf0a7
Reviewed-on: https://gerrit.instructure.com/8946
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-02 16:12:20 -07:00
Ryan Shaw 7ef5c61e64 Don't allow blank submissions in "Text Entry" field, fixes #7228, #7463, #7464
test plan:
* Create an assignment that allows for online submissions -> Text Entry
* As a student go to the assignment
* Attempt to submit it blank (with or without a comment)
* Verify that it does not let you submit and pops
  up a message informing you that you need to type
  something in the tiny editor.

Change-Id: Ie96bf825565aba1523b98b0f4eb8b48f96c1a137
Reviewed-on: https://gerrit.instructure.com/8959
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-02 14:31:52 -07:00
Cody Cutrer 326c9cb2ba allow specifying an encryption key for use with Security helpers
refs #6886

test plan: n/a

Change-Id: Ic702156b79379de93f5b6aed79876499296ade0f
Reviewed-on: https://gerrit.instructure.com/9147
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-02 14:30:27 -07:00
Cody Cutrer 9aeff5370d plumb host and protocol to gravatar fallbacks
test plan:
 * go to /images/users/<id> for a user without an avatar set,
   but avatars are enabled
 * you should end up back on the same host, with ssl
 * change your avatar on the profile page
 * the fallback to dashed should also be over ssl

Change-Id: I3e3cd322e75c2bd7a329c39887043915f80d2112
Reviewed-on: https://gerrit.instructure.com/8956
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-02 14:15:53 -07:00
Brian Palmer 30de1a294e protect against timing out ldap servers, fixes #7461
If an LDAP server times out, log the time of failure to the
AccountAuthorizationConfig, and don't try to connect again until some
time passes.

test plan:
  * set up an account that uses LDAP, point it to localhost port 6767
  * run `nc -l 6767` or some other command to listen on that port, but
    not ever respond
  * attempt to log in on that account, the first log in should hang for
    5 seconds. subsequent logins should skip even trying to talk to
    ldap, until 1 minute passes.
  * change the account authorization config, verify that it tries the
    LDAP server again immediately

Change-Id: Iea5d7c27f72341d16ae370a0f6ad4ec90fb96b74
Reviewed-on: https://gerrit.instructure.com/9116
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-02 14:14:10 -07:00
Jacob Fugal 0b4287c88e don't call rank_sql on class load
rank_sql requires the connection to be established, which is not always
true when the file is required and the class being loaded. instead, do
the rank_sql call the first time it's needed during execution.

Change-Id: Iec3db9cd502eb936461430d4970a0dcfd00d3439
Reviewed-on: https://gerrit.instructure.com/9144
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 14:02:30 -07:00
Simon Williams 69c113d1f0 add pending_review submissions to todo list for grading
quiz submissions that have essay questions are marked as pending_review, but
they have a grade, so the previous trigger was ignoring them when incrementing
the needs_grading counts. this changes increments the counter for
pending_review even if there is already a grade.

test-plan:
- create a quiz with an essay question
- as a student, submit the quiz
- as a teacher, your to do list should indicate that you have a quiz that needs
  grading.

fixes #5326
fixes #7466

Change-Id: I7cf2293bb43df882000902109124810e896e66ad
Reviewed-on: https://gerrit.instructure.com/9095
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 13:10:22 -07:00
Simon Williams f912612954 link observer immediately after adding; fixes #7528
fix the javascript so that the required attributes are added after the ajax
request, so that the link can be made immediately rather than needing to first
refresh the page.

test-plan:
- in a course with a student, go to course settings, users tab
- add an observer
- without reloading the page, try linking that observer to someone

Change-Id: Ibaf54372f103d52755f92c0b1c966c97044f27ec
Reviewed-on: https://gerrit.instructure.com/9128
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-03-02 13:03:53 -07:00
Brian Palmer 8883c2fd56 set current_pseudonym to the correct value when masquerading
refs #6605

test plan: masquerade as a user, and then try to upload a file to that
user's /dashboard/files page. you should not get an error.

Change-Id: I0583e3d0192207a2b18ae1824e68745d401c80e9
Reviewed-on: https://gerrit.instructure.com/8552
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 12:45:26 -07:00
Rob Orton df8258d8f4 fixes alert notification to say why it was sent
closes #7036

test plan
 * create a course with student teacher
 * create an assignmetn with submission not graded over 7 days
 * alert should happen and say why the alert was sent

Change-Id: I5ba595268d2012572c3ebba78c2bd3b286352255
Reviewed-on: https://gerrit.instructure.com/9118
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-02 12:33:34 -07:00
Zach Pendleton 132ec17f93 set gradebook2 concluded enrollment spec back to pending.
spec breaks on a6f77fc because concluded enrollments are hid
without a way to include them in the view.

temp. fix by setting this spec to pending until we implement
filtering.

Change-Id: Icdbce81cc72e75b7af6e165e60ad2fabd1d03b5a
Reviewed-on: https://gerrit.instructure.com/9132
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-02 10:44:44 -07:00
Cody Cutrer a826b30053 fix logic for determining if a quizsubmission is extendable fixes #4847
test plan:
 * create a timed quiz
 * as a student, start the quiz, then leave the page
 * one hour later, as a teacher, show student quiz results
 * it should not say the student doesn't have a submission

Change-Id: Ib796569c938fc128f4bc3cc72cd461ac94abdee3
Reviewed-on: https://gerrit.instructure.com/9081
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-02 09:51:57 -07:00
Jacob Fugal 8a974b5a61 allow registering new permissions in plugins
break out lib/permissions.rb for registering/listing permissions, so
that plugins can register them too without requiring all of
RoleOverride.  also, enhance AdheresToPolicy to allow multiple
set_policy blocks for one class, so that plugins can define additional
policies on classes that already have some from stock canvas-lms.

test-plan:
  * run specs in vendor/plugins/adheres_to_policy to ensure it didn't
    break
  * add a permission from a plugin, load the account permissions page,
    see the new permission
  * add a policy to an existing class from a plugin and add a view
    controlled by that policy.
    - existing views controlled by existing policies should behave as
      before
    - new view should be properly controlled by new policy

Change-Id: I9426c2eff37642a7ae01ada869b7c59e7ac178a1
Reviewed-on: https://gerrit.instructure.com/9111
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-03-02 09:38:06 -07:00
Jon Jensen 8dcaae7a4e don't return deleted/incomplete users, fixes #7471
only return registered/pre_registered users in the recipient finder

test plan:
1. delete a user
2. try to find the user in the recipient finder
3. it should not show up

Change-Id: I69c4064beb477e16c33ec9066ad46db6355d2f69
Reviewed-on: https://gerrit.instructure.com/9090
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-03-01 18:12:56 -07:00
Ryan Florence 8c61132bef can edit survey questions after reload fixes #6157
test plan:
1. create a quiz
2. change it to a graded survey
3. save settings
4. create and save a question
5. refresh the page
6. edit the question
7. change an answer
8. save the question
9. observe no "you need to pick a correct answer"
   error bubble

Change-Id: I09a49185b94823acd0003eb956dd56b1880eeb59
Reviewed-on: https://gerrit.instructure.com/8984
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-03-01 17:40:35 -07:00
Zach Pendleton 143cb3f665 skip concluded students when setting default grade. fixes #7413
when setting a default grade in gradebook2, ignore concluded
enrollments in the controller.

test plan:
  * create an assignment in a course;
  * conclude a student enrollment in the course (but have at
    least one active student enrollment);
  * go to gradebook2 and attempt to assign a default grade to
    the assignment;
  * verify that the default grade is updated for active students
    without any errors.

Change-Id: Id36dec0dcb3d20ac60f6e33475ac147f62f7d152
Reviewed-on: https://gerrit.instructure.com/9033
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-03-01 17:07:50 -07:00
Jake Sorce 74286f0c0b spec: add selenium spec to people file refs #7528
Change-Id: I35422dbcdc06aee9fc6f0efe9971aebdb63b6b9f
Reviewed-on: https://gerrit.instructure.com/9119
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-03-01 17:06:13 -07:00
Jake Sorce 7a31e12208 spec: make calendar2 specs more robust
Change-Id: I398b4ff48db97fcad09550405fc2468c46f101ec
Reviewed-on: https://gerrit.instructure.com/9113
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-03-01 16:43:31 -07:00
Jake Sorce c529fc4587 spec: add selenium spec to dashboard file refs #6610
Change-Id: I126af164a8a8c64193b2bcacc003c7ed97f52da6
Reviewed-on: https://gerrit.instructure.com/9098
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-03-01 16:43:24 -07:00
Brian Palmer a6f77fc35f link student names to their grades page in gradebook2
fixes #6933
refs #6809

I added html_url and grades.html_url to to enrollments response so we
can pull this onto the page. As part of this, I changed which API
gradebook2 uses for pulling the student enrollment data -- it now uses
the enrollments API, which is the way going forward. Including students
in the course sections API will probably get deprecated at some point.

As a consequence, we are now part of the way to being able to choose
whether to filter concluded enrollments.

test plan:
  * go to gradebook2, verify that clicking a student's name takes you to
    the student's individual grades page

Change-Id: I7c043fda08500a684bfeb8391da012b653a0f6cf
Reviewed-on: https://gerrit.instructure.com/8927
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-01 16:25:16 -07:00
Jacob Fugal 0825ce07fc month localization keys
Change-Id: Icc88a264e795b54182db8cb41169f0afddaca9f0
Reviewed-on: https://gerrit.instructure.com/9006
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-01 16:24:38 -07:00
Zach Pendleton 2b4cc2614a warn users who submit a file assignment without any files.
fixes #7010

when a user attempts to submit a file assignment without a
file attached, prevent form submission and display a warning.

also shrinks the display size of the comments textarea and expands
it when the user focuses it. this should reduce the temptation to
paste the assignment here.

Change-Id: I15ab686a3c0bfc0f4c9323cbdc66bbc6e61874ee
Reviewed-on: https://gerrit.instructure.com/9028
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-03-01 16:24:12 -07:00
Jon Jensen aa0d5d7c41 fix low-res display issues, closes #7141
a few tweaks to ensure the Send button is always visible:

* give recipient finder a max height
* decrease max height of message textarea
* add scrollbars to body if window gets really small (we don't just do
  a simple overflow:auto, because that causes scrollbar jumping/
  flickering as you resize)

test plan:
* in each supported browser:
  * resize the window really small and ensure the Send button can be
    scrolled to
  * add a lot of recipients and ensure the To field doesn't get too big
    (it should scroll, and the caret should scroll into view whenever
    it gets focus or key events). ensure that the browse button is
    always fixed in the top right
  * add a lot of text to the message and ensure it doesn't get too big

Change-Id: I1290e8931510856c41fe64addc58022b35fc8133
Reviewed-on: https://gerrit.instructure.com/9018
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-03-01 15:53:26 -07:00
Jake Sorce e737ac5a8e make self sign-up help button work fixes #5954
on assignments more options page

test plan:

1. create an assignment
2. edit the assignment
3. select "more options"
4. select "this is a group assignment"
5. select "New group set"
6. click on blue ? button
7. notice help dialog pops up now

Change-Id: I776273456b5a7cf4fd86de1ec11af54be3e723bc
Reviewed-on: https://gerrit.instructure.com/9097
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
2012-03-01 15:35:17 -07:00
Ryan Florence cfeeb75f89 quiz html answers closes #7176
test plan:
1. edit a quiz
2. add a multiple choice question
3. click the pencil on the first answer
4. add stuff to tiny
5. click done
6. click "update question"
7. reload page, note the HTML answer
8. repeat now that the answer is saved (make sure
   new and existing questions are handled
   identically)
9. Mess around w/ the question types to ensure
   no weird behavior

Change-Id: Idaf741777635fd2b697747a5d331a6b7e34dee8d
Reviewed-on: https://gerrit.instructure.com/8823
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-01 15:20:06 -07:00
Jon Jensen 57e7b1cc48 fix api behavior to match docs, fixes #7389
make conversations api recognize common boolean-ish values for
group_conversation setting (true, false, on, off, 1, 0, '', etc.)

test plan:
 * create a conversation with multiple participants via the api
 * send a boolean-ish value for group_conversation
 * confirm it behaves correctly

Change-Id: I6a349c6af5b4959de162c022ad5cde7bd5dbebe3
Reviewed-on: https://gerrit.instructure.com/8941
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-03-01 15:16:28 -07:00
Cody Cutrer 75588d3ad1 fix move question template
test plan:
 * go to a question bank and move multiple questions
 * it should show you the list of questions, instead of
   constantly loading them

Change-Id: I3ecfdbcee1b5c3e4b989c60fbef81642efef7926
Reviewed-on: https://gerrit.instructure.com/9106
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-03-01 15:05:50 -07:00
Cody Cutrer cb5fd45d58 optimize gradebook downloads
fixes #6576, #6577

 * don't recompute grades every time
 * when recomputing grades, don't do a separate query per user
 * when recomputing grades, only grab submissions pertinent to
   the course
 * don't load a bunch of data that's used for the html when
   generating the csv
 * preload pseudonyms instead of a doing a query per user
 * use the correct sis pseudonym

test plan:
 * merge sis users (with different sis ids) from different accounts
   together
 * add the user to courses in both accounts
 * download the gradebook csv for both courses
 * the sis id should be the correct one for each course

Change-Id: I0b2b5b26f3167da7de176270bf93a89e7f6f6437
Reviewed-on: https://gerrit.instructure.com/8960
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-03-01 14:55:54 -07: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
Jon Jensen db48cddd3e uncheck group comment by default, fixes #7206
also added checkbox (and api support, etc.) to assignment submission
forms and gradebook2

test plan:
1.  create a group assignment
2.  as a student, go to submit the assignment
3.  ensure the group comment checkbox is present and unchecked on all
    submission forms (file upload, text entry, etc.)
4.  ensure that checking it sends a group comment and leaving it
    unchecked does not
5.  go to the submission details
6.  ensure that the group comment checkbox is unchecked by default
7.  as a teacher, go to the speedgrader and ensure the checkbox is
    unchecked
8.  go to the gradebook and ensure the checkbox is unchecked
9.  go to gradebook2 and ensure it is unchecked and functional (wasn't
    present before)
10. delete all comments and go to the dashboard. ensure that when you go
    to add the first comment, you have a working group comment checkbox
    (if there are existing comments on the stream item, you won't have a
    real comment form, just a link that looks like a text area)

Change-Id: I009b797c2b391c20f41f33c7c0b8afdd4b57dbd3
Reviewed-on: https://gerrit.instructure.com/8978
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2012-03-01 14:05:35 -07:00
Jake Sorce 72fd41641f spec: fix calendar2 selenium spec
Change-Id: I70df4f05e76b9d361e8bf34bbba299731f483a33
Reviewed-on: https://gerrit.instructure.com/9104
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2012-03-01 13:04:20 -07:00
Simon Williams 55ea6a74a5 students in groups at account level don't have sections; fixes #7502
fix a bug in the javascript for managing student groups that caused problems
with managing them from the account level, do to the fact that students aren't
part of sections at that level.

test-plan:
- go to accounts/x/groups
- create a new set of groups
- make sure the student list loads, and you can drag students back and forth.

Change-Id: I0b41294f054de2fdf1e8b330b963edf0a8a956d6
Reviewed-on: https://gerrit.instructure.com/9084
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-01 12:52:47 -07:00
Cody Cutrer f440b62924 refactor masquerading permissions closes #6968
change requirements from needing :become permission in all accounts
associated with the user, to only needing become in @domain_root_account.
also relax the masquerade-as-other-admin requirements to allow masquerading
as an admin that has less than or equal access as you

test plan:
 * ensure that an account admin can masquerade as a user that belongs to
   multiple accounts (but only within the account the admin has permission
   to)
 * ensure that an account admin can masquerade as another account admin
 * ensure that an admin in a restricted role but is allowed to masquerade
   cannot masquerade as a full admin

Change-Id: Id2e1c4bc33d94be3b10f524fbb1633a7478749a0
Reviewed-on: https://gerrit.instructure.com/8844
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-03-01 12:30:31 -07:00
Jon Jensen 3d46f1f74c make selectmenu wider to accommodate scrollbar
test plan:
1. create a matching question with a dozen or so short options (e.g.
   single char)
2. preview the quiz
3. ensure the "[ Choose ]" option doesn't wrap strangely when the
   dropdown is open

Change-Id: I420082fd4d71512e3db8d86e2bafbc4a45f9b0cd
Reviewed-on: https://gerrit.instructure.com/9092
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-01 09:57:03 -07:00
Brian Palmer 91c6139f3a quiz_redirect_params method for LDB compatibility
the lockdown browser wasn't following some redirects because they didn't
have the magic params stating they were safe to follow.

fixes #7227

test plan:
  * load up the OS X LDB and take a quiz that requires the LDB, and
    requires a password
  * verify you can take the quiz successfully

Change-Id: Iaf2765c76ec13efdd100f71ef3c287f6ce735899
Reviewed-on: https://gerrit.instructure.com/9079
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-01 08:57:52 -07:00
Brian Palmer 29a916c8b1 rescue and retry EAGAIN for redis failures
Change-Id: I7dea77ed6aeb4f69ac9166ff980e182b01852b9f
Reviewed-on: https://gerrit.instructure.com/9005
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2012-03-01 08:57:03 -07:00