Repository navigation
File Uploading (CSV, Aiken, XML)
lperez0 edited this page Mar 20, 2017
·
3 revisions
In order for the File uploading portion to work, one must add the attribute allowCasualMultipartParsing="true" into the the Tomcat "context.xml" file. This attribute MUST be attached to the <context> tag in "Servers/Tomcat/context.xml".
Failure to add this attribute will lead to a 500 error with the following exceptions thrown:
org.springframework.web.multipart.MultipartException: Could not parse multipart servlet requestjava.lang.IllegalStateException: Unable to process parts as no multi-part configuration has been provided
This XML parser works with LMS output of XML files. Integrating the XML parser into a page consist of adding the Script tag for xmlparser.js and using the extractXml and createQuestions functions.
- The extractXml() - parse through the xml document and should be run before the createQuestions function. It can pull questions that are multiple choice or multiple select. It was tested to set the category of Java, C#, and Data Structures.
- The createdQuestions() - sends a list of question objects to the questions rest controller to be saved to the database.