Business context:
A logged in user should be able to see groups created by him/her + groups in which s/he is a member
As a logged in user, I should be able to view all my groups, So that I can perform various actions within the group
Acceptance criteria:
Pre-conditions:
Logged in user has clicked the option to view all groups
Verify that:
User is able to view all groups where s/he is admin (group can be created by him/her or assigned to him/her )
User is able to view all groups in which s/he is a member
A group has a special indication if s/he is the Admin of that group (group creator or assigned as admin)
All the groups where s/he is an admin is shown first, followed by groups that s/he is part of
Groups are ordered by creation date - recent to last (within admin & non-admin sections)
User sees an option to create a group
Form Configs Associated:
Master Component List
Following are the list of components required to be re-used across Mobile & Portal :
Please refer to following link for CC
https://github.com/Sunbird-Ed/SunbirdEd-consumption-ngcomponents/
Plugin/Component | Plugin Invocation | MetaData | PluginType |
---|---|---|---|
Course |
| {} | Card |
Announcement |
| {} | View Only-Card |
Chat | <sb-chat-room [chatRoomId]={{?}}></sb-chat-room> | {} | Module |
Discussion Board | <sb-discussion-board boardId={{?}}></sb-discussion-board> | {} | Module |
Text Book |
| {} | Card |
Content |
| {} | Card |
Collection |
| {} | Card |
Creation Form Config
Any Form Configs associated with the config will completely gets driven by backend metdata to associate forms. There is a generic Abstracted Library being built called as SB-forms. Please refer the link below:
Type | Config |
---|---|
AnnouncementCreate | {formName:””,fields:[{TextBox},{TextArea},{CheckBox},{Submit}]} |
ChatCreate | {formName:””,fields:[{TextBox},{TextArea},{CheckBox},{Submit}]} |
Discussion BoardCreate | {formName:””,fields:[formName:””,{TextBox},{TextArea},{CheckBox},{Submit}]} |
…. |
Element Config
Back End Design
Group
Cassandra
Code Block | ||
---|---|---|
| ||
{
"id": uuid, // PARTITION key
"name": human_friendly_name, // need not be unique [Indexed]
"activities": "[{
"activity_id/plugin_id": "activityId" // Component Information.
}]", // MAP [NO index created. No need to query specific]
"createdBy": uuid,
"createdOn": timestamp,
"updatedBy": uuid,
"updatedOn": timestamp,
"status": "active", "inactive",
"joinStrategy": InvitationOnly, Moderation - TBD
}
PRIMARY_KEY(id, name) |
Groups can be deleted only by the creator, not by the admin.
ElasticSearch
Solution 1:
The idea is to try eliminate ES. We will start doing reads directly from primary database.
activities is expanded as map. All other details flow to ES.
Solution 2:
Have a separate table meant to have multiple information sourced with a content.
Activity_Data / Plugin_data
Cassandra
Code Block | ||
---|---|---|
| ||
{
"id": activity_id/plugin_id,
"contentId" : "do_id1",
"validity" :
"data": {
"name": "The big bang theory",
"orgName": "",
"type" : "Course",
// Extra Meta} // Not indexed, just serves as a placeholder to store any runtime data.
}
PRIMARY_KEY(id) |
Group_Member
Cassandra
Code Block | ||
---|---|---|
| ||
{
"id": group_uuid, // PARTITION key
"memberId": userId // This is not an array, because we need to capture information who added, when added etc
"role": [
"isAdmin", "isMember", "// We can add moderator"
],
"addedBy": uuid,
"addedOn": timestamp,
"removedBy": uuid,
"removedOn": timestamp,
"updatedBy": uuid,
"updatedOn": timestamp
}
PRIMARY_KEY(id, role, memberId) |
Plugin Registry
Cassandra
Code Block | ||
---|---|---|
| ||
{
"id": plugin_instance_id, // PARTITION key
"ver": "1.0",
"isActive": boolean,
"shortId": "org.ekstep.launcher",
"author": "string", // Default to "Sunbird"
"description": "",
"publishedDate": "",
"data": {
}
}
PRIMARY_KEY(id, author, isActive) |
API
Groups
GroupListing Against a User | 1 API read | |
Members against a Group | 1 API read | |
Activities Listing | 1 API read | |
Create a Group | ||
Update a Group | ||
Delete the Group (Mostly Soft Delete) | ||
Group |