Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
b4d0bce
Release-4.9 upgrade
Mar 24, 2022
a23de9c
Merge pull request #18 from Nivetha-M/release-4.8.0_cb
karthik-tarento Apr 1, 2022
85b4651
configuration param for timeout
Apr 5, 2022
1547e8d
Merge pull request #19 from Nivetha-M/release-4.8.0_cb
karthik-tarento Apr 6, 2022
34e3d43
Hierarchy update fix
May 5, 2022
d0a7723
Merge pull request #32 from Nivetha-M/release-4.8.0_cb-hierarchy-fix
somvitbhowmik May 5, 2022
fcbfe93
hierarchy fix
May 6, 2022
41fb728
env variable
May 6, 2022
433ee33
Hierarchy update fix
May 6, 2022
135ae95
Merge pull request #34 from Nivetha-M/release-4.8.0_cb-hierarchy-fix
karthik-tarento May 6, 2022
18d8154
Set default value as FALSE
karthik-tarento May 6, 2022
8fd5fb0
updateNodesToRetire changes
May 27, 2022
2fb0a58
Merge pull request #35 from Nivetha-M/release-4.8.0_cb
karthik-tarento May 27, 2022
c99425f
Added 'SentToPublish' state in 'reviewStatus' object
karthik-tarento Jul 12, 2022
6300c00
Added new type of attributes for Question
karthik-tarento Jul 12, 2022
d1170f5
Added "SentToPublish" in reviewStatus object
karthik-tarento Jul 13, 2022
e01488a
implemented fuzzy logic to the search
juhiagl8 Jul 13, 2022
49db220
Merge pull request #37 from sunbird-cb/fuzzyImplementation
karthik-tarento Jul 28, 2022
4e7d18a
Copy content artifacturl must not included bug
wilkysingh-tarento Jul 29, 2022
0773f68
Merge pull request #41 from sunbird-cb/release-4.8.0_cb-artificatUrl_fix
karthik-tarento Aug 1, 2022
622dd44
Added MimeType for Survey
karthik-tarento Aug 9, 2022
e7ee48f
Added competencies_v3 meta
karthik-tarento Sep 7, 2022
40181c5
Update schema.json
juhiagl8 Nov 18, 2022
e7fc48b
Merge pull request #48 from sunbird-cb/juhiagl8-patch-1
karthik-tarento Nov 18, 2022
fb29f12
Added meta to store content ratings
karthik-tarento Nov 22, 2022
7069cff
Introduced new flag and changes to make fuzzy search mandatory when n…
karthik-tarento Nov 25, 2022
c172a85
Merge pull request #51 from sunbird-cb/4.8.0-searchFix
karthik-tarento Nov 25, 2022
7f14ae0
Updated meta param types to String to store float values
karthik-tarento Nov 30, 2022
ab8ec79
4.8.0 search fix v2 (#53)
karthik-tarento Dec 8, 2022
2ff925f
Update schema.json (#54)
juhiagl8 Dec 20, 2022
eecbb23
schema repo config added
gohilamariappan Jan 11, 2023
5c162a9
schema path updated
gohilamariappan Jan 11, 2023
5824c02
updated schema_repo_branch
gohilamariappan Jan 11, 2023
2b9b6c1
path updated
gohilamariappan Jan 11, 2023
c712b7d
schema path updated
gohilamariappan Jan 17, 2023
0eefe68
schema repo added
gohilamariappan Jan 17, 2023
da26180
schema pull added
gohilamariappan Jan 17, 2023
3fc4a6e
schema pull added
gohilamariappan Jan 17, 2023
7aa5161
path updated
gohilamariappan Jan 17, 2023
442a34e
path updated
gohilamariappan Jan 17, 2023
1d38f65
Added new DefinitionScript for AssessmentFeature
karthik-tarento Feb 10, 2023
9f4959b
Added definition script for practice assessment questionset
karthik-tarento Feb 13, 2023
dedf2a4
4.8.0 content security (#61)
karthik-tarento May 31, 2023
cecc43e
Using common project for JWT token instead of new module
karthik-tarento Jun 1, 2023
77ede59
reverted the changes for conf file
karthik-tarento Jun 1, 2023
0546b1f
4.8.3 upload fix (#63)
karthik-tarento Sep 5, 2023
71c0e00
Event Update API changes for update, retire (#64) (#66)
karthik-tarento Nov 20, 2023
80d348f
Added API to read the content by admin (#67)
karthik-tarento Nov 22, 2023
5310cee
KAR-262:Live Moderated Course Editing Fix
vikrantbipin Jan 16, 2024
3eeefb3
Validations to ensure boolean input for MCQ answers
sreeragksgh Jan 16, 2024
93cde23
Additional check on MCQ questions
sreeragksgh Jan 17, 2024
e128fea
Merge pull request #69 from vikrantbipin/cbrelease-4.8.9
SaipradeepR Jan 22, 2024
f39c778
Review changes
sreeragksgh Jan 23, 2024
6c587bc
Adding constant value for MCQ - review changes
sreeragksgh Jan 23, 2024
ddd6136
Adding constant value for MCQ - review changes
sreeragksgh Jan 23, 2024
4e10eba
Merge pull request #70 from sreeragksgh/cbrelease-4.8.9_mcqValidation
SaipradeepR Jan 23, 2024
3322b1d
Adding the Moderated courses Logic in normal courses (#68) (#71)
karthik-tarento Feb 6, 2024
5f63468
Fix the issue for checking the SecureSetting variables (#73)
Sahil-tarento Feb 13, 2024
c0be98f
Adding the mustCondition for all subFilter (#74)
Sahil-tarento Feb 19, 2024
825049b
Adding the query implementation changes (#75)
Sahil-tarento Feb 19, 2024
ed535ff
Revert MCQ question commit (#76) (#78) (#79)
karthik-tarento Feb 20, 2024
9e5fc1f
Merge remote-tracking branch 'origin/cbrelease-4.8.9' into cbrelease-…
karthik-tarento Feb 20, 2024
797324b
Retire Fix Impl (#81)
karthik-tarento Mar 26, 2024
5d63b84
Retire Fix Impl (#83)
Sahil-tarento Apr 2, 2024
ffa1525
Added options to search multiple keywords inside filter using OR (#84)
karthik-tarento Apr 25, 2024
833ebde
Updated for handling google storage account.
mathewjpallan May 29, 2024
05d4bfe
Using updated cloud-store-sdk
karthik-tarento Jun 11, 2024
a9e6b21
Merge pull request #1 from KB-iGOT/cbrelease-4.8.13-gcp
karthik-tarento Jun 24, 2024
a44fd90
Moving to our own build of cloud-storage-sdk. This is necessary as th…
mathewjpallan Jun 25, 2024
67aaab3
Adding Redis cache on systemUpdate API
Sahil-tarento Jul 11, 2024
08ab7bb
Adding Redis cache on systemUpdate API For QuestionSet
Sahil-tarento Jul 11, 2024
a841e38
Merge pull request #2 from KB-iGOT/4.8.14-RedisSystemUpdate
karthik-tarento Jul 11, 2024
4641e1a
Adding Redis cache on systemUpdate API For Question
Sahil-tarento Jul 12, 2024
075f664
Added List for QuestionSet
Sep 5, 2024
9eb8cfb
Compilation Error Fix
Sep 5, 2024
af5f70b
updated as per code conventional
Sep 5, 2024
586549f
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
a2d1a9b
Merge pull request #3 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
1f5f2a8
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
611f4e7
Merge pull request #4 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
e8ddd90
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
bd742b2
Merge pull request #5 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
479feea
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
c2ce248
Merge pull request #6 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
3caf0d9
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
7d98490
Merge pull request #7 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
d81e9f8
KB-6563 | DEV| Assessment | BE | Consumption Logic for the CQF Assess…
tarentomaheshvakkund Sep 19, 2024
5b13c93
Merge pull request #8 from tarentomaheshvakkund/4.8.18-dev-cqfAssessment
SaipradeepR Sep 19, 2024
698a494
Merge pull request #9 from KB-iGOT/4.8.18-dev
SaipradeepR Sep 19, 2024
e907437
Added kakfa message generation for event publish
karthik-tarento Oct 14, 2024
56da186
Merge pull request #10 from KB-iGOT/4.8.18-dev
karthik-tarento Oct 16, 2024
a959c0d
KB-8297 | [Backend] : Include a review step in the Events Flow and ad…
tarentomaheshvakkund Feb 11, 2025
0d0b1eb
KB-8297 | [Backend] : Include a review step in the Events Flow and ad…
tarentomaheshvakkund Feb 11, 2025
2ce79e3
KB-8297 | [Backend] : Include a review step in the Events Flow and ad…
tarentomaheshvakkund Feb 11, 2025
9f249dd
Merge pull request #12 from tarentomaheshvakkund/4.8.22-dev-eventsReject
Sahil-tarento Feb 11, 2025
22ddf61
KB-8297 | [Backend] : Include a review step in the Events Flow and ad…
tarentomaheshvakkund Feb 14, 2025
b8d1568
Merge pull request #13 from tarentomaheshvakkund/dev-4.8.22-eventFeat…
SaipradeepR Feb 14, 2025
1930550
Merge pull request #14 from KB-iGOT/dev-4.8.22
SaipradeepR Feb 14, 2025
3208942
Added new Mimetype for assets and content.
tarentomaheshvakkund Mar 5, 2025
cb33bb4
Merge pull request #16 from tarentomaheshvakkund/4.8.22-dev-eventHubM…
SaipradeepR Mar 5, 2025
367e591
KB-8855 | DEV | BE | Q7 | Events Hub | MDO Admin | Event Editing
tarentomaheshvakkund Mar 10, 2025
43ee170
Merge pull request #18 from tarentomaheshvakkund/4.8.22-dev-eventEdit
SaipradeepR Mar 10, 2025
576c7c4
Revert "KB-8855 | DEV | BE | Q7 | Events Hub | MDO Admin | Event Edi…
tarentomaheshvakkund Mar 17, 2025
70e062b
Merge pull request #19 from tarentomaheshvakkund/4.8.22-dev-eventUpda…
karthik-tarento Mar 17, 2025
33e283c
Query Search with Sorting enabled
ArpithaSureshappa Mar 19, 2025
37ca7a1
updated with null check
ArpithaSureshappa Mar 19, 2025
8cfe9e2
Merge pull request #20 from ArpithaSureshappa/4.8.23-dev-v1
Sahil-tarento Mar 19, 2025
3f84fbc
KB-8855 | DEV | BE | Q7 | Events Hub | MDO Admin | Event Editing
tarentomaheshvakkund Mar 10, 2025
1790160
Merge pull request #21 from tarentomaheshvakkund/4.8.23-dev-eventHub
SaipradeepR Mar 20, 2025
aaac8a4
Merge pull request #22 from KB-iGOT/4.8.23-dev-v1
Sahil-tarento Mar 20, 2025
25a2d5e
Revert "KB-8855 | DEV | BE | Q7 | Events Hub | MDO Admin | Event Edi…
Sahil-tarento Mar 20, 2025
44de481
getHierarchy?mode=edit: handled null and "null"
vikrantbipin Mar 25, 2025
219a98c
Merge pull request #28 from vikrantbipin/cbrelease-4.8.22
Sahil-tarento Mar 25, 2025
8357cf6
Merge pull request #29 from KB-iGOT/4.8.22-hierarchyFix
Sahil-tarento Mar 26, 2025
059b29d
added secureSettings key map in request
ArpithaSureshappa Apr 2, 2025
ad4d58f
KB-8946 issue fix
ArpithaSureshappa Apr 2, 2025
a07f0fc
KB-8946 issue fix
ArpithaSureshappa Apr 2, 2025
408c7ec
KB-8946 issue fix
ArpithaSureshappa Apr 2, 2025
034db8d
Merge pull request #34 from ArpithaSureshappa/4.8.23-dev-v1
Sahil-tarento Apr 2, 2025
fecfe08
Merge pull request #35 from KB-iGOT/4.8.23-dev-v1
Sahil-tarento Apr 2, 2025
a41bed8
Deleting the cache before every update to reflect the latest data in …
tarentomaheshvakkund Apr 4, 2025
eb129d1
Merge pull request #36 from tarentomaheshvakkund/4.8.23-dev-eventReadFix
SaipradeepR Apr 4, 2025
5c777e3
event startDateTime endDateTime converting to timestamp during create…
ArpithaSureshappa Apr 7, 2025
b1ffcc0
Merge pull request #37 from ArpithaSureshappa/4.8.23-dev-v1
SaipradeepR Apr 7, 2025
be2913f
try catch block added
ArpithaSureshappa Apr 7, 2025
1f5720d
create and update API updated to save time in IST format
ArpithaSureshappa Apr 8, 2025
ad5af32
Merge pull request #38 from ArpithaSureshappa/4.8.23-dev-v1
SaipradeepR Apr 8, 2025
8515d09
range filter issue fixed
ArpithaSureshappa Apr 8, 2025
501a21c
Merge pull request #39 from ArpithaSureshappa/4.8.23-dev-v1
SaipradeepR Apr 9, 2025
cf64748
range filter issue fixed
ArpithaSureshappa Apr 9, 2025
2137eb9
fixed facet issue for non text fields
ArpithaSureshappa Apr 9, 2025
f119dcc
Merge pull request #40 from ArpithaSureshappa/4.8.23-dev-v1
SaipradeepR Apr 9, 2025
8be5b3d
Merge pull request #41 from ArpithaSureshappa/4.8.23-dev-v1
SaipradeepR Apr 9, 2025
d6178bf
Event Update and Publish API enhanced
tarentomaheshvakkund Apr 11, 2025
52bb45e
Merge pull request #42 from tarentomaheshvakkund/4.8.23-eventReadAndP…
SaipradeepR Apr 11, 2025
9e24808
Merge pull request #43 from KB-iGOT/4.8.23-dev
karthik-tarento Apr 14, 2025
e51f663
Event Publish API enhanced
tarentomaheshvakkund Apr 14, 2025
0ce0019
Handled deleting the event
tarentomaheshvakkund Apr 14, 2025
d3fb757
System Update to update the data to the main node when the event is live
tarentomaheshvakkund Apr 15, 2025
4fde30e
Flag added to execute for replacing the identifier with image extension.
tarentomaheshvakkund Apr 16, 2025
db207b7
Merge pull request #46 from tarentomaheshvakkund/4.8.23-dev-versionKe…
karthik-tarento Apr 17, 2025
ea81508
Handled Deleting the node.img
tarentomaheshvakkund Apr 22, 2025
7f5c8c3
Merge pull request #47 from tarentomaheshvakkund/4.8.23-dev-v1-eventp…
karthik-tarento Apr 22, 2025
5bc9567
Merge pull request #48 from KB-iGOT/4.8.23.1-dev-v1
karthik-tarento Apr 23, 2025
67f7b61
KB-7793 | Event details edited by SPV admin are not being reflected i…
tarentomaheshvakkund May 9, 2025
00ef7f5
Merge pull request #49 from tarentomaheshvakkund/dev-4.8.25-KB-7793-
Sahil-tarento May 9, 2025
063833a
Merge pull request #50 from KB-iGOT/4.8.25-dev-v2
Sahil-tarento May 12, 2025
e6a9818
Merge pull request #51 from KB-iGOT/cbrelease-4.8.22
Sahil-tarento May 26, 2025
3dfa723
Merge pull request #52 from KB-iGOT/cbrelease-4.8.23
Sahil-tarento May 26, 2025
ec743f0
initial change for notification
DeepikaMalav28 Jun 12, 2025
7c2c989
contenct review notification
DeepikaMalav28 Jun 12, 2025
e7fc62d
initial change for notification (#54)
DeepikaMalav28 Jun 12, 2025
9f0f5d0
Merge remote-tracking branch 'upstream/4.8.26-dev-v1' into dev-4.8.26…
DeepikaMalav28 Jun 12, 2025
847d0bb
small fix for body change
DeepikaMalav28 Jun 12, 2025
e51f31c
Dev 4.8.26 notification (#55)
DeepikaMalav28 Jun 12, 2025
47b5e60
Merge remote-tracking branch 'upstream/4.8.26-dev-v1' into dev-4.8.26…
DeepikaMalav28 Jun 12, 2025
aa04c3b
more fields added to body
DeepikaMalav28 Jun 12, 2025
f48e9c0
Dev 4.8.26 notification (#56)
DeepikaMalav28 Jun 12, 2025
e66a004
Merge remote-tracking branch 'upstream/4.8.26-dev-v1' into dev-4.8.26…
DeepikaMalav28 Jun 12, 2025
74758a9
json creation made better
DeepikaMalav28 Jun 12, 2025
804a79b
Dev 4.8.26 notification (#57)
DeepikaMalav28 Jun 12, 2025
cfbc24a
fix for message body
DeepikaMalav28 Jun 12, 2025
7a71b8a
fix
DeepikaMalav28 Jun 12, 2025
e55a623
Dev 4.8.26 notification (#58)
DeepikaMalav28 Jun 12, 2025
56d7be8
add more notification
DeepikaMalav28 Jun 12, 2025
9f46e57
Merge remote-tracking branch 'upstream/4.8.26-dev-v1' into dev-4.8.26…
DeepikaMalav28 Jun 12, 2025
e3d58f2
4.8.26 dev v1 (#60)
Sahil-tarento Jun 13, 2025
0860e0e
Merge remote-tracking branch 'upstream/cbrelease-4.8.26' into dev-4.8…
DeepikaMalav28 Jun 13, 2025
3966641
add notification
DeepikaMalav28 Jun 13, 2025
ed56fb7
Dev 4.8.26 notification (#61)
DeepikaMalav28 Jun 13, 2025
2df0489
Merge remote-tracking branch 'upstream/cbrelease-4.8.26' into dev-4.8…
DeepikaMalav28 Jun 13, 2025
45c2b12
convert in array
DeepikaMalav28 Jun 13, 2025
0ea2593
Dev 4.8.26 notification (#62)
DeepikaMalav28 Jun 13, 2025
91ab968
Merge remote-tracking branch 'upstream/cbrelease-4.8.26' into dev-4.8…
DeepikaMalav28 Jun 13, 2025
7853472
convert in list reviewersId
DeepikaMalav28 Jun 13, 2025
9d77e4b
Merge pull request #63 from DeepikaMalav28/dev-4.8.26-notification
rajeevsathish Jun 13, 2025
517255e
Dev 4.8.26 notification (#64)
DeepikaMalav28 Jun 15, 2025
9bce56d
#KB-10158 mutilple notification trigger fixes (#65)
DeepikaMalav28 Jun 16, 2025
cd6498a
Merge remote-tracking branch 'upstream/cbrelease-4.8.26' into 4.8.26-…
DeepikaMalav28 Jun 16, 2025
fa50370
Content reject fix (#71)
DeepikaMalav28 Jun 16, 2025
303c808
add content-edit and content-review notification
DeepikaMalav28 Jun 18, 2025
3b079c8
conflict resolve
DeepikaMalav28 Jun 18, 2025
46c89fc
Merge pull request #72 from DeepikaMalav28/content-edit-notification
rajeevsathish Jun 18, 2025
31876b7
fix (#73)
DeepikaMalav28 Jun 18, 2025
f5b04c2
Merge remote-tracking branch 'upstream/cbrelease-4.8.26' into 4.8.26-…
DeepikaMalav28 Jun 18, 2025
d9cee58
Merge branch '4.8.26-dev-v2' of github.com:KB-iGOT/knowledge-platform…
DeepikaMalav28 Jun 18, 2025
c53ce1e
fix
DeepikaMalav28 Jun 18, 2025
e0c1ab9
fix (#79)
DeepikaMalav28 Jun 18, 2025
e895625
Merge remote-tracking branch 'upstream/4.8.26-dev-v2' into content-bu…
DeepikaMalav28 Jun 18, 2025
48cf6aa
change
DeepikaMalav28 Jun 18, 2025
2e6e103
Merge pull request #80 from DeepikaMalav28/content-bug-fix
rajeevsathish Jun 18, 2025
925e060
fix
DeepikaMalav28 Jun 18, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.sunbird.actors
import org.apache.commons.lang3.StringUtils
import org.sunbird.`object`.importer.{ImportConfig, ImportManager}
import org.sunbird.actor.core.BaseActor
import org.sunbird.cache.impl.RedisCache
import org.sunbird.common.dto.{Request, Response, ResponseHandler}
import org.sunbird.common.{DateUtils, Platform}
import org.sunbird.graph.OntologyEngineContext
Expand Down Expand Up @@ -92,6 +93,7 @@ class QuestionActor @Inject()(implicit oec: OntologyEngineContext) extends BaseA
def systemUpdate(request: Request): Future[Response] = {
val identifier = request.getContext.get("identifier").asInstanceOf[String]
RequestUtil.validateRequest(request)
RedisCache.delete(identifier)
val readReq = new Request(request)
val identifiers = new util.ArrayList[String](){{
add(identifier)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.sunbird.actors

import java.util

import javax.inject.Inject
import org.apache.commons.collections4.CollectionUtils
import org.apache.commons.lang3.StringUtils
import org.sunbird.`object`.importer.{ImportConfig, ImportManager}
import org.sunbird.actor.core.BaseActor
import org.sunbird.cache.impl.RedisCache
Expand All @@ -12,10 +12,12 @@ import org.sunbird.common.dto.{Request, Response, ResponseHandler}
import org.sunbird.graph.OntologyEngineContext
import org.sunbird.graph.nodes.DataNode
import org.sunbird.graph.dac.model.Node
import org.sunbird.graph.utils.NodeUtil
import org.sunbird.managers.HierarchyManager.hierarchyPrefix
import org.sunbird.managers.{AssessmentManager, HierarchyManager, UpdateHierarchyManager}
import org.sunbird.utils.RequestUtil

import scala.collection.JavaConverters
import scala.collection.JavaConverters._
import scala.concurrent.{ExecutionContext, Future}

Expand All @@ -40,9 +42,21 @@ class QuestionSetActor @Inject()(implicit oec: OntologyEngineContext) extends Ba
case "rejectQuestionSet" => reject(request)
case "importQuestionSet" => importQuestionSet(request)
case "systemUpdateQuestionSet" => systemUpdate(request)
case "listQuestionSet" => listQuestionSet(request)
case _ => ERROR(request.getOperation)
}

def listQuestionSet(request: Request): Future[Response] = {
RequestUtil.validateListRequest(request)
val fields: util.List[String] = JavaConverters.seqAsJavaListConverter(request.get("fields").asInstanceOf[String].split(",").filter(field => StringUtils.isNotBlank(field) && !StringUtils.equalsIgnoreCase(field, "null"))).asJava
request.getRequest.put("fields", fields)
DataNode.search(request).map(nodeList => {
val questionList = nodeList.map(node => {
NodeUtil.serialize(node, fields, node.getObjectType.toLowerCase.replace("Image", ""), request.getContext.get("version").asInstanceOf[String])
}).asJava
ResponseHandler.OK.put("questionSets", questionList).put("count", questionList.size)
})
}
def update(request: Request): Future[Response] = {
RequestUtil.restrictProperties(request)
request.getRequest.put("identifier", request.getContext.get("identifier"))
Expand Down Expand Up @@ -142,9 +156,11 @@ class QuestionSetActor @Inject()(implicit oec: OntologyEngineContext) extends Ba
def systemUpdate(request: Request): Future[Response] = {
val identifier = request.getContext.get("identifier").asInstanceOf[String]
RequestUtil.validateRequest(request)
if(Platform.getBoolean("questionset.cache.enable", false))
if(Platform.getBoolean("questionset.cache.enable", false)) {
RedisCache.delete(hierarchyPrefix + identifier)
}

RedisCache.delete(identifier)
val readReq = new Request(request)
val identifiers = new util.ArrayList[String](){{
add(identifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@ package controllers.v4

import akka.actor.{ActorRef, ActorSystem}
import controllers.BaseController
import org.apache.commons.lang3.StringUtils
import org.sunbird.common.dto.{Request, Response, ResponseHandler}
import org.sunbird.graph.nodes.DataNode
import org.sunbird.graph.utils.NodeUtil
import org.sunbird.utils.RequestUtil

import javax.inject.{Inject, Named}
import play.api.mvc.ControllerComponents
import utils.{ActorNames, ApiId, QuestionSetOperations}
import utils.{ActorNames, ApiId, QuestionOperations, QuestionSetOperations}

import java.util
import scala.collection.JavaConverters
import scala.collection.JavaConverters._
import scala.concurrent.ExecutionContext
import scala.concurrent.{ExecutionContext, Future}

class QuestionSetController @Inject()(@Named(ActorNames.QUESTION_SET_ACTOR) questionSetActor: ActorRef, cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends BaseController(cc) {

Expand All @@ -25,6 +33,18 @@ class QuestionSetController @Inject()(@Named(ActorNames.QUESTION_SET_ACTOR) ques
getResult(ApiId.CREATE_QUESTION_SET, questionSetActor, questionSetRequest)
}

def list(fields: Option[String]) = Action.async { implicit request =>
val headers = commonHeaders()
val body = requestBody()
val question = body.getOrDefault("search", new java.util.HashMap()).asInstanceOf[java.util.Map[String, Object]];
question.putAll(headers)
question.put("fields", fields.getOrElse(""))
val questionSetRequest = getRequest(question, headers, QuestionSetOperations.listQuestionSet.toString)
questionSetRequest.put("identifiers", questionSetRequest.get("identifier"))
setRequestContext(questionSetRequest, version, objectType, schemaName)
getResult(ApiId.LIST_QUESTIONSET, questionSetActor, questionSetRequest)
}

def read(identifier: String, mode: Option[String], fields: Option[String]) = Action.async { implicit request =>
val headers = commonHeaders()
val questionSet = new java.util.HashMap().asInstanceOf[java.util.Map[String, Object]]
Expand Down
1 change: 1 addition & 0 deletions assessment-api/assessment-service/app/utils/ApiId.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ object ApiId {
val SYSTEM_UPDATE_QUESTION = "api.question.system.update"
val LIST_QUESTIONS = "api.questions.list"
val REJECT_QUESTION = "api.question.reject"
val LIST_QUESTIONSET = "api.questionset.list"

//QuestionSet APIs
val CREATE_QUESTION_SET = "api.questionset.create"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package utils
object QuestionSetOperations extends Enumeration {
val createQuestionSet, readQuestionSet, readPrivateQuestionSet, updateQuestionSet, reviewQuestionSet, publishQuestionSet,
retireQuestionSet, addQuestion, removeQuestion, updateHierarchyQuestion, readHierarchyQuestion,
rejectQuestionSet, importQuestionSet, systemUpdateQuestionSet = Value
rejectQuestionSet, importQuestionSet, listQuestionSet,systemUpdateQuestionSet = Value
}
3 changes: 2 additions & 1 deletion assessment-api/assessment-service/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ PATCH /questionset/v4/hierarchy/update controllers.v4.QuestionSetC
GET /questionset/v4/hierarchy/:identifier controllers.v4.QuestionSetController.getHierarchy(identifier:String, mode:Option[String])
POST /questionset/v4/reject/:identifier controllers.v4.QuestionSetController.reject(identifier:String)
POST /questionset/v4/import controllers.v4.QuestionSetController.importQuestionSet()
PATCH /questionset/v4/system/update/:identifier controllers.v4.QuestionSetController.systemUpdate(identifier:String)
PATCH /questionset/v4/system/update/:identifier controllers.v4.QuestionSetController.systemUpdate(identifier:String)
POST /questionset/v4/list controllers.v4.QuestionSetController.list(fields:Option[String])
2 changes: 1 addition & 1 deletion build/assessment-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ USER sunbird
COPY ./assessment-api/assessment-service/target/assessment-service-1.0-SNAPSHOT-dist.zip /home/sunbird/
RUN unzip /home/sunbird/assessment-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/
RUN rm /home/sunbird/assessment-service-1.0-SNAPSHOT-dist.zip
COPY --chown=sunbird ./schemas /home/sunbird/assessment-service-1.0-SNAPSHOT/schemas
COPY --chown=sunbird ./schema/schemas /home/sunbird/assessment-service-1.0-SNAPSHOT/schemas
WORKDIR /home/sunbird/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/assessment-service-1.0-SNAPSHOT/lib/*' -Dconfig.file=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/application.conf -Dlogger.file=/home/sunbird/assessment-service-1.0-SNAPSHOT/config/logback.xml play.core.server.ProdServerStart /home/sunbird/assessment-service-1.0-SNAPSHOT
7 changes: 7 additions & 0 deletions build/assessment-service/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ node('build-slave') {
print "Environment will be : ${env.NODE_ENV}"
sh 'mvn clean install -DskipTests=true '
}
stage('schema-pull') {

dir("${env.WORKSPACE}/schema") {
checkout scm: [$class: 'GitSCM', branches: [[name: schema_repo_branch]], extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true]], userRemoteConfigs: [[credentialsId: schema_repo_credentials, url: schema_repo_url]]]

}
}

stage('Package') {
dir('assessment-api') {
Expand Down
2 changes: 1 addition & 1 deletion build/content-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ USER sunbird
COPY ./content-api/content-service/target/content-service-1.0-SNAPSHOT-dist.zip /home/sunbird/
RUN unzip /home/sunbird/content-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/
RUN rm /home/sunbird/content-service-1.0-SNAPSHOT-dist.zip
COPY --chown=sunbird ./schemas /home/sunbird/content-service-1.0-SNAPSHOT/schemas
COPY --chown=sunbird ./schema/schemas /home/sunbird/content-service-1.0-SNAPSHOT/schemas
WORKDIR /home/sunbird/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/content-service-1.0-SNAPSHOT/lib/*' -Dconfig.file=/home/sunbird/content-service-1.0-SNAPSHOT/config/application.conf -Dlogger.file=/home/sunbird/content-service-1.0-SNAPSHOT/config/logback.xml play.core.server.ProdServerStart /home/sunbird/content-service-1.0-SNAPSHOT
8 changes: 7 additions & 1 deletion build/content-service/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ node('build-slave') {
sh 'mvn clean install -DskipTests=true '

}
stage('schema-pull') {

dir("${env.WORKSPACE}/schema") {
checkout scm: [$class: 'GitSCM', branches: [[name: schema_repo_branch]], extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true]], userRemoteConfigs: [[credentialsId: schema_repo_credentials, url: schema_repo_url]]]

}
}
stage('Package') {
dir('content-api') {
sh 'mvn play2:dist -pl content-service'
Expand All @@ -47,4 +53,4 @@ node('build-slave') {
currentBuild.result = "FAILURE"
throw err
}
}
}
2 changes: 1 addition & 1 deletion build/search-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ USER sunbird
COPY ./search-api/search-service/target/search-service-1.0-SNAPSHOT-dist.zip /home/sunbird/
RUN unzip /home/sunbird/search-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/
RUN rm /home/sunbird/search-service-1.0-SNAPSHOT-dist.zip
COPY --chown=sunbird ./schemas /home/sunbird/search-service-1.0-SNAPSHOT/schemas
COPY --chown=sunbird ./schema/schemas /home/sunbird/search-service-1.0-SNAPSHOT/schemas
WORKDIR /home/sunbird/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/search-service-1.0-SNAPSHOT/lib/*' -Dconfig.file=/home/sunbird/search-service-1.0-SNAPSHOT/config/application.conf -Dlogger.file=/home/sunbird/search-service-1.0-SNAPSHOT/config/logback.xml play.core.server.ProdServerStart /home/sunbird/search-service-1.0-SNAPSHOT
7 changes: 7 additions & 0 deletions build/search-service/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ node('build-slave') {
sh 'mvn clean install -DskipTests=true '

}
stage('schema-pull') {

dir("${env.WORKSPACE}/schema") {
checkout scm: [$class: 'GitSCM', branches: [[name: schema_repo_branch]], extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true]], userRemoteConfigs: [[credentialsId: schema_repo_credentials, url: schema_repo_url]]]

}
}

stage('Package') {
dir('search-api') {
Expand Down
2 changes: 1 addition & 1 deletion build/taxonomy-service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ USER sunbird
COPY ./taxonomy-api/taxonomy-service/target/taxonomy-service-1.0-SNAPSHOT-dist.zip /home/sunbird/
RUN unzip /home/sunbird/taxonomy-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/
RUN rm /home/sunbird/taxonomy-service-1.0-SNAPSHOT-dist.zip
COPY --chown=sunbird ./schemas /home/sunbird/taxonomy-service-1.0-SNAPSHOT/schemas
COPY --chown=sunbird ./schema/schemas /home/sunbird/taxonomy-service-1.0-SNAPSHOT/schemas
WORKDIR /home/sunbird/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/taxonomy-service-1.0-SNAPSHOT/lib/*' -Dconfig.file=/home/sunbird/taxonomy-service-1.0-SNAPSHOT/config/application.conf -Dlogger.file=/home/sunbird/taxonomy-service-1.0-SNAPSHOT/config/logback.xml play.core.server.ProdServerStart /home/sunbird/taxonomy-service-1.0-SNAPSHOT
7 changes: 7 additions & 0 deletions build/taxonomy-service/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ node('build-slave') {
sh 'mvn clean install -DskipTests=true '

}
stage('schema-pull') {

dir("${env.WORKSPACE}/schema") {
checkout scm: [$class: 'GitSCM', branches: [[name: schema_repo_branch]], extensions: [[$class: 'CloneOption', depth: 1, noTags: true, reference: '', shallow: true]], userRemoteConfigs: [[credentialsId: schema_repo_credentials, url: schema_repo_url]]]

}
}

stage('Package') {
dir('taxonomy-api') {
Expand Down
Loading