fixes CNVS-9759
test plan:
* navigate to the user settings page, and click your
avatar;
* verify that you can click the "select a photo" view to
pick an image, or that you can drag a photo directly
onto it;
* crop the picture using the crop tool and press the
"select image" button;
* verify that the button becomes disabled and that the
dialog then closes and your new avatar is displayed.
* refresh the page and make sure the new avatar sticks.
Change-Id: Ic33cc89e66ce3bf2bed834f2aac2f37029008ec1
Reviewed-on: https://gerrit.instructure.com/26890
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
- js:generate_runner now generates common files to be used by different test runners
- js spec file order now shuffled to better expose dependencies
- fakeENV now returns two methods: setup and teardown
- stock tinymce 3 files are now wrapped for AMD
test plan:
- tinymce should work the same
- js:test rake task should run tests
- js:build task should work as normal (using new location of r.js)
- test results should successfully send to firework
Change-Id: Ic09647f55dae57130fa0fe3d6a9168d2b67b89a2
Reviewed-on: https://gerrit.instructure.com/29297
QA-Review: Shawn Meredith <shawn@instructure.com>
Tested-by: Shawn Meredith <shawn@instructure.com>
Tested-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Reviewed-by: Aaron Shafovaloff <ashafovaloff@instructure.com>
Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com>
refactored conversations pane, implemented ajaxy scrollable list widget,
partially backbone.js'ed conversation items, re-did fragment hash fu, and
made filter/scope changes update the page via ajax.
from an end-user perspective, the noticeable changes are:
1. filters/scopes update the page via ajax
2. the conversations pane appears to load more quickly now (we set it to
the full height from the outset, and things load in as you scroll)
test plan:
1. general regression test of conversations, specifically focusing on:
1. actions that remove a conversation from the list, e.g.
1. deleting it
2. deleting all messages from it
3. marking it as read when in the unread filter
4. archiving/unarchiving (depending on the view)
2. actions that update a conversation in the list, e.g.
1. adding a message should update the preview and move it to the top
2. deleting the most recent message should move it down in the list
3. sending a new message to an existing conversation should update
it (and possibly reposition it)
3. actions that should add a conversation to the list
1. starting a new conversation, provided that it should be visible
under the current filter/scope
2. if the conversation should not be visible (e.g. start a new
conversation under the archived scope), simply display the
"Message Sent" notification but don't show the conversation
2. test ajax loading of filters and scopes. confirm that back button works
3. test scrollable list component
1. confirm the scrollable list is big enough for all items in the view
2. confirm that items load as you scroll
3. confirm that jumping to the very bottom loads those items in a
timely manner (they should load before the skipped middle stuff
does)
Change-Id: Icb1e09f34c653b55c62de0c82ac0cfc172827520
Reviewed-on: https://gerrit.instructure.com/9612
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
affects: /courses/:course_id/imports/copy
now provide an "include completed courses?" checkbox that allows
user to also list concluded courses that he/she has permissions
to.
load course dropdown via ajax call, and cache both results for the
select box and the course search autocomplete.
test plan:
* create two courses;
* create a user and enroll them as a teacher in both courses (user
should not be an admin);
* conclude one of the courses;
* go to the course copy page of the unconcluded course;
* verify that the concluded course is not in the dropdown and cannot
be searched for;
* check the 'include completed courses?' checkbox;
* verify that the concluded course now appears in the dropdown and
can be searched for.
* create a course in a different term and set the same user as
teacher;
* set enrollment start dates for each term;
* view the copy course page and verify that the terms are ordered
by start date DESC.
* create a course in a different account in a term that shares the
same name as the term in the original account;
* view the copy course page and verify that the account name is
appended to the term name in the dropdown menu.
Change-Id: I0af2907e130ae1e0ce6048cac4743234fd0e1fd6
Reviewed-on: https://gerrit.instructure.com/8943
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
paginate enrollments by loading them through the api. load
new pages by clicking 'View More Enrollments' link.
affects: sections controller
test plan:
* create course with large number of students (~ 500);
* visit course section page (/courses/:course_id/sections/:id);
* verify that page loads first 15 of both current and completed
enrollments;
* verify that if no enrollments exist in a category, a 'no enrollments
found' message is displayed;
* verify that clicking 'Load More Enrollments' loads another page
of enrollments;
* load a course with < 15 enrollments, verify that no 'View More
Enrollments' link is displayed.
Change-Id: Ied7ccdd8e59a56bef44ffbb07292ecfc0cb97ec5
Reviewed-on: https://gerrit.instructure.com/8365
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
new stuff
---------
- added curl.js AMD module loader
- converted existing js specs to use QUnit
- removed jasmine stuff
- added rake task to run js specs
dependencies!
-------------
you'll need to install http://www.phantomjs.org/
if you want to run the specs.
next step is to incorporate curl.js into our app
environment.
Change-Id: I0ba97bc9abe1494f87fdfc0eca51d987a759bc85
Reviewed-on: https://gerrit.instructure.com/6477
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Features
--------
- The course menu shows the top 12 courses in
alphabetical order
- Users with > 12 courses will get a button to
edit the courses in their menu. Any courses
they add become favorites and will remain
in the course menu, and visa versa for those
they remove
- Users can reset the menu to the default 12
Noteworthy Ruby changes:
------------------------
- Added Favorites model
Favorites are polymorphic so we can save other
contexts as favorites in the future.
- Added FavoritesController
- Added User#menu_courses
This opens up some room to remove lots of code
that's used to build the main menu, but that
isn't in this commit. Gives a list of all the
courses that show up in the user's menu.
- Added User#favorites
- Added User#favorite_courses
- Refactored Enrollment::readable_type to cache
Noteworthy JavaScript changes:
------------------------------
- Jasmine specs are totally working
- Added CustomList constructor
- Added courseList (CustomList instance)
- Added objectCollection
Utility function that extends an array with
methods useful for collections of objects.
Used to manage the data state in CustomList
Fixes#4827
Change-Id: I59468e517ad07678741402bf9cf479cba1dfeaa1
Reviewed-on: https://gerrit.instructure.com/5982
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
- New rake task `rake jst:compile` to precompile
JavaScript templates into functions.
Add handlebars templates to app/views/jst and
they'll get compiled to public/javascripts/jst
- New rake task `rake jasmine` and `jasmine:ci` to
run JavaScript specs.
Add specs to spec/coffeescripts and they'll get
compiled into spec/javascripts
- Added Guard gem `$ guard` that watches
coffeescript and handlebars files and compiles
them when changes are made.
- Created Handlebars Ruby class that precompiles
the templates into JavaScript functions
- Added JS Template constructor to abstract
our tempting API
Change-Id: Ie993d0fc50d49b161ed94dbc066c4475cefdc427
Reviewed-on: https://gerrit.instructure.com/5813
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>