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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- fix active tab issue in sidebar on group settings page
- stats table is now composed of followers, collections, collection
items
Change-Id: I88df0001b1cdffcb7f92e7b365b3ae00880f72e8
* 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>
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>
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>
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>
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>
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>
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>