Commit Graph

21 Commits

Author SHA1 Message Date
Chris Hart 171b05a4f7 update dialog box button appearance to conform with styleguide
fixes #10236

test plan:

check each updated form to ensure it looks correct and works

Change-Id: I073c3bff5860bab0b892fecbf61a41a8e9c5ec76
Reviewed-on: https://gerrit.instructure.com/13904
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-11-13 13:00:36 -07:00
Dave Donahue 8fef5098a6 course settings have a number of accessibility issues
Fixes #10627

* Adds row headings to Course Details table
* Brings focus to enrollment type after clicking 'Add Users'
* Attaches label to Add Users textarea
* Attaches label to 'can edit course wiki pages by default' on Course Details
* Remove focus from 'Reset Course Content' button and instead place it on the dialog as a whole so the warning can be read after advancing down
* Improves accessibility in 'add course users' form
 + Clears out spaces from add users textarea
 + Adds example e-mail list format to below the textarea, not within it
 + Moves example e-mail list format into label
 + Set focus to confirm button after hitting 'Continue..'
 + Makes 'Since this course hasn't been published' tabbable
 + Makes parsed list of e-mail addresses tabbable

Change-Id: I38cca3ce652508e7420c71a2f606bde01080b08a
Reviewed-on: https://gerrit.instructure.com/14511
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clare Hetherington <clare@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2012-11-05 14:05:28 -07:00
Jake Sorce 05199a9cba make more options link text toggle correctly, fixes #11236
test plan:
  1. login as a teacher
  2. create a course
  3. go to course settings
  4. click 'Edit Course Details'
  5. click 'more options' at the bottom
  6. the extra options should display
  7. the 'more options' link text should change
     to 'less options'
  8. click the 'less options' link
  9. the extra options should hide and the text
     should change to 'more options' again

Change-Id: I0a3e35ce7e439b4927cd8cc1f2e4e369780cc78b
Reviewed-on: https://gerrit.instructure.com/14364
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mark Ericksen <marke@instructure.com>
2012-10-17 10:11:14 -06:00
Cody Cutrer d70945c1bd remove unused twitter tables and no-op jobs
test plan:
 * edit course settings, there should not be an error
 * copy a course, there should not be an error

Change-Id: I733bef83b69d9c513be801d3e4b25422bcd10ebd
Reviewed-on: https://gerrit.instructure.com/13832
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-10-02 13:11:13 -06:00
Ryan Shaw 8403f9a06a upgrade jqueryui to 1.9b1, closes: #9493 refs: #9492
wins:
* we now have a tooltip widget
* no more having both jqueryui 1.8 and alpha 1.9
  stuff on the same page

for more info:
http://blog.jqueryui.com/2012/06/jquery-ui-1-9-beta/
info about tooltips:
http://wiki.jqueryui.com/w/page/12138112/Tooltip

test plan:
interact with as many jquery ui widgets as possible
e.g.: wiki sidebar (the tabs and accordion), gradebook2
(and all of its dialogs), date pickers, help dialog, etc

Change-Id: I2c1c0d761a99c972fd8ae704ee3782140955ce3c
Reviewed-on: https://gerrit.instructure.com/12258
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-13 10:20:06 -06:00
Ryan Shaw 81dc9b769e don't call jquery UI methods an elements with no widget initialized
aka: no more .dialog('close').dialog({}).dialog('open')
(does not actually change any behavior visible to end user)

test plan:

as far as manual testing goes, try to go to a bunch of pages that have dialogs
and open and close them.

For engineers, if you can think of other places where we might try to set options
on a UI widget before we initialize one (like sortables or something), check that too.

Change-Id: I7415c00d8c15b562ac12eeef83fa041aff1dfb35
Reviewed-on: https://gerrit.instructure.com/12810
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-08-13 10:16:54 -06:00
Jon Jensen c906c49e49 restyle flash messages and unauthorized-style pages, fixes #9466
test plan:
1. go to a course page when not logged in
   1. you should see the unauthorized message
   2. it should be styled correctly
