cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
astirling917
Community Participant

Change only Display Name?

Jump to solution

Ok, I've scoured through the discussions, Canvas guides, and random Google searches ... I'm looking for any assistance someone with way better JavaScript skills than me can provide.

Does anyone have a custom script that will allow me to hide an option on the profile edit page for students? I'm trying to allow them to only change their display name, but not the full name that is assigned via the SIS.

I know that there is a Feature Idea in product radar stage about this specifically, but I was just wondering if anyone had a work around right now. 

Thanks for any help you can provide,

Anna

1 Solution

Accepted Solutions
c_carrillo1
Community Participant

We were able to allow our students to change their Display Name without allowing them to change their full name or sortable name by adding the following two lines to the universal javascript code in the theme editor:


document.getElementById('user_sortable_name').readOnly = true;
document.getElementById('user_name').readOnly = true;

 

These two lines gray out the full name and sortable name options.  To enable them to edit the Display Name field, you still have to set the option to allow students to edit their names in the Admin Settings.

 
 

View solution in original post

5 Replies
kona
Community Coach
Community Coach

 @MSJC-DELTA , due to the technical nature of this question I’m going to share it with the Canvas Developers‌ group in the Community to see if they can help. It’s seems like this would require some custom global JavaScript, but that’s well beyond my area of expertise! You might consider joining this group so you can have access to their resources and information. 

Hope this helps!

Kona

astirling917
Community Participant

Thanks for the assist  @kona  hopefully a JavaScript wiz out there will come to my rescue. Smiley Wink

~Anna

Anna,

I don't have any great answers except to say; I wish there were an option to allow people to change just their display name.  

Having said that I do have a possible work around.  Our school uses PeopleSoft as our SIS and it also has some soft of preferred name field.  I don't the rules in PeopleSoft about who gets to update that field or how, but we use it to populate the Display name in Canvas through our SIS uploads.  So presumably a student (or teacher) can update the name in our SIS and it propagates to Canvas via our SIS nightly feeds.

Rick

c_carrillo1
Community Participant

We were able to allow our students to change their Display Name without allowing them to change their full name or sortable name by adding the following two lines to the universal javascript code in the theme editor:


document.getElementById('user_sortable_name').readOnly = true;
document.getElementById('user_name').readOnly = true;

 

These two lines gray out the full name and sortable name options.  To enable them to edit the Display Name field, you still have to set the option to allow students to edit their names in the Admin Settings.

 
 

View solution in original post

gpillsbury
Community Participant

I just tested this in our environment and it works as expected.  Only Display Name is editable.