Versions Compared

Key

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

...

  1. Get the assessment score from data aggregation API

  2. Get course/assessment details using hierarchy API

  3. Expose a method in CSL which uses the hierarchy response and replace the do_id of assessment with name

    Code Block
    getDataForDashlets(hierarchyData, aggregationData): dashletData
    hierarchyData: course details from hierarchy response
    aggregationData: agregation API response
    Return type Example: 
    dashletData: {
      columnConfig : [
        { title: "Name", data: "Name", searchable: true, orderable: true, autoWidth: true, visible: true },
        { title: "Score", data: "Score", searchable: true, orderable: true, autoWidth: true, visible: true },
      ]
      tableData: [
        [
           {
                "Name": "Bala",
                "Score": "88",
            },
            {
               "Name": "Balakrishna",
                "Score": "97",
            }
      ]
    }
  4. use the dash lets library to populate the table as per the documentation https://project-sunbird.atlassian.net/wiki/spaces/SBDES/pages/2312110137/Dashlets+Design+Doc?focusedCommentId=2394980376#comment-2394980376

    Code Block
    <sb-dashlet [type]="string" [config]="config" [data]="data | IDataLocation" , [id]="string | uuid" [height]="string"
        [width]="string" (...anyOtherEvent)="eventListener($event)">
    </sb-dashlet>