To Our Amazing Educators Everywhere,
Happy Teacher Appreciation Week!
Found this content helpful? Log in or sign up to leave a like!
Hello - does anyone have experience using the tab configuration field in the courses table?
The CD1 position and visible fields didn't carry over to CD2. Instead, they are "derived from courses.tab_configuration YAML serialized list". Here is an example of the tab configuration content for one course:
-----
[{"id":0},{"id":"context_external_tool_74776"},{"id":14},{"id":10},{"id":8},{"id":5},{"id":6},{"id":"context_external_tool_97850"},{"id":"context_external_tool_132739"},{"id":"context_external_tool_12","hidden":true},{"id":"context_external_tool_48448","hidden":true},{"id":"context_external_tool_11","hidden":true},{"id":"context_external_tool_54","hidden":true},{"id":"context_external_tool_56139","hidden":true},{"id":18,"hidden":true},{"id":15,"hidden":true},{"id":2,"hidden":true},{"id":3,"hidden":true},{"id":4,"hidden":true},{"id":11,"hidden":true},{"id":16,"hidden":true},{"id":"context_external_tool_6668","hidden":true},{"id":"context_external_tool_34687","hidden":true},{"id":"context_external_tool_35108","hidden":true},{"id":"context_external_tool_53683","hidden":true},{"id":"context_external_tool_57148","hidden":true},{"id":1,"hidden":true},{"id":"context_external_tool_102460","hidden":true},{"id":"context_external_tool_109442","hidden":true},{"id":"context_external_tool_121828","hidden":true},{"id":"context_external_tool_129681","hidden":true},{"id":"context_external_tool_133123","hidden":true}]
-----
This introduces a few questions:
1. how to list the sequence of items on the course navigation using a numerical indicator? (i.e., recreate the CD1 position field)
2. how to determine which items in the course navigation are visible and those which are hidden? (i.e., recreate the CD1 visible field)
3. how to establish a relationship between this tab configuration field and the context_external _tools table? Can this be done using a calculated field using my current tool of choice (Tableau) or do I need to perform a data extract, process the data, then connect the data extract as a second data source in Tableau?
Of course before getting started we need to confirm if the id numbers in the YAML list are consistent across courses. There is no mention of this that I can find in the CD2 documentation. For example id 0 = Home, id 14 = announcements, etc. If the numbers are consistent, then that would give a basis for creation of a calculated field which identifies the id numbers.
And it appears that I’ll also need to list the external tool id numbers and create a calculated field that lists the tool by name. For example,
IF CONTAINS ( [tab_configuration], ‘tool_74776”}’ THEN ‘Tool Name - Visible’
ELSIF CONTAINS ( [tab_configuration], ‘tool_74776","hidden":true’ THEN ‘Tool Name - Hidden’
etc.
I might then split it into two fields (tool name and then visible status). That is easy enough.
Overall though I'd say the process was simpler when course navigation item fields were represented in their own table as they were in CD1. That was plug and play where here with CD2 we need to create several solutions.
Use case: We need the position field as we often batch enable tools and are asked to place them in a specific location in the course navigation. This dashboard also helps inform positioning of navigation items and this helps our quality control efforts.
=====
My support ticket: Case 09989758 ref:_00DA0Ibsk._5003m1YQahk:ref
@Jeff_F I've been considering your questions about how the canvas.courses.tab_configuration field works. I looked at some examples with the Canvas GUI next to them. I suspect that the tab position is implicitly given by the order of the tabs in the list. When a "position": int key-value pair is present, I suspect the tab order has been changed from the default (not certain if this is Canvas-wide default or institution-wide default). Likewise with visibility, I think tabs are implicitly visible and actually hidden when the "hidden": true key-value pair is present for a tab.
The tab ids that start with "context_external_tool_" end with the canvas.context_external_tools.id value. Concatenating that string and that value would yield a field for joins. You can also get the tab display text from canvas.context_external_tools.settings.course_navigation.text. How best to process the JSON field depends on the tools in your stack. You said you prefer to work in Tableau. What is your data source type? Do you connect to flat files or a relational database server?
(We're using the dap client to load a postgres server. Postgres has some built-in functions to deal with CD2's JSON object and array fields.)
EDIT: I forgot to mention that for Canvas's native tools you could save the CD1 course_ui_canvas_navigation_dim table somewhere forever. I think the canvas_id field there matches the integer tab ids universally.
Hello @stimme - I appreciate your note. I hadn't yet received a reply from support and I am awaiting confirmation about the YAML list.
We access the data two ways - we pay for the RedShift live connection and use Tableau for internal uses and also download copies of these tables to our data warehouse to create visualizations used by administrators, faculty, etc..
I agree we can split the field contents and perhaps create our own fields or perhaps a table for this. Ahead of doing so, I'd like to see the documentation improved with the id's defined.
I agree with @Jeff_F ! I would also like to see the id's defined in the documentation. Luckily, I have access to CD1, but being new to Canvas, I never would have thought to look there.
We have also identified issues with the cd2 tab_configuration field / the lack of a replacement for the course_navigation_etc. tables from CD1 and have submitted a case to Instructure, as well as posting an Idea for how to improve this field: https://community.canvaslms.com/t5/Canvas-Ideas/Improve-course-navigation-links-tab-data-in-cd2/idi-... .
@Jeff_F I know this is an old thread, but did you ever hear anything from Instructure on your case?
Hello @almyers - while my case for this (#09989758) was closed on 2/13/2024 without resolution I was informed it would be attached to an open engineering case on 2/6/2024. Your interest is the first contact I've received for this since that time.
To participate in the Instructure Community, you need to sign up or log in:
Sign In