Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Currently content have association relationship with questions. And association relationship does not support index value.
  • Since content and question relationship does not have any index value, we are not able to render questions based on index value.
  • As per the existing Item set (V3) implementation, Item set is a collection id of questions where all the questions are linked to Item set with hasMember relationship and this also which does not support index.

Design:

...

Create Item set:
POST: itemset/v2/create

{
     "code":"",
     "title":"",
     "description":"",
     "language":["English"],
     "max_score":10,
     "type":"materialised",
     "owner":"",
     "difficulty_level":"",
     "purpose": "",
     "sub_purpose":"",
     "depth_of_knowledge": "",
     "used_for":"",
     "copyright":"",
     "createdBy":"",
     "questions":[{
          "identifier":<question_id>
     }]

}


Update Item set:
PATCH: itemset/v2/update/{identifier}

{
     "title":"",
     "description":"",
     "language":["English"],
     "max_score":10,
     "type":"materialised",
     "owner":"",
     "difficulty_level":"",
     "purpose": "",
     "sub_purpose":"",
     "depth_of_knowledge": "",
     "used_for":"",
     "copyright":"",
     "createdBy":"",
     "questions":[{
          "identifier":<question_id>
     }]

}


Read Item set:
GET: itemset/v2/read/{identifer}

DELETE: itemset/v2/retire/{identifier}
{}


Item set Publish API:

  • There will be Item set publish API which will publish the Itemset witn with a particular pkgVersion.
  • It will generated a html template (previewUrl: it is Itemset metadata) which will hold all the questions linked to item set at the time of Item set publish.
  • Currently Item set publish API will be exposed through Content Publish API - When content gets publish Item set will also publishget published.

PDF generator API:

  • It will be completely seperaate separate and generic implementationsimplementation.
  • It will expect HTML template and will generate pdf file.
  • It will return pdf link of generate and upload pdf file to cloud store and return link as response. (need to discuss)

...

  • Item set publish API will be exposed to content publish pipeline.
  • As part of content publish, Item set will also be published which will generate Item set previewUrl using all the question linked (i.e. set of all the questions linked to Item set, in a sequential way of index) and linked to Itemt tag with Item set as metadata.
  • Using Item set previewUrl, PDF generator API will generate and return pdf file URL link which will be linked to content metadata as itemSetPreviewUrl.

...