Commit Graph

626 Commits

Author SHA1 Message Date
Ryan Shaw b6127a2453 upgrade slickgrid
this updates slickgrid to:
github.com/mleibman/SlickGrid/commit/0b5dff4

test-plan:
 * go to gradebook2, make sure it looks right
 * go to jobs page, make sure it looks right

Change-Id: Iff8d994deaefb30a37911e5fae3acf804d0c3c4f
Reviewed-on: https://gerrit.instructure.com/7513
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-28 09:05:12 -07:00
Ryan Shaw 156d5f8481 expose IE version to INST.browser
Change-Id: I742d12c55081ebaf94cbfdc7bf79295a483947f5
Reviewed-on: https://gerrit.instructure.com/7226
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-12-28 08:59:31 -07:00
Ryan Shaw 30c2a773df fix speedGrader submissions showing for wrong student
it was because of in cases where the base value
may be null or undefined.  fixed by safely walking
through object properties.

this fixes this error in /error_reports:
this.currentStudent.submission.submission_history[
Number(b) || this.currentSt...
line: 78

Change-Id: I7a72c20c2cf0fa8935a80d1e3fe791c4c2456d50
fixes: #6225
Reviewed-on: https://gerrit.instructure.com/7229
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-12-21 11:26:35 -07:00
Zach Pendleton 3ca0c208c9 fix spelling of "privileges" in enrollments.
enrollments previously had attribute
"limit_priveleges_to_course_section," but should
be spelled "privileges." replaced spelling in a
migration and across app.

affects: enrollments model
test plan:
  * run specs

Change-Id: I15dcf9a023ead9bb1aed42abc2d1a7c233610840
Reviewed-on: https://gerrit.instructure.com/7431
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-12-19 16:48:42 -07:00
Ryan Shaw d67246fcad make it obvious if you forgot to add to assets.yml
as long as we need to still add things to 
assets.yml that we require() in production, lets
make it obvious what you need to do.

Change-Id: I9b6609843c7ca8248cca7c64513ee862119d5d35
Reviewed-on: https://gerrit.instructure.com/7547
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-16 14:15:07 -07:00
Ryan Shaw 6249026d69 prevent infinite recursion in ie8 in quizzes
fixes: #6657

test plan:

 * go to create a new quiz (/courses/x/quizzes/new)
 * press the "new question" link
 * verify that it does not say "out of memory" or
   "stack space exceeded"

Change-Id: Ic791eeb5888381006a048db96f69be606239cf8d
Reviewed-on: https://gerrit.instructure.com/7541
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-16 13:48:15 -07:00
Ryan Shaw 452e04a1c8 don't include the GA script until asked to
even if someone did not set an analytics key in
their yml file. we would still put the tracker on
the page.  that slowed down our specs. this fixes
that.

Change-Id: I4e991e1e9a09cd6d4b7a472bce1b1919c228f26c
Reviewed-on: https://gerrit.instructure.com/7374
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-16 13:14:06 -07:00
Ryan Shaw fa8497bf73 gitignore compiled handlebars and coffeescript
this means that if someone pulls the repo,
they need to run:

  bundle exec canvas:compile_assets

...before doing script/server

Change-Id: Ib1ac917f9e6f05db6feb53868d7123cb2dbee14c
Reviewed-on: https://gerrit.instructure.com/7464
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-12-16 09:35:02 -07:00
Brian Palmer a8a6421f1a default values to match the JSON.parse behavior
JSON.parse("") throws an exception, while $.parseJSON("") returns null,
so the behavior on empty string changed with 3487da255b. this fixes
that behavior, fixing the issue with changing months on the calendar.

test plan: switching months on the calendar should work, with no JS
errors.

fixes #6646

Change-Id: I3f2e2626373a6393df7e932499df50bdc5e02ab7
Reviewed-on: https://gerrit.instructure.com/7506
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-12-15 08:33:58 -07:00
JT Olds 9253533845 environment javascript module
test plan: n/a

Change-Id: If2fdc661ab4e6d7eec44482a6f3b454faf56a83d
Reviewed-on: https://gerrit.instructure.com/7472
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-13 16:39:56 -07:00
Ryan Shaw 82325cb5f4 update total and group percentages on cell update
when you edit a grade cell in gradebook2, this change
will make it so the assignment group percentage
and the total grade percentage will also update.
for now it waits till ajax returns with the 'score'
property updated (the UI updates the 'grade' property)
like gradebook1 does. would be nice to have it be
real-time (and not wait for ajax to return), but
would need to reproduce grade_to_score functionality
in js.

test plan:
 * in gradebook2 update a grade cell
 * wait a sec for the server to respond
 * you should see the percentages for the assignment
   group and final score update to reflect the grade
   you typed
 * verify that that percentage is the same as
   gradebook1 shows
 * refresh page, make sure it is the same.

Change-Id: I174d48ffebaa264a013c4ff4be3d9a52b4586fec
Reviewed-on: https://gerrit.instructure.com/7439
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-12-12 16:41:43 -07:00
JT Olds f39c453cde cleaning up grade exchange
test plan:
 * set up an account with a course
 * start netcat in listening mode
 * enable the grade export plugin for the course to post to your netcat
   instance
 * visit the course as a teacher and set up some assignments with grades
 * publish the grades

Change-Id: I7f5b6b264b70ffe06c38f29ad52ee1d4694e5a8d
Reviewed-on: https://gerrit.instructure.com/7279
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-12-09 13:45:19 -07:00
Brian Palmer 0fa7d2d773 pull user information from server in conversation user_id links
This normalizes the way that we generate recipient tokens, and prevents
spoofing of the user information by injecting false data in the url.

fixes #6481

test plan:
  * Click a link to message a user, they should still show up in the
    conversation recipient list as before.
  * Try to spoof the user_id in the url, or add a false user_name
    parameter, you should only see a recipient if the user_id is
    messageable, and the user_name is now ignored.
  * Add a user to a conversation with somebody they normally couldn't
    message. Then as that user, click the "new message" link on the
    person they couldn't message, they should be able to message that
    user.

Change-Id: I5af5787c4ae737cd6eeb8d14793370c97bda5b27
Reviewed-on: https://gerrit.instructure.com/7366
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-12-08 12:47:13 -07:00
Jon Jensen 0fb0f4e258 show errors for hidden fields, fixes #4560
if a hidden assignment field (under "more options") fails a formSubmit
validation, we will now show a generic errorBox by the "more options"
link, and when those fields become visible, so will their errorBoxes

more generally, errorBoxes for hidden fields on any form will now appear
as soon as their corresponding inputs become visible. the generic
errorBox is specific to assignments (but could be done on other forms
via the new onFormError callback)

test plan:

assignment setup:
1. create an assignment
2. in the console or db, set some invalid data that will fail a
client-side validation (e.g. lock_at before due_at, or unlock_at after
due_at).
3. view the assignment (e.g. /courses/1/assignments/1)
4. click the "Edit Assignment" link

test 1:
1. submit the form
2. confirm that an errorBox appears next to "more options"
3. clicking on the link should hide the errorBox and cause the
errorBoxes next to the fields to appear

test 2:
1. click the "more options" link
2. submit the form
3. confirm that the errorBoxes appear next to the fields, and no general
errorBox appears

regression test:
pick a couple other forms that have client-side validations, and confirm
that the errorBoxes appear/disappear correctly

Change-Id: I690dae87c6f01c040b78b19def46d844ad80236e
Reviewed-on: https://gerrit.instructure.com/7201
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2011-12-05 12:52:37 -07:00
Zach Wily 6c8b0fc9db switch to using the built in jquery ajax request counter
Using our own was problematic, since it only tracked ajax queries we made. The
JQuery one should be more reliable.

Change-Id: I6aa603d5cbd8d9825603b652fb408bb1a4d082a3
Reviewed-on: https://gerrit.instructure.com/7242
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
2011-12-03 08:38:32 -07:00
Ryan Shaw a971a1de27 fix speedGrader to not error if no url hash present
refs: #6225

test plan:
load the speedGrader without the '#' and everything
after it:
(ex: /courses/1/gradebook/speed_grader?assignment_id=2 )
you should not see any javascript errors

Change-Id: Id6b35f9822416b0b845dad86db397e27730af574
Reviewed-on: https://gerrit.instructure.com/7216
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-12-01 15:11:11 -07:00
Ryan Shaw 6aca46bb84 fix error when recording JS errors
looking at /error_reports I saw some that were
breaking here because url was undefined

Change-Id: I278459b4e1e4ea7151f6df80bf666ccf9de2c98f
Reviewed-on: https://gerrit.instructure.com/7233
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-12-01 13:50:39 -07:00
Ryan Shaw b4b27c496a make an INST module to expose global to AMD
Change-Id: Idb0e654bf03df1cd20946879e0c63e2c890088ea
Reviewed-on: https://gerrit.instructure.com/7225
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-12-01 11:14:03 -07:00
Ryan Florence 790553d86a changed message about muting assignments fixes #6486
Change-Id: I9b4d8a3ee769b8ee1366694a357757e1deccb017
Reviewed-on: https://gerrit.instructure.com/7204
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-30 15:56:11 -07:00
Bracken Mosbacker ac73426b8a don't show a user to create a new collaboration when not allowed
A user who doesn't have permission to create a collaboration was
shown a paragraph that tells them to click a "new collaboration"
link. They won't see that anymore

Test Plan:
 * Create a student group in a course
 * As the teacher (who isn't a member of the group) go to the files page of the group
 * Click the collaborations link.
 * There shouldn't be a second paragraph saying to click "New Collaboration"

closes #6228

Change-Id: I96d6f68cbd5871b11abcf87a6472af58b66f711e
Reviewed-on: https://gerrit.instructure.com/7197
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-30 13:12:50 -07:00
Brian Palmer 647ca7f8c6 fix speed grader when the uri has no hash
refs #6459

testplan: load the speed grader without any fragment #stuff-like-this in
the url and make sure it renders properly

Change-Id: Ia1556341ce621a41cd8918487e24a711e4de992b
Reviewed-on: https://gerrit.instructure.com/7196
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-30 12:49:49 -07:00
Ryan Shaw d3e8c8c6c2 get rid of compiled js files where cs was deleted
Change-Id: Iab9253f1c5c93a0d4fdfc1bc6160220aaef9b0ec
Reviewed-on: https://gerrit.instructure.com/7184
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-29 13:23:24 -07:00
Ryan Shaw 1b1c015dd4 fix $.detect to have right argument order
Change-Id: I0c53059d4032d7c4f2a53b697d4a2dcc1bf70773
Reviewed-on: https://gerrit.instructure.com/7151
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-29 13:22:58 -07:00
Brian Palmer 3487da255b s/JSON.parse/$.parseJSON in javascript
Now that we're adding the prefix to our JSON responses, we need to be
sure to go through our modified jquery json parser function.

testplan:
  * make sure that conversations paging now works again
  * check other actions that use pageless, like user page views

this fixes some existing selenium specs, like in conversations.

refs #6459

Change-Id: I2652fc7a7acef099fe163a63e6b3933ddb2e9360
Reviewed-on: https://gerrit.instructure.com/7188
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-29 12:45:50 -07:00
Zach Pendleton 6d5ddda4c5 correctly update quiz status re: essay questions. fixes #5436
When student submits a quiz with an essay question, it now
displays as ungraded in Speedgrader until the grader reviews/
grades the essay question.

test plan:
1. create a quiz with an essay question;
2. complete the quiz;
3. view the quiz assignment in speedgrader;
4. verify that assignment is marked as "not graded"
   in the student dropdown menu;
5. grade the essay question;
6. verify that the assignment is now marked as "graded"
   in the student dropdown menu.

Change-Id: I67ca56df2ec08380c75aa1ddf64fe8848e2b574d
Reviewed-on: https://gerrit.instructure.com/6619
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-29 10:18:25 -07:00
Brian Palmer c1bfe404fe prepend protection loop to json responses in app ajax calls
We are now prepending all json responses with "while(1);" to protect
against browsers that allow stealing this information from a <script>
tag on third-party sites, by overriding constructors or property
getters/setters.

this loop is not prepended to API requests, unless those requests are
authenticated via a session cookie (canvas itself makes API
requests using the user's session, but we don't want third-party apps to
have to remove the loop before parsing).

fixes #6459

Change-Id: Icf00056d4d7fba198a8957892af09cdd84d55bc4
testplan:
  * Do anything in the application that results in a AJAX request
    returning JSON -- for instance, load your list of conversations.
  * Use a web inspector to verify that the canvas is returning the JSON
    response with this prepended loop, but that the javascript code
    handles that and still can parse the response.
  * Make API calls to Canvas, verify that nothing is prepended to the
    JSON responses.
Reviewed-on: https://gerrit.instructure.com/7144
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-29 09:53:44 -07:00
Ryan Shaw 62d13b7727 center spinner in element even if hidden
Change-Id: I72d46e8e580a596ee4fae977b4084aa6bab96519
Reviewed-on: https://gerrit.instructure.com/7150
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-28 16:27:58 -07:00
Ryan Shaw ce0c02c257 stop spinner on success OR failure
we were just stoping the disableWhileLoading spinner
if the deferred was resolved. if it is rejected
(i.e. the ajax request failed) we also want to stop
spinning, to reflect it is not doing work any more.
you still need to write your code to handle the error though

Change-Id: Ibd7a1bd7ce5d4f0713212fcf035fad4f6a8e12f3
Reviewed-on: https://gerrit.instructure.com/7149
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-28 15:41:42 -07:00
Cameron Matheson 5cc3082c6e fix conversation-replying in activity stream
fixes #6087

Test plan: Send a message to a user and then log in as that user.
  After replying to the message in the activity stream, the reply should
  get appended to the conversation.

Change-Id: Ib0b406bc9cc9831692887e85d0a2e93ad0ecd81a
Reviewed-on: https://gerrit.instructure.com/7104
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-28 14:30:17 -07:00
Ryan Shaw 4dd825382f fix specs that tried to type in tinyMCE
Change-Id: I4d5c5d7770b046071352785637bf05ae76e01d7a
Reviewed-on: https://gerrit.instructure.com/7167
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-28 14:22:25 -07:00
Ryan Shaw a2c1e78522 re-sync compiled jet templates
Change-Id: Ic5cc40cfbb1cec0ca5f3b33fe0f243a3bf18712b
Reviewed-on: https://gerrit.instructure.com/7140
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-23 15:36:53 -07:00
Ryan Shaw 4a309b43e7 fix auto-suggest in webkit, fixes: #6448
we had to disable the browser's
built in auto-completion for
our fancy inputs on the login
screen because it would force an ugly
yellow background like this:
http://screencast.com/t/jrit5OiiGeuE

this fixes the styling to use some css3 tricks in
webkit browsers so we don't have to disable
the functionality any more

test plan:
 go to login screen in chrome or safari
 type your username and password
 it should prompt if you want it to remember it
 say yes
 log out and go back to login screen you should
 see something like:
 http://screencast.com/t/IZL4bfsmQM
 go to it in ie8, it should still look like how
 it used to.

Change-Id: If724698dfea0860e3929f515b36850624c970a51
Reviewed-on: https://gerrit.instructure.com/7128
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-23 11:32:27 -07:00
Brian Whitmer ae717a8f6a external tool resource selector in WYSIWYG editor
Configured external tools can show up as buttons in the
rich editor. If you click the button then it'll pop up
a dialog that uses basic lti to load a page for the
external tool.  The user can pick a resource in that
tool and the tool will then redirect back to a Canvas
url that will fire a callback and embed the content
into the editor.

See spec/selenium/external_tool_buttons_sel.rb for an
example of how to manually configure one of these tools.
Adding configuration to the UI will come in another
commit.

testing notes:
to configure an external tool to show up in the editor:
tool.settings = {
  :editor_button => {
    :url => "http://<canvas_domain>/selection_test",
    :text => <button_label>,
    :selection_width => <width_of_iframe>,
    :selection_height => <height_of_iframe>,
    :icon_url => <url_of_button_icon>
  }
}

test plan:
- configure an external tool in the course with an editor button
- check to see if the button shows up in the rich editor in that course

- configure an external tool in the account with an editor button
- check to see if the button shows up for courses in that account

- configure more than 3 external tools
- check to see if the "more tools" dropdown works correctly

Change-Id: I681db0af578df6a9c7a2c840d293703937d81c46
Reviewed-on: https://gerrit.instructure.com/5429
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-11-22 16:12:12 -07:00
Jon Jensen b802279da7 move domready call to the end, fixes sporadic js error
because the requirejs callback happens asynchronously, our domready
callback may happen synchronously if domready has already fired. so
we need to ensure that anything it needs has already been set up
beforehand

test plan:

confirm you can take a quiz without javascript errors

Change-Id: I1466f67e902fc12c692e05eccac1565304db682a
Reviewed-on: https://gerrit.instructure.com/7100
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-22 10:51:56 -07:00
Ryan Shaw dfda98bf16 upgrade tinyMCE, refs: #4570
also fixes: #5429 and fixes: #5239
see: http://screencast.com/t/okG7wPKxOHzk

for a list of all the other TinyMCE bugs that have been
fixed since our last version (3.4.1) see changelog.txt
or http://tinymce.com/develop/changelog/index.php?type=tinymce

Change-Id: I49829ff0af340d5061eb7df434bf8d13d7d450ce
Reviewed-on: https://gerrit.instructure.com/6775
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-11-18 14:05:27 -07:00
Brian Whitmer adc975475c Basic LTI link selection helper
In current BLTI there are two options for adding links:

- know the URL beforehand
- know a "naked" URL that can be associated with a resource
  but not until after embed

Neither of these are great for the end-user. This commit
adds a third option, as discussed with some other users of
BLTI, where instead the user can click a link in the UI
to load an iframe where they can then find the specific
resource they want to embed. They never need to know
any URLs to make this happen.

to configure an external tool:
tool.settings = {
  :resource_selection => {
    :url => "http://<canvas_domain>/selection_test",
    :text => <label>,
    :selection_width => <iframe_width>,
    :selection_height => <iframe_height>
  }
}

test plan:
- configure an external tool on the course
- click to add an item to a course module
- select "external tools"
- pick the tool from the list
- select a link from the dialog
- make sure the link was inserted correctly

- try clicking the first "bad" link in the tool and confirm error is caught

- try clicking the second "bad" link in the tool and confirm error is caught

- try clicking the this "bad" link in the tool and confirm no errors occur

- make sure an account-level tool also appears

Change-Id: I47fd8461f1050c332e5cae32d9a3141a8de5b38d
Reviewed-on: https://gerrit.instructure.com/6326
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-18 11:52:39 -07:00
Ryan Florence b9b15e5ad6 fixed bad merge in gerrit 6797
Change-Id: I93e68114125c75f73ef8bc5acd4350a0ed905fd2
Reviewed-on: https://gerrit.instructure.com/7059
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-18 11:33:59 -07:00
Ryan Florence a29233e67f added indicator when quiz is saved, fixes #6222
also wrapped take_quiz in a require call to be AMD
compatible.

also fixed an issue where the ajax errors weren't
firing properly

Test case:

1. Take a quiz
2. Should say in the right bar "Not saved"
2. Answer a question
3. Should say "Saving…"
4. Wait a sec, should say "Saved at [time]"

Change-Id: Ia99c26a976626674347cc6ce8f3a0c0c2805b128
Reviewed-on: https://gerrit.instructure.com/6797
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Tested-by: Ryan Florence <ryanf@instructure.com>
2011-11-18 10:32:42 -07:00
Ryan Shaw 5410c98685 make misc_plugins work until we have AMD fully
for now you can't just do define(..all your code)
because until something require()'s it it will not
have ever run.  so anything that just depends on it
being there might not work (depending on load order)

Change-Id: I7bc27fbbdb5f7424b68d55c40f75eb3c89e46544
Reviewed-on: https://gerrit.instructure.com/7002
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-16 12:26:02 -07:00
Cody Cutrer 9b9fd331a2 fix permission check for TAs refs #5833
also add a checkbox for admins to only search for existing users
(i.e. ignore open registration)

Change-Id: I84d2ba7992339b37506e41a50c336325af0ac73b
testplan:
 * add a student to a course as a TA
 * add a user to an account or a course as an admin, with and without
   open registration, with and without manage_user_logins permission,
   with and without checking "search only existing users" (not all
   combinations applicable, each underlying condition is checked in
   specs)
Reviewed-on: https://gerrit.instructure.com/6969
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-16 10:28:51 -07:00
Brian Whitmer c438ad3566 hide "Add New Entry" link when adding a new entry
The "Add New Entry" link should not be visible while
a new entry is being added.

test plan:
- go to a discussion topic
- click to add a new entry
- "Add New Entry" link should not be visible
- click "Cancel"
- link should be visible again

Change-Id: Ie1ae6af0250ea060b712fa9354b39ec8ba19a8e7
Reviewed-on: https://gerrit.instructure.com/6977
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-15 22:53:38 -07:00
Jacob Fugal 3bcd881977 default 'group_conversations' off; fixes #6069
test-plan:
 * go to inbox and start new conversation
 * add multiple recipients (or single 'bulk' recipient)
 * note 'group conversations' checkbox appears but is unchecked
 * check checkbox
 * remove recipients, then re-add
 * note 'group conversations' checkbox is back to unchecked

Change-Id: I944f3b35e0356ee99e015e6e983577a56419e3a8
Reviewed-on: https://gerrit.instructure.com/6989
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-11-15 12:55:35 -07:00
Ryan Florence 0a626fb8ce round answers w/ the same precision fixes #5906
answers were rounded when created, not when answered

Change-Id: I790bd4554048198e4ce7f557928051916a649740
Reviewed-on: https://gerrit.instructure.com/6857
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-14 09:31:50 -07:00
Brian Palmer 82b005466e fix interleaving of submission comments into conversations
fixes #6320

Change-Id: I57b85e4c1679fb5a90b87b42e27e185f569695b7
Reviewed-on: https://gerrit.instructure.com/6957
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-14 08:43:57 -07:00
Brian Palmer a6548805ca UI for creating external tool assignments
refs #5892

Change-Id: Ife359ff2cf77926560e862366e904be43f71f10a
Reviewed-on: https://gerrit.instructure.com/6870
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-11-11 14:54:49 -07:00
Brian Palmer 132566290f use defined submission json format in conversations api
The conversations API had made up its own submission response format,
rather than using the standard submission formatting already used by
other API calls.

fixes #6289

testplan:
  * as a teacher, create a conversation with a student
  * create an assignment, and have the teacher and/or student comment on
    the assignment submission
  * verify those comments still appear in the conversations web ui
    verify that the submission and comments now come back in the api
    using the same format as the submissions api, with assignment and
    comment data included
  * make more than 10 comments, verify that only 4 are displayed at
    first, then 10 total, and a link provided to view the full submission.

Change-Id: I05a37a1498fa3d6a1ab908c462a04d28f2854eb8
Reviewed-on: https://gerrit.instructure.com/6852
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-11-10 17:00:24 -07:00
Bracken Mosbacker 28a62efa7b give option to adjust assignment points possible based on rubric points possible
Test plan:
 * create assignment worth 5 points
 * add a rubric for grading worth 10 points
 * save the rubric and choose to change or not change assignment points
 * make sure the assignment points were adjusted or not

closes #5788

Change-Id: I13668261010480ccd0c239d73eb01417d889da62
Reviewed-on: https://gerrit.instructure.com/6844
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-10 13:15:36 -07:00
Zach Pendleton 6fadcdb25e fix sorting on outcomes page. fixes #4670.
sorting was causing outcomes groups to disappear/throw
a DOM error. fixed by adding a child <div> to hold all
sortable elements.

test plan:
1. visit outcomes page for a course;
2. add two learning outcome groups;
3. while dragging outcome group, move cursor to far
   left or right of the page and release mouse;
4. verify that the outcome group does not disappear
   from the page.

Change-Id: If109ff891ab8a0fcc9787716556e37f8bef32c80
Reviewed-on: https://gerrit.instructure.com/6688
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-10 13:08:10 -07:00
Jacob Fugal 14fd244c3e truncate recipient tokens to not screw up page flow
fixes #5979

test-plan:
  * create a group or course with a really long name, then select the
    "Everyone" (or "Teachers" or some such) from that entity in the
    conversations recipient browser.
  * the name should be truncated with ellipsis preventing the page from
    overflowing.
  * resize the page, the max-width of the token should flow with the
    page, to use available space but not overflow the page.
  * mouse over the truncated token; title tooltip should have the full
    name

Change-Id: I1c8ac46f36031ab7d1d53f672102797460ce6511
Reviewed-on: https://gerrit.instructure.com/6835
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2011-11-10 13:07:23 -07:00
Ryan Florence 94fa0e1944 new folders are droppable fixes #6001
Test case:
1. Go to the files on a course or dashboard or
   wherever
2. add a new folder
3. add another folder or file
4. drag a folder or file into one of the new
   folders on the left panel

Change-Id: Id0d4b1a857603f33056a78f79ad79cbf2e75cca8
Reviewed-on: https://gerrit.instructure.com/6788
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-11-10 10:47:29 -07:00