Commit Graph

31 Commits

Author SHA1 Message Date
Ryan Shaw 8af0fe3391 fix link to user files when newfiles is turned on
fixes: CNVS-16393

/dashboard/files did the same thing as /files
in old files. we don't want to continue to support
the /dashboard prefixed url and prefer to just
use /files.

test plan:
* with newfiles turned off:
* click your name in very top (next to "inbox settings logout")
* click the "Files" tab on the left
* it should render the oldfiles browsing interface

* now, with: User.find(<your_user_id>).account.enable_feature!(:better_file_browsing)
* do the same thing, and it should render newfiles

* they both should go to /files. not /dashboard/files

Change-Id: Ic18e6d93031b9ebc6798849cadc441c2a664e1f0
Reviewed-on: https://gerrit.instructure.com/44337
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-11-14 16:28:46 +00:00
Mark Severson 8611d9ce09 add observees page to user profile
test plan:
 * navigate to /profile/observees
 * add new observees (specifying usernames & passwords)
 * new observees should appear in the list

notes:
 - the 'Observing' tab does not appear until at least one observee has
   been added for the user (and the page is refreshed)
 - the observing user should gain Observer enrollments for courses the
   observed user is enrolled in (both present and future)

closes CNVS-13356

Change-Id: Icda0f0d256fc73bcb554523db6436457941d8b58
Reviewed-on: https://gerrit.instructure.com/37283
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-09 16:30:20 +00:00
Anthus Williams 828981e72c define exportable attributes/associations on models
instead of passing an :exportable option to
ActiveRecord::Associations, simply define a constant
on the class containing exportable associations and
attributes. This is due to :exportable breaking
ActiveRecord, and we can't simply monkey-patch in
config/initializers because models are included in
migrations before the initializers are run

Change-Id: I11f1a6b4570c397d8e01010c517bc6efdac7afca
Reviewed-on: https://gerrit.instructure.com/33235
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Anthus Williams <awilliams@instructure.com>
QA-Review: Anthus Williams <awilliams@instructure.com>
2014-05-06 23:54:24 +00:00
Mark Ericksen 30fb087d37 prevent text overflow for user_profile.title
fixes CNVS-3370

testing steps:
- on a user's user profile page (/about/<user_id>),
  set the "Title" to something longer than 255 characters
- verify prevented from updating and the
   error message says: "Title is too long"
- verify still prevented from saving when user has cleared
  the "Name" input

Change-Id: I20a10edfe747d558460ee268a40a8f88a22c6514
Reviewed-on: https://gerrit.instructure.com/23635
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2013-08-23 20:05:19 +00:00
Cameron Matheson 0f6eae3cf1 include root_account in section_tabs cache key
fixes #9879

The profile nav link should only be shown when @domain_root_account has
profiles enabled.

Test plan:
  * make sure caching is enabled
  * go to to your user settings on an account with profiles enabled
    - you should see a profile link in the sidebar
  * switch to an account that doesn't have profiles
    - you should no longer see the profile tab in the sidebar

Change-Id: If502829ef9d0bfa8117df82e241beb8cd61e03a9
Reviewed-on: https://gerrit.instructure.com/12935
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Bryan Madsen <bryan@instructure.com>
Tested-by: Bryan Madsen <bryan@instructure.com>
2012-08-17 14:15:10 -06:00
Jon Jensen f75c161860 allow unconfirmed users to set communication preferences, refs #9897
when users sign up via open registration, they can use canvas before
confirming their email address (and setting a password). since we show
a "Configure Communication Preferences" button, it makes sense to let them
actually do it (instead of getting a big scary warning). notifications
won't actually be sent until the communication channel gets confirmed, so
we warn them about that.

test plan:
1. sign up as a teacher via /register
2. when you get to the dashboard, click the "Configure Communication
   Preferences" button
3. you should see notification preferences
4. you should be able to update them
5. you should see a reminder to confirm your email
6. the "re-send email" link in the reminder should work

Change-Id: I585a69b8667ef82eb2e4c3005179bc14377e467b
Reviewed-on: https://gerrit.instructure.com/12911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2012-08-14 13:03:43 -06:00
Cameron Matheson 7b9c6da6ef pass user.id to path helper instead of user
The user was getting marshalled when caching the profile tabs.

Test plan:
  * Go to your profile page on an account with profiles enabled
  * The profile tab should still work

Change-Id: I60b4882859396fd3e9cc63416b75ae831f7fe4f0
Reviewed-on: https://gerrit.instructure.com/12804
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-08-07 18:17:39 -06:00
Cameron Matheson 11682b455e profile links: don't save blank links
Test plan:
  * save your profile page with a row of blank links
  * the blank row should not get saved

Change-Id: I81372e653295298a6cee4e418a02da2fb616ac31
Reviewed-on: https://gerrit.instructure.com/12573
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-30 10:07:26 -06:00
Ryan Florence 15bdef7fec new profile page closes #9369
users have a new profile page that displays a
custom bio, links, and contact methods as well as
how the viewing user knows them.

