Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions server/config/constants.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
"API": {
"CHANNEL": "/action/channel/v1/*",
"FRAMEWORK": "/api/framework/v1/read/*",
"CHANNEL": "/action/channel/v2/*",
"FRAMEWORK": "/api/framework/v2/read/*",
"COMPOSITE": "/action/composite/v3/search",
"COMPOSITE_API": "/api/composite/v1/search",
"QUESTION_LIST": "/api/question/v2/list",
"USERS": "/action/users",
"TELEMMETRY": "/action/data/v3/telemetry",
"OBJECT_CATEGORY_DEFINITION": "/action/object/category/definition/v1/*",
"OBJECT_CATEGORY_DEFINITION": "/action/object/category/definition/v2/*",
"PREFIX": {
"ACTION": "/action",
"ASSETS": "/assets",
Expand All @@ -30,9 +30,9 @@ module.exports = {
"RETIRE": "/action/questionset/v2/retire/*"
},
"ASSET": {
"CREATE": "/action/asset/v1/create",
"CREATE": "/action/asset/v2/create",
"CONTENT_UPLOAD_URL": "/action/content/v3/upload/url/*",
"ASSET_UPLOAD": "/action/asset/v1/upload/*"
"ASSET_UPLOAD": "/action/asset/v2/upload/*"
}
}
}
1 change: 1 addition & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { EditConfigurationComponent } from './components/edit-configuration/edit
import { MatDialogModule } from '@angular/material/dialog';
import { MatSelectModule } from '@angular/material/select';
import { MatFormFieldModule } from '@angular/material/form-field';
import {MatMenuModule} from '@angular/material/menu';

import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { QuestionsetEditorComponent } from './components/questionset-editor/questionset-editor.component';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="twelve wide column ">
<div class="ui grid">
<div class="three wide column">
<div class="ui link card" (click)="createContent()">
<div class="ui link card" (click)="createContent('Practice Question Set')">
<div class="content">
<div class="textcontent">
<i class='my-icon file text outline icon'></i>
Expand All @@ -13,6 +13,28 @@
</div>
<p class="workspaceinstuction">Create Questionsets</p>
</div>
<div class="three wide column">
<div class="ui link card" [matMenuTriggerFor]="menu">
<div class="content">
<div class="textcontent">
<i class='my-icon file text outline icon'></i>
<span class="my-text">Shikshalokam QuestionSet</span>
</div>
</div>
</div>
<p class="workspaceinstuction">Create Questionsets</p>
<mat-menu #menu="matMenu">
<button mat-menu-item (click)="createContent('Observation')">
<span>Observation</span>
</button>
<button mat-menu-item (click)="createContent('Survey')">
<span>Survey</span>
</button>
<button mat-menu-item (click)="createContent('Observation with rubrics')">
<span>Observation with rubrics</span>
</button>
</mat-menu>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export class QuestionsetCreateComponent implements OnInit {
}
}

createContent(): void {
createContent(primaryCategory:string): void {
const requestData = {
questionset: {
name: 'Untitled QuestionSet',
mimeType: 'application/vnd.sunbird.questionset',
primaryCategory: 'Practice Question Set',
primaryCategory: primaryCategory,
createdBy: this.userService.userProfile.id,
createdFor: [this.userService.userProfile.channelId],
framework: this.userService.userProfile.frameworkId,
Expand Down