Bulk Upload Questions
https://project-sunbird.atlassian.net/browse/SB-22801
...
When a contributor logs into contribution portal and opens a target collection page of a project to which she can contribute (i.e. her nomination is accepted), currently against each target collection there is an “Upload Content” that opens the collection hierarchya “Create New” action using which user can create a question set.
Given user has access to a sourcing project where she can contribute, When she creates a question set within the sourcing project, Then she can upload questions to the question set
User will see an option to “Bulk Upload Question” in the question set similar to “QR codes” in the collection asset editor
In addition, there should be a “Bulk Upload Question” option.
Clicking “Bulk Upload Question” option, Bulk Upload Question screen should open up. The screen should have following optionsOption to select a Bulk Upload Question (metadata) file from local folder (of user’s system)
Assumption: the metadata file will have publicly accessible URLs to the question related filesThere is a link to sample metadata file: “Sample Bulk Upload Question metadata file”
User selects metadata file, user clicks “Upload”. System provides a message “Validating file”
The system should first validate metadata file against the selected files. Following are the validations:
All the columns are available
All the mandatory columns have values filled in
There are no duplicate URLs in file path column
In case there are errors in the metadata file validation, display relevant error message on the Upload dialog
Some columns are not available:
“Metadata file validation failed. Following columns are not found in the file. Please check and upload again: <list the missing column names>”Some mandatory columns have values missing:
“Metadata file validation failed. Following rows have missing values. Please check and upload again: <list the row numbers (starting from 1) with missing values>“Some duplicate URLs in File path column:”Metadata file validation failed. Following rows have duplicate file links. Please check and upload again: <list the row numbers (starting from 1) with duplicate links>“
In case of metadata file validation errors, “Upload” button is disabled unless user re-selects a metadata file again.
In case metadata file doesn’t have any validation errors, the dialog shows
“Bulk Upload is in progress.
Number of content uploaded successfully: <no.>
Number of content failed: <no.>
Number of content pending: <no.>”There is an option to download status report as a csv. The status report should include identifier of the question (as generated by the system i.e. API response) and status (Success, Failure, Error, Invalid, etc)
There is a “Close” button to close the dialog. When user clicks it, it is returned to Textbook page of the project.
In the Textbook Question Set page, whenever user clicks “Bulk Upload Content”Questions”, in case a bulk upload for that textbook is in progress, it shows the status dialog as described in point 8.
...