this profile can be a part of any page and is
displayed on the user in a course pages as well.

profiles are found at /about/:user_id

Change-Id: I3339144135d67415af9068d18776b691320c1938
Reviewed-on: https://gerrit.instructure.com/12298
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-27 10:56:10 -06:00
Cameron Matheson 55e94efb87 updated user_profile API endpoints
Adds 'title' and 'bio' information to the profile api endpoint.  Also
optionally includes user_service and user_profile_link information.

Also includes a new update_profile API endpoint for updating profile
information (short_name, bio, title) , user_profile_links, and
user_service visibility.

The update_profile endpoint should replace the ProfileController#update
action as soon as we move that (when the User settings page is re-done).

Test plan:
  * make API calls to update/query the profile information OR
    wait for the new profile page which will exercise the new
    {user_profile,user_service,user_profile_link}_json methods

Change-Id: Ia4d902bf190ca51085216b71c5c9215d0dbf2f98
Reviewed-on: https://gerrit.instructure.com/12323
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
2012-07-25 16:26:38 -06:00
Cameron Matheson 2b75ed5cc5 user_profile_links table and model
The new profile page has a section for users to add links to anything
they want.  Nothing to test in this commit.

Change-Id: Ia25c6df89d29a2df498ee9c9b75af7e56e782450
Reviewed-on: https://gerrit.instructure.com/12335
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-24 10:03:04 -06:00
Jon Jensen 1916e76d68 registration refactor, temp login functionality, closes #9372
change registration flows for teachers, higher-ed students, and parents.
now users can start using canvas immediately before confirming their
email address (and setting a password). they get a nice big reminder when
they first view the dashboard, and can't edit their profile (or related
things) until they do so.

test plan:
1. go to the signup form for a teacher
2. fill it out
3. confirm that you are immediately logged in to the dashboard
4. confirm that you get a big popup when you first view the dashboard
5. confirm that you can't edit your profile
6. repeat steps 1-5 for higher-ed students (no join code)
7. repeat steps 1-5 for parents (observers)
8. confirm that students registering with a join code do not need to
   verify their email address (since no email is sent)

Change-Id: I4e7e1c083d70725fffd345016f1ca1eec4aeab13
Reviewed-on: https://gerrit.instructure.com/12172
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2012-07-19 13:21:05 -06:00
Cameron Matheson a8e556f768 create user_profile table
this moves the user bio to a new user_profile table.  We previously had
a UserProfile model that was a regular ruby class, but now it is using
ActiveRecord

Change-Id: I8848ef9b5f7e2a7bbb5c12df8044efe26388ae78
Reviewed-on: https://gerrit.instructure.com/12178
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2012-07-18 10:07:17 -06:00
Cameron Matheson 58ca5884a2 rename /profile/edit -> /profile/settings
There is some wording that should change as well, but I think we're
redoing the settings page soon so I'm going to leave that alone for now.

Test plan:
  * Click on the page to edit your profile, the URL should be
    /profile/settings instead of /profile/edit

Change-Id: Ida9ff2b24c1dc53b07cdf6c17a99152f8c5956af
Reviewed-on: https://gerrit.instructure.com/12134
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Cameron Matheson <cameron@instructure.com>
2012-07-12 14:02:13 -06:00
Cameron Matheson 8d6eff3a70 disable profiles based on account setting
fixes #9386

Test plan:
  * Click on the 'Profile' link in the header, you should go to the
    profile settings page
    - There should not be a 'Profile' tab in the left nav
  * Enable the 'enable_profiles' account setting for your user's
    account.  Clicking on 'Profile' should now take you to the new-style
    profile page

Change-Id: Ie2bcd41ae98ec93d6a423e00936d79fac291be0c
Reviewed-on: https://gerrit.instructure.com/12132
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
2012-07-11 11:19:30 -06:00
Cameron Matheson e9f5aaa129 fix broken profile sidebar
Change-Id: I4e247fc530ed58aef4e46553a9bd891c49ac77f6
2012-06-11 12:40:44 -06:00
Cameron Matheson db5c12af9b deprecate singleto profile url
Change-Id: I3542aff575e200aff4a953f1b8068ebd1f2ac20c
2012-06-11 12:35:10 -06:00
Cameron Matheson fa47409374 user profile tweaks
- fix active tab issue in sidebar on group settings page
- stats table is now composed of followers, collections, collection
  items

Change-Id: I88df0001b1cdffcb7f92e7b365b3ae00880f72e8
2012-06-04 17:24:27 -06:00
Cameron Matheson 4876273811 add sidebar to user's own profile page
this includes a new application layout (new_application) for pages that
need a sidebar

Change-Id: I621c66d30be3f2213dff20929c6d96b0573251c6
2012-05-24 15:22:42 -06:00
Cameron Matheson 977e342be6 move current user profile page to profile/edit
also adds a bio field to the user model

