Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
With CD1 I used to be able to get a list of all the items in the navigation bar for a course.
In the CD2 documentation it says that I should be able to find this information in the Courses table...
tab_configuration (Annotated[bounded_str, JsonStringToJsonObject(), SpecialConversion()] | None) – A JSON serialized list detailing the order and visibility status of tabs in the left-hand navigation for the course.
However, I can't see tab_configuration in there. Does anyone know how I can get this information?
Solved! Go to Solution.
Hello everyone,
I have seen the struggle and questions around this and I went after this a bit. I see and understand that the documentation was not clear enough on the tab_configuration column, I will update the relevant documentation with the info that I'm sharing here as well.
So when you see this JSON from CD2 courses table tab_configuration column:
[
{
"id": 0
},
{
"id": "context_external_tool_8923"
},
{
"id": 14,
"hidden": true
},
{
"id": 5,
"hidden": true
},
{
"id": 6,
"hidden": true
},
{
"id": 1,
"hidden": true
},
{
"id": 3,
"hidden": true
},
{
"id": 8,
"hidden": true
},
{
"id": 2,
"hidden": true
},
{
"id": 11,
"hidden": true
},
{
"id": 15,
"hidden": true
},
{
"id": 18,
"hidden": true
},
{
"id": 4,
"hidden": true
},
{
"id": 10,
"hidden": true
},
{
"id": 12,
"hidden": true
},
{
"id": 17,
"hidden": true
}
]
And you might ask what are these numbers. (This is from my test account so this is why it is weird)
The answer is here: https://github.com/instructure/canvas-lms/blob/master/app/models/course.rb#L3147
So "id":3 is Assignments from this list.
"id":"context_external_tool_8923" is Studio LTI app. You can look up the id in the context_external_tools table "id" column and get the friendly name from the "name" column.
I hope "hidden": true/false speaks for itself 🙂
I hope this helps understanding tab_configuration field!
Please note that there is significant logic around these constant values (as you can see from the code) to decide if tabs are actually visible to the current user.
I have just run
dap snapshot --namespace canvas --table courses --format csv
on my test account and there is a value.tab_configuration column filled up with JSON in my CSV.
It is also available in the documentation, but I guess you have copied the info from there.
What tool have you used to get your data through the Query API?
The data is stored in our data warehouse and I query all courses from there in Power BI. I haven't been running API queries at all.
@a1222679 Unlike CD1's course_ui_canvas_navigation_dim table, CD2's courses.tab_configuration field is null when the course navigation menu has not been modified. It is a shame that the documentation does not explicitly say default values are excluded from the field.
There was a thread about this table last year that may be helpful to you. CD2 Courses table - tab configuration field .
Thank you @stimme I hadn't seen that.
Hello everyone,
I have seen the struggle and questions around this and I went after this a bit. I see and understand that the documentation was not clear enough on the tab_configuration column, I will update the relevant documentation with the info that I'm sharing here as well.
So when you see this JSON from CD2 courses table tab_configuration column:
[
{
"id": 0
},
{
"id": "context_external_tool_8923"
},
{
"id": 14,
"hidden": true
},
{
"id": 5,
"hidden": true
},
{
"id": 6,
"hidden": true
},
{
"id": 1,
"hidden": true
},
{
"id": 3,
"hidden": true
},
{
"id": 8,
"hidden": true
},
{
"id": 2,
"hidden": true
},
{
"id": 11,
"hidden": true
},
{
"id": 15,
"hidden": true
},
{
"id": 18,
"hidden": true
},
{
"id": 4,
"hidden": true
},
{
"id": 10,
"hidden": true
},
{
"id": 12,
"hidden": true
},
{
"id": 17,
"hidden": true
}
]
And you might ask what are these numbers. (This is from my test account so this is why it is weird)
The answer is here: https://github.com/instructure/canvas-lms/blob/master/app/models/course.rb#L3147
So "id":3 is Assignments from this list.
"id":"context_external_tool_8923" is Studio LTI app. You can look up the id in the context_external_tools table "id" column and get the friendly name from the "name" column.
I hope "hidden": true/false speaks for itself 🙂
I hope this helps understanding tab_configuration field!
Please note that there is significant logic around these constant values (as you can see from the code) to decide if tabs are actually visible to the current user.
That's awesome, thank you @sgergely
To participate in the Instructure Community, you need to sign up or log in:
Sign In