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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>