Skip to content

Commit

Permalink
changes for updating the primary category for standalone assessments (#…
Browse files Browse the repository at this point in the history
…252) (#253)

* changes for updating the primary category for standalone assessments

Co-authored-by: juhi agarwal <[email protected]>
  • Loading branch information
karthik-tarento and juhiagl8 authored Jun 12, 2023
1 parent d4ba9be commit 78a23a6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public Map<String, Object> searchLiveContent(String rootOrgId, String contentId)
headerValues.put(Constants.X_AUTH_USER_ORG_ID, rootOrgId);
}
Map<String, Object> filters = new HashMap<>();
filters.put(Constants.PRIMARY_CATEGORY, Arrays.asList(Constants.COURSE, Constants.PROGRAM));
filters.put(Constants.PRIMARY_CATEGORY, serverConfig.getContentSearchPrimaryCategoryFilter());
filters.put(Constants.STATUS, Arrays.asList(Constants.LIVE));
filters.put(Constants.IDENTIFIER, contentId);
Map<String, Object> contentRequestValue = new HashMap<>();
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/sunbird/common/util/CbExtServerProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,9 @@ public class CbExtServerProperties {
@Value("${user.bulk.upload.group.value}")
private String bulkUploadGroupValue;

@Value("${content.search.primary.category.filter}")
private String contentSearchPrimaryCategoryFilter;

public String getAssessmentSubmitTopic() {
return assessmentSubmitTopic;
}
Expand Down Expand Up @@ -1639,4 +1642,12 @@ public List<String> getBulkUploadGroupValue() {
public void setBulkUploadGroupValue(String bulkUploadGroupValue) {
this.bulkUploadGroupValue = bulkUploadGroupValue;
}

public List<String> getContentSearchPrimaryCategoryFilter() {
return Arrays.asList(contentSearchPrimaryCategoryFilter.split(",", -1));
}

public void setContentSearchPrimaryCategoryFilter(String contentSearchPrimaryCategoryFilter) {
this.contentSearchPrimaryCategoryFilter = contentSearchPrimaryCategoryFilter;
}
}
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,6 @@ org.channel.delimitter=_
org.search.response.default.limit=100
lms.system.settings.verified.profile.fields.path=v1/system/settings/get/verifiedProfileFields
user.bulk.upload.group.value=GROUP A,GROUP B,GROUP C,GROUP D,Contractual Staff,Others
content.search.primary.category.filter=Course,Program,Standalone Assessment,Blended Program
spring.servlet.multipart.max-file-size=5MB
spring.servlet.multipart.max-request-size=5MB
spring.servlet.multipart.max-request-size=5MB

0 comments on commit 78a23a6

Please sign in to comment.