Change-Id: I5e4a77a39403a31462dbaeae20a289d5a5f6761c
2012-05-15 14:10:52 -06:00
Zach Wily 5433f63b29 fixes for ruby 1.9.3
* gemfile tweaks
 * removed ruby-debug (since it's broken in 1.9.3)
 * removed colons from case statements
 * turned off whiny nils for tests (they cause a 2X perf hit)
 * added utf-8 encoding markers to files with multibyte chars
 * removed an instance of calling String#map, which no longer works
 * fixed an issue in the assets file where the yaml emitter doesn't output the
   same whitespace as it did in 1.8.7
 * fix call to .map without block
 * fix yaml engine initialization for delayed jobs (was happening too late)
 * fix rspec instafail
 * fix UserProfile#id calls
 * fix ModelCache for instance_methods now returning symbols
 * fix user_spec collection not seeing the new objects
 * fix course specs where POST lines are slightly different in 1.9
 * fix utc_datetime in the time initializer

Change-Id: Ic95dda23cb910579e2828fb448323d4fc18902a2
Reviewed-on: https://gerrit.instructure.com/10705
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Zach Wily <zach@instructure.com>
2012-05-12 14:34:23 -06:00
Simon Williams 874b5489c1 student view; closes #6995
allows course admins to view the course from a student perspective. this is
accessible from a button on the course/settings page. They should be able to
interact with the course as a student would, including submitting homework and
quizzes. Right now there is one student view student per course, so if the
course has multiple administrators, they will all share the same student view
student.

There are a few things that won't work in student view the way the
would for a normal student, most notably access to conversations is disabled.
Additionally, any publicly visible action that the teacher takes while in
student view will still be publicly visible -- for example if the teacher posts
a discussion topic/reply as the student view student, it will be visible to the
whole class.

test-plan:
- (the following should be tried both as a full teacher and as
  a section-limited course admin)
- set up a few assignments, quizzes, discussions, and module progressions in
  a course.
- enter student view from the coures settings page.
- work through the things you set up above.
- leave student view from the upper right corner of the page.
- as a teacher you should be able to grade the fake student so that they can
  continue to progress.
- the student should not show up in the course users list
- the student should not show up at the account level at all:
  * total user list
  * statistics

Change-Id: I886a4663777f3ef2bdae594349ff6da6981e14ed
Reviewed-on: https://gerrit.instructure.com/9484
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2012-04-03 14:11:07 -06:00
Cameron Matheson 74e82ff818 Properly add/remove external tool tabs from nav
fixes #6769, #6939

Test plan:
  - enable caching with redis or memcached
  - log in to a course page
  - use the api to  add an external tool with course navigation (see the
    redmine bug)
  - refresh (you should see the external tool in the navigation)
  - delete the external tool
  - refresh (nav item should be gone)

Change-Id: I734bd726818ea84ffe333597eb0197db2200c235
Reviewed-on: https://gerrit.instructure.com/8141
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2012-01-24 21:15:07 -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
Jon Jensen 032f40765d account-level option to disable eportfolios, closes #5169
also tweaked named_context_url to work better with UserProfile
contexts

Change-Id: If16ef16db507c8713436d0d88a1867f206ecdf48
Reviewed-on: https://gerrit.instructure.com/5225
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-24 17:38:06 -06:00
Cody Cutrer 629fe79edb fix i18n of UserProfile tabs
it doesn't inherit from ActiveRecord::Base, so auto-scoping was failing

Change-Id: I2be462999768a385d7eb482e62279ecfc943df08
Reviewed-on: https://gerrit.instructure.com/4982
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-08 09:27:12 -06:00
Cody Cutrer fdf20c81fd fix tab css classes for non-english
Change-Id: I2bc504505e1c8817467304c55571d77395464c18
Reviewed-on: https://gerrit.instructure.com/4980
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-08 09:20:19 -06:00
Brian Palmer a17ddd6ec8 fix i18n on user profile tabs
Change-Id: I6ed7bfc5d71d36ee641a8c6bbe54208a2afeff80
Reviewed-on: https://gerrit.instructure.com/4326
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-06-22 12:28:51 -06:00
Jon Jensen d504f1ad62 user_profile and user_service i18n
Change-Id: I321a531c8217fa8bfb7545bc109d45786c91811c
Reviewed-on: https://gerrit.instructure.com/4324
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-06-22 09:57:46 -06:00
Brian Whitmer c493884e7c rename communication preferences to notification preferences
both names were actually being used, this will make it
consistent.

fixes #3781

Change-Id: I6ef6c791d4dca5d2934fa83fd6afaf4b5b9625a5
Reviewed-on: https://gerrit.instructure.com/2267
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-02-11 23:36:21 -07:00
Brian Whitmer 8b8173dcc9 Initial commit.
closes #6988138
2011-01-31 18:57:29 -07:00