Community

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

Display Course Code in Admin Course Search Results

Display Course Code in Admin Course Search Results

(1)

The new admin course search is a big improvement over the previous search in a number of ways.  However, course code is no longer visible in the results which makes identifying multiple results difficult, particularly across multiple sections or terms of the same course.  The course title does not always provide enough information, and often we don't know what the course title is, because we are searching with a partial course code.  I realize that this information was cut in order to declutter the environment, but course code is a vital piece of information.  Either add course code as a column, or allow us to customize the columns.

14 Comments
chriscas
Community Champion

I voted up on this, but I do want to list a couple caveats here...  I'd only be okay with this if it didn't slow down the page/search load times (it's already a bit slow as-is).  I'd also only be okay with this if it was an additional column, as the sis_id for us is way more important than the course code.  Our course title and course code are very similar to each other, so the code wouldn't really be beneficial for us, but I know other places have different configs where this could be useful.

jennifer_lawlor
New Member

I just created an idea for this because my initial search to add this course code did not find this idea... Here are my screenshots to help show what we need...

Current behavior:

 280123_course search current.jpg

Requested behavior:

280130_course search.jpg

connor_orourke
New Member

We have professors that use the same courses and associate faculty with course numbers as a result.  The title of the course is often long and sometimes varies.  Having the ability to look up a course by the course code is essential when assisting the teaching assistant or faculty when communicating with them.

adiba_nabiz
New Member

I also voted up, many faculty/TA and I use the course code search. It is fast and easy.  The course title is long. Sometimes it is difficult to remember the whole title. so Yes we want the Course Code.

ninafox
Community Member

I voted up but we also need and find searching by SIS ID an necessity so please, enable both options.  Many thanks in advance of the consideration.

chriscas
Community Champion

Hi ninafox

As far as I know, the current search does work for the sis_id field.  Are you seeing different behavior in your instance?

EDIT: Upon second reading I think you're just in agreement that sis_id needs to stay.  khirschmann‌, you might get more support and votes for this idea if you remove the "I personally would rather have course code over SIS ID" bit at the end., asit's almost two distinct ideas to add course_code and remove sis_id and some people (like Nina and me) definitely don't want the sis_id removed

-Chris

ninafox
Community Member

Hi Christopher, yes, I am in favor of keeping the sis_id field and adding in the course_code field search. Sis_id is an essential search for us.

khirschmann1
New Member

Thank you for this illustration.  For us the SIS ID is a 4 digit code that has nothing in common with Course Code.  I realize for others SIS ID is important, but Course Code is far more pertinent in our situation.

khirschmann1
New Member

 @connor_orourke ‌ just for the sake of clarity, you can currently search by course code, you just won't see the course code listed in the results.

khirschmann1
New Member

Thank you for the suggest chriscas‌.  I made the change.

connor_orourke
New Member

Yes, that is correct.

James
Community Champion

 @jennifer_lawlor , nice to meet you at InstructureCon.

I briefly looked into the issue and what I thought I saw Thursday night after we talked is not what I'm experiencing now. Or maybe my memory is just getting bad. I can't remember exactly what it was you wanted, so I'm going to base it off what you wrote above about wanting the course code in there.

Anyway, it looks like the information fetched by Canvas includes the course code, they're just not choosing to display it. They don't expose the information they download, which means that you will need to download it again if you want to display it. Hopefully that won't take very long because it should still be in the Canvas cache (Canvas caches recent requests to speed up additional requests), especially if you fetch it again right away.

You should be able to use the query parameter (search) portion of the document.location to get the API call that needs made. For example, when the URL shows /accounts/97773?page=3&sort=course_name, the API call made to fetch the data is

/api/v1/accounts/97773/courses?
page=3
&sort=course_name
&order=asc
&search_by=course
&include[]=total_students
&include[]=teachers
&include[]=subaccount
&include[]=term
&per_page=15

You can exclude all of the include[] items since you're not modifying or needing that information. It should speed up the call as well.

The information displayed is full of data-reactid values, which confirms that they are using React JS to display the information. Along with that comes a lack of usable classes or IDs that can be used as CSS selectors. I've done similar work with the sorting the roster page script that I wrote, but that was very non-extendable -- especially for non-US-English locales -- and looks for text in the header to determine what the columns contained.

I don't know enough about React to know if it's helpful, but it appears that for this table, each row has a reactid that has a .0, .1, .2, etc., appended to the end to refer to the column. Rather than relying on reactid, you could also get the nth-child to select the column you want.

In the grand scheme, you're probably going to be looking at Mutation Observers since that HTML isn't there and is updated with each new link. Once the HTML is rendered, you can add in your column or do the hover effect to get the tooltip.

I didn't dig into trying to actually look up crosslisting or get a complete working solution. I just thought I'd share what I had found with you and Ishmael(?).

James
Community Champion

There is a similar thread going on, Custom JavaScript for Admin/Courses Page, that has started having some technical discussion about what's needed.

rkahn
Community Member

This suggestion -- adding Course Code to the Courses Search results -- would be incredibly useful to us.