Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction:

Item set should be a collection of questions where questions will have hasSequenceMember relationship with the member questions. Content should have association relationship with Item set.

Background & Problem statement:

  • 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 questions where all the questions are linked to Item set with hasMember relationship and this also does not support index.

Design:

  • Item set will be a collection of questions where each question will be linked to Item set with hasSequenceMember relationship where each relationship will have one index value.
  • Instead of linking to each questions, Content should be linked to Itemset with associatiedTo relationship.
  • Content will have one-to-one relationship with Item set.
  • Support for Itemset version 2 (V2) API

Item Set V2 API:

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 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 publish.

PDF generator API:

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

Content Publish API:

  • 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 (i.e. set of all the questions linked to Item set, in a sequential way of index) and linked to Itemt 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.


  • No labels