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.
cc @stimme, @Jeff_F