Discussions - Solution Design
User Profile
Following Sunbird user information will be stored in NodeBB:
oauthId - Sunbird User Identifier (UUID)
username - Sunbird username (alphanumeric)
this will be used for display and mentions.
email - Instead of Sunbird user’s email, a dummy email is generated using username and the domain name (e.g: username123@dev.sunbirded.org)
Email notifications will be disabled in NodeBB and email field will be marked as hidden
Creation
User account will be created in NodeBB:
when user logs into the NodeBB for the first time
or when user is given access to a NodeBB category
Sunbird Discussions UseCases Mapping
Trackable Objects
Users need to enrol into a batch for consuming trackable objects in Sunbird. Trackable objects can be a Content, Collection or a QuestionSet object. All trackable objects in Sunbird have following attributes:
TenantId - identifier of the tenant who owns (i.e. created/published) the object in Sunbird
Category name, e.g.: Course, TV Show, Quiz, etc
BatchId - identifier of the batch into which the users enrol
Workflow
Batch Creation:
NodeBB category is created with name as <object_name>-<batch_name> (e.g.: Classroom Management - Batch 01).
NodeBB Category is created under the hierarchy <tenant_name>/<category_name> (e.g. NCERT/Course). Both the <tenant_name> category and <category_name> category are marked as sections, i.e. no topics/posts are allowed in those categories.
A mapping is created for between the batch id and category id in a new table.
The table will have Object Type, Object Id, Category Id, Category Status fields.
Batch creator and mentor are given moderator privileges to the NodeBB category.
A NodeBB group with identifier as “Batch-<batch_id>“ (e.g.: Batch-342324393293222) is created and is given read/write/vote privileges to the NodeBB category.
User enrols into batch:
If user already exists in NodeBB, add user as member to the NodeBB group with identifier as “Batch-<batch_id>“
If user does not exist in NodeBB, create the user in NodeBB first and then add user as member to the NodeBB group
Batch has ended:
Write and Vote privileges for the NodeBB Group with group id as “Batch-<batch_id>“ will be removed. Only read access will be retained
Non-Trackable Objects
Non trackable objects in Sunbird can be consumed by users without enrolment and without login also. These objects do not have a batch created for them but have a category name and tenant.
Workflow
Object Publish:
If object has a metadata attribute “enableDiscussions“ set as true, create a NodeBB category with name as “<object_name>” (e.g.: Science Textbook for Class VII) when the object is published.
NodeBB Category is created under the hierarchy <tenant_name>/<category_name> (e.g. NCERT/Textbook). Both the <tenant_name> category and <category_name> category are marked as sections, i.e. no topics/posts are allowed in those categories.
A mapping is created for between the object id and category id in a mapping table.
Content creator, collaborators and reviewers are given moderator access to this category.
Registered-Users group in NodeBB is given privileges to write posts (i.e. reply) and vote in the NodeBB category.
To start with, only moderators can create topics in the NodeBB category.
A new NodeBB group with identifier as “<category_name>-<object_id>” (Textbook-do_1234349) is created and is given read/write/vote access to the NodeBB category. (advanced feature - may enable in future, if required)
Users from Registered-Users group who have either previously replied/voted in this category and achieved a reputation level (above a configured level) are added to this NodeBB group.
This will be implemented using a custom NodeBB plugin.
When object is retired in Sunbird:
The corresponding NodeBB category will be disabled.
Sunbird Groups
Users in Sunbird can create groups and can enable discussions for the users within that group.
Workflow
When group is created:
NodeBB category is created with name as “Group-<group_name>” (e.g.: Group - DPS Ghaziabad Class X Group).
NodeBB Category is created under the hierarchy “Sunbird Groups“. “Sunbird Groups“ category is marked as a section, i.e. no topics/posts are allowed in this category.
A mapping is created for between the sunbird group id and NodeBB category id in a mapping table.
Group creator is given moderator privilege in the NodeBB category
When a user is added to the group
If user already exists in NodeBB, user is given read/write/vote access to the NodeBB category
If user does not exist in NodeBB, user is created in NodeBB first and then read/write/vote access to the NodeBB caategory
When a user is made admin to the group
the user is given moderator privilege in the NodeBB category
When a user is removed as admin
moderator privilege for the user is removed in the NodeBB category
When a user leaves the group or removed from the group
all privileges for the user in the NodeBB category are removed
When the group is disabled/deleted
NodeBB category is disabled
Sunbird Announcements
To enable instance level announcements to all registered users.
Tenant Announcements
Vidyadaan Projects
Content Collaboration
Category Hierarchy
Announcements - Category for instance level announcements
Sunbird Groups - Parent section which contains all categories created for Sunbird groups
Group - DPS Ghaziabad Class X
Group - <group_name>
CBSE
TV Show
Classroom Management (start date 1 - end date 1)
Announcements - Category for CBSE announcements
VDN Projects
KVS 6-8 Hindi & Science
<project_name>
Content Creation
Textbook
do_3232898429232
<content_id>
Explanation Resource
do_293239288292
<content_id>
Course
Classroom Management (start date 1 - end date 1)
Classroom Management (start date 2 - end date 2)
<course_name>-<batch-name>
Textbook
Science Textbook for Class VII
<textbook_name>
Quiz
Class X Hindi Practice Test
National Maths Quiz - November 2020
TV Show
<content_category_name>
Karnataka
General
<other_tenant_sections>
Tags
Tags can be added to topics under a category. We will use these tags to improve the discoverability of topics/posts, notifications and for SLAs of replies & moderation activities. Basically, tags will be used for targeting purposes - which topic/post is relevant for which user.
Automated Tags
When a new topic is created, system will use the profile of the user who is posting the topic and the Sunbird object associated with the category to add the following tags:
Tenant Id of the object associated with the category.
E.g: Tenant who is running the batch or tenant who created the VDN project
Location Ids of the state & district of the user who is posting the topic.
Board, medium, grade & subject of the object (if applicable) associated with the category.
Board, medium, grade & subject of the user who is posting the topic.
User persona & school information (e.g.: Teacher in ZP High School, KR Puram).
Each of the tags will be classified with the tag category information like board:CBSE, subject:Maths, etc.
Open Question
Can we store these as tags on the topic in NodeBB? will these be potential data privacy violations?
Or store only the user id & object id as tags on the topic and infer the rest of information at runtime?
User Provided Tags
Users can also add tags to a topic while creating it. The categories of tags will be restricted to categories like location, board, medium, grade, subject, persona, school. User provided tags will be useful in scenarios like: targeting an announcement to a group of users from a school or a location.
Tags will be used only as soft filters to rank topics/posts relevant to users higher than other topics/posts.
Usage of Tags
Highlight the topics which have no responses to relevant users (based on tags) - this will ensure all topics will have responses within the SLA
Highlight the posts that are pending for moderation to relevant users (based on tags) - to ensure moderation SLAs are met