Exemplo n.º 1
0
 public List<AssessmentQuestion> getAllDataOfQuestions(
     SearchResultContainer collectionResultContainer) {
   if (collectionResultContainer.getSearchResults() != null) {
     String assessmentGooruOid = "";
     int count = 0;
     for (SearchResult srContainer : collectionResultContainer.getSearchResults()) {
       if (count > 0) {
         assessmentGooruOid += ",";
       }
       assessmentGooruOid += "'" + srContainer.getId().toString() + "'";
       count++;
     }
     return assessmentRepository.getAssessmentQuestionsByAssessmentGooruOids(assessmentGooruOid);
   }
   return null;
 }
Exemplo n.º 2
0
 public void enrichCollectionWithTaxonomyMap(SearchResultContainer collectionResultContainer) {
   if (collectionResultContainer.getSearchResults() != null) {
     for (SearchResult srContainer : collectionResultContainer.getSearchResults()) {
       Content findByContent =
           this.getContentRepository().findContentByGooruId(srContainer.getId());
       if (findByContent != null) {
         Map<Integer, List<Code>> taxonomyMapByCode =
             TaxonomyUtil.getTaxonomyMapByCode(findByContent.getTaxonomySet(), taxonomyService);
         srContainer.setTaxonomyMapByCode(taxonomyMapByCode);
         Integer numberOfQuestions =
             assessmentRepository.getAssessmentQuestionsCount(findByContent.getContentId());
         srContainer.setNumberOfResources(numberOfQuestions);
       }
     }
   }
 }