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

« Previous Version 7 Next »

Background

The textbook creator should be able to update the existing Text book unit attributes in the TOC by uploading the excel (CSV) file.

Key design problems

On click of ' Update TOC'  button user will be uploading the CSV file with updated Text book unit attributes.

Solution 1:

'Update Toc' button is updated in the 'sunbirdcommonheader' plugin, on click of the button, we are dispatching an event 'org.ekstep.uploadtoc:show' 

The plugin to upload the CSV file will listen to the event org.ekstep.uploadtoc:show

To provide the upload file with drag and drop feature, the library fineuploader used in the `org.ekstep.uploadcontent` plugin will be utilized, the suggested name of the plugin is `org.ekstep.uploadtoc-1.0` 

The CSV file should have the updated attributes like Name, Description, topics, keywords, DIAL code

Validate if the CSV file is uploaded else throw an error saying, uploaded_file_name has a invalid extension, Please enter a .CSV file.

the request of the api will be  request { data : [file] }

and notify the user if there are any errors from the error response and update the Text book unit attributes on success of api response

On success of the response update the attributes of the textbook unit.


Pros:

Plugin can be reused in multiple places like upload the CSV

Cons

Basic validations like empty record check is known after the api call.

Solution 2:

Provide the upload feature with out the plugin, provide the drag and drop / upload file in the 'sunbirdcommonheader' plugin. 

Validate if the CSV file is uploaded else throw an error saying, uploaded_file_name has a invalid extension, Please enter a .CSV file.

the request of the api will be  request { data : [file] }

and notify the user if there are any errors from the error response and update the Text book unit attributes on success of api response

On success of the response update the attributes of the textbook unit.

Pros:

re-usability of the code is limited to only 'sunbirdcommonheader' plugin.

Cons

Basic validations like empty record check is known after the api call.



  • No labels