2. go to a course page when logged in that you are not enrolled in
   1. you should see the unauthorized message
   2. it should be styled correctly
3. perform an action that generates a flash notice (e.g. send a message in
   conversations)
   1. the notice should appear and should overlap the header
   2. it should disappear when clicked (or after a few seconds)
4. perform an action that generates a flash error message
   1. the error should appear and should overlap the header
   2. it should disappear when clicked (or after a few seconds)
5. go to a page that has an initial flash notice (e.g. view course you've
   been invited to)
   1. the notice should appear and should shift all content down
   2. it should only disappear if clicked
6. go to a page that has an initial flash error
   1. the error should appear and should shift all content down
   2. it should only disappear if clicked

Change-Id: I3a1ca8f44e9f36bc7ce191392a7bf8922eb4fcc4
Reviewed-on: https://gerrit.instructure.com/12324
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-18 17:12:52 -06:00
Joe Tanner d16318c1e0 add multiple students to an observer in the UI, closes #7768
other changes:
- makes it possible to add a student to multiple sections in the course
- pagination of the user lists
- converted user tab js to coffee and backbone

test plan:
- as a teacher go to /courses/*/settings#tab-users
- verify that multiple students can be linked/unlinked to an observer
- verify that users can be added to and removed from multiple sections
- verify that 'Resend Invitation' and 'Remove from course' work

Change-Id: I0f64f72f1937348817990b6f13b6310185b68a73
Reviewed-on: https://gerrit.instructure.com/10865
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joe Tanner <joe@instructure.com>
2012-07-16 15:48:27 -06:00
Jon Jensen 9c4aeea0b1 short self enrollment code support, closes #8587
adds a 6-character self enrollment code. the longer version is still
supported (since links may be in the wild). courses that already have
self enrollment enabled will get a new 6-char code when someone self-
enrolls or goes to the course settings page.

test plan:
1. on the old code, create a course and enable self enrollment
2. save the self enrollment url (for step 6)
3. on this new code, go to the course settings page
4. confirm that you see the new 6-char code in the link
5. confirm that the code was saved on the course (check db or console)
6. as a student, confirm that you can enroll using the old link
7. as a student, confirm that you can enroll using the new link
8. create another course and enable self enrollment
9. as a student, confirm that you can enroll using the new link

Change-Id: I6d549b50febc3dcb596a7c6b882701aa58b5441b
Reviewed-on: https://gerrit.instructure.com/10835
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jon Jensen <jon@instructure.com>
2012-05-23 13:33:32 -06:00
Ryan Shaw 605231a418 upgrade jquery to 1.7.2
when you require ['jquery'] you are now getting the
version of jquery that has our patches applied to it
you should not need to think about the patching as
you write code.

this also applies to jqueryui/dialog, that will return
the patched version of it.

test plan:
make sure javascript still works on our site ;)

Change-Id: I237fa8da5f93167140c4d42b80eb3ef17d95c1e6
Reviewed-on: https://gerrit.instructure.com/9878
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-04-24 10:57:38 -06: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
Simon Williams e68f1beecc edit/delete mult enroll on course settings page; fixes #6996
We want to be able to change or delete enrollments on the course settings page,
even if there are multiple enrollments for a single student.  This commit adds
this ability, and adds tests to ensure that multiple enrollments are coalesed
under a single user.

test-plan:
- create a course with three sections
- enroll a student in two of these sections (from the console)
- navigate to the course settings page, users tab
- make sure the student only shows up once, with both enrollments listed
  underneath
- try changing one of these enrollments to the third section.
- try deleting one, and then both of these enrollments

Change-Id: I4bc35ac2f79fd6297b50e5217a567290eff59a92
Reviewed-on: https://gerrit.instructure.com/8364
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2012-02-16 14:17:55 -07:00
Simon Williams 12af0a5d67 observers see all link enrollment grades for course; closes #6441
if an observer is linked to two students in the same course, we want to provide
an option on the grades page to choose which students grades to view, and be
able to switch back and forth between them.  We also want to handle these
multiple links on the course settings users tab.

test plan:
- create a course with > 2 students and 1 observer
- creates > 2 enrollments for the observer, each linked to a different student
- go to the course settings users tab, make sure the multiple links show up and
  you can change/remove/add links as you would expect.
- go to the course grades page. You'll see a dropdown allowing you to choose
  which student's grades to view.

Change-Id: Ia79cb99c0bfd54924d0aee1f8549a4e82121abae
Reviewed-on: https://gerrit.instructure.com/8481
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2012-02-09 10:17:23 -07:00
Ryan Florence a1e31c8c9a AMD Conversion
"Trivial" JavaScript / CoffeeScript changes
--------------------------------------------------

For the most part, all javascript was simply
wrapped in `require` or `define`. The dependencies
were found with a script that matched regexes in
the files, it errs on the side of listing too many
dependencies, so its worth double checking each
file's dependencies (over time, anyway).

i18n API changes
--------------------------------------------------

No longer have to do I18n.scoped calls, just
list i18n as a dependency with the scope and it's
imported already scoped

  require ['i18n!some_scope'], (I18n) ->
    I18n.t 'im_scoped', 'I'm scoped!'

JS bundling now done with r.js, not Jammit
--------------------------------------------------

We don't use jammit to bundle JS anymore. Simply
list dependencies for your JS modules in the file
and RequireJS handles the rest.

To optimize the JavaScript, first make sure you
have node.js 0.4.12+ installed and then run:

  $ rake js:build

The app defaults to the optimized build in
production. You can use non-optimized in
production by putting ?debug_assets=true in the
url just like before.

You can also test the optimized JavaScript in
development with ?optimized_js=true.

Significant changes
--------------------------------------------------

These files have "real" changes to them (unlike
the JavaScript that is simply wrapped in require
and define).  Worth taking a really close look at:

- app/helpers/application_helper.rb
- app/views/layouts/application.html.erb
- config/assets.yml
- config/build.js
- lib/handlebars/handlebars.rb
- lib/i18n_extraction/js_extractor.rb
- lib/tasks/canvas.rake
- lib/tasks/i18n.rake
- lib/tasks/js.rake

Change-Id: I4bc5ecb1231f331aaded0fef2bcc1f3a9fe482a7
Reviewed-on: https://gerrit.instructure.com/6986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-02-06 16:41:40 -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 Whitmer 6b83b9227c basic lti navigation links
By properly configuring external tools (see
/spec/models/course_spec/rb:898 for examples) they can
be added as left-side navigation links to a course,
an account, or to the user profile section of Canvas.

testing notes:
- you have to manually set options on the external tool:
- for user navigation the tool needs to be created on the root account
  with the following settings:
  {:user_navigation => {:url => <url>, :text => <tab label>} }
  (there are also some optional language options you can set using
  the :labels attribute)
- for account navigation it's the same
- for course navigation it's the same, except with :course_navigation
  there's also some additional options:
  :visibility => <value> // public, members, admins
  :default => <value> // disabled, enabled

test plan:
- configure a user navigation tool at the root account level,
  make sure it shows up in the user's profile section

- configure a course navigation tool at the account level,
  make sure it shows up in the course's navigation

- configure a course navigation tool at the course level,
  make sure it shows up in the course's navigation

- make sure :default => 'disabled' course navigation tools don't
  appear by default in the navigation, but can be enabled on
  the course settings page

- make sure :visibility => 'members' only shows up for course members

- make sure :visibility => 'admins' only shows up for course admins

- configure an account navigation tool at the account level,
  make sure it shows up in the account's navigation, and
  any sub-account's navigation

Change-Id: I977da3c6b89a9e32b4cff4c2b6b221f8162782ff
Reviewed-on: https://gerrit.instructure.com/5427
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-11-04 17:07:17 -06:00
Cody Cutrer c59c0f593f refactor user creation/invitations closes #5833
fixes #5573, #5572, #5753

 * communication channels are now only unique within a single user
 * UserList changes
   * Always resolve pseudonym#unique_ids
   * Support looking up by SMS CCs
   * Option to either require e-mails match an existing CC,
     or e-mails that don't match a Pseudonym will always be
     returned unattached (relying on better merging behavior
     to not have a gazillion accounts created)
   * Method to return users, creating new ones (*without* a
     Pseudonym) if necessary. (can't create with a pseudonym,
     since Pseudonym#unique_id is still unique, I can't have
     multiple outstanding users with the same unique_id)
 * EnrollmentsFromUserList is mostly gutted, now using UserList's
   functionality directy.
 * Use UserList for adding account admins, removing the now
   unused Account#add_admin => User#find_by_email/User#assert_by_email
   codepath
 * Update UsersController#create to not worry about duplicate
   communication channels
 * Remove AccountsController#add_user, and just use
   UsersController#create
 * Change SIS::UserImporter to send out a merge opportunity
   e-mail if a conflicting CC is found (but still create the CC)
 * In /profile, don't worry about conflicting CCs (the CC confirmation
   process will now allow merging)
   * Remove CommunicationChannelsController#try_merge and #merge
 * For the non-simple case of CoursesController#enrollment_invitation
   redirect to /register (CommunicationsChannelController#confirm)
   * Remove CoursesController#transfer_enrollment
 * Move PseudonymsController#registration_confirmation to
   CommunicationChannelsController#confirm (have to be able to
   register an account without a Pseudonym yet)
   * Fold the old direct confirm functionality in, if there are
     no available merge opportunities
   * Allow merging the new account with the currently logged in user
   * Allow changing the Pseudonym#unique_id when registering a new
     account (since there might be conflicts)
   * Display a list of merge opportunities based on conflicting
     communication channels
     * Provide link(s) to log in as the other user,
       redirecting back to the registration page after login is
       complete (to complete the merge as the current user)
   * Remove several assert_* methods that are no longer needed
 * Update PseudonymSessionsController a bit to deal with the new
   way of dealing with conflicting CCs (especially CCs from LDAP),
   and to redirect back to the registration/confirmation page when
   attempting to do a merge
 * Expose the open_registration setting; use it to control if
   inviting users to a course is able to create new users

Change-Id: If2f38818a71af656854d3bf8431ddbf5dcb84691
Reviewed-on: https://gerrit.instructure.com/6149
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-24 12:07:08 -06:00
Ryan Shaw 93db186d85 use official jQueryUI autocomplete plugin
there were a few little bugs with the old one
we were using.  this change also makes them accessible
and keyboard navigable.

removed input type="search" because the rounded corners
webkit adds makes it look bad with the autocomplete dropdown.

fixes #5548

Change-Id: Iff1c8516fdc6886bd6b5d190d1b878497b6a80be
Reviewed-on: https://gerrit.instructure.com/6249
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2011-10-18 10:19:34 -06:00
JT Olds dab4973c64 show individual grade publishing status results on the course settings page
Change-Id: I81ddbc77fbc7ac5db4d1b26e88afa73477b2c26c
Reviewed-on: https://gerrit.instructure.com/5950
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-11 13:18:59 -06:00
Jacob Fugal 16f6757044 s/access/participate in/
enrollment restriction by end-date only prevents adding new submissions,
posts, etc. to the course; students can still access other read-only
aspects of the course.

fixes #5759

Change-Id: I41d0ac8d375471744e49082deb72476b1e2d9803
Reviewed-on: https://gerrit.instructure.com/5827
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-26 15:48:49 -06:00
Cody Cutrer a36d570b37 s/course_details/settings/g closes #5458
leave the old route in as well

Change-Id: Ifdbc4bdf9d23d866d941fac0b33cff456514e89f
Reviewed-on: https://gerrit.instructure.com/5345
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-07 12:57:41 -06:00