## 2 MWDEX: Moodle Workshop Data EXtractor
### User Interface  
The main component of MWDEX is the web application, programmed in JavaScript and using Node.js and the Expressjs framework for the reasons mentioned in Section 2.1. Node.js allows extension of its core functionalities by importing external libraries. The four main JavaScript external libraries (with their corresponding dependencies) necessary to fulfill the design requirements of the application are \"jsonfile\" ([[https://www.npmjs.com/package/jsonfile](https://www.npmjs.com/package/jsonfile)]([https://www.npmjs.com/package/jsonfile](https://www.npmjs.com/package/jsonfile))) to implement read/write of JSON files, \"request-promise\" ([[https://github.com/request/request-promise](https://github.com/request/request-promise)]([https://github.com/request/request-promise](https://github.com/request/request-promise))) to add JavaScript promise support and control flow of data processing, \"exceljs/modern.nodejs\" ([[https://github.com/exceljs](https://github.com/exceljs)]([https://github.com/exceljs](https://github.com/exceljs))) to export workshop data to MS Excel), and \"pivotable\" ([[https://github.com/nicolaskruchten/pivottable](https://github.com/nicolaskruchten/pivottable)]([https://github.com/nicolaskruchten/pivottable](https://github.com/nicolaskruchten/pivottable))) for the interactive visual presentation layer. The natural flow of execution of MWDEX has the following use case scenario:  
1. An instructor with a valid user in the Moodle LMS instance accesses MWDEX using his or her web browser at the specified URL, either local or remote (by default, the application is listening on the port 3000, but it is possible to configure the application to listen on a different port). Upon loading of MWDEX in the browser, the interface prompts for the following logon credentials: username, password, URL of the Moodle LMS, and name of the web service (Figure 4). The application also allows prepopulation of the different fields by using a URL with the following structure: https://[MWDEX_location]/#url=[MoodleURL]&username=[MoodleUsername] &password=[MoodlePassword]&service=[MWDEX_service_name_in_Moodle]. 2. After authentication, the web interface of MWDEX displays a list of the available courses (Figure 5). 3. The instructor chooses one course and then MWDEX shows a list of the available workshops in that course (Figure 6). 4. When a workshop is selected, the interface shows a list of all the students participating in the activity. The user must then choose the output format and confirm the selection (Figure 7). The following five different output options are possible: MS Excel file (.xlsx), formatted and raw JSON file (json) and interactive visual presentation of results for analysis, with two different options (interactive data visualization and charts, and interactive pivot table and export). Figure 4: MWDEX home page. Figure 5: MWDEX screen for course selection. Figure 6: MWDEX screen for workshop selection. 5. Once all data have been retrieved, it is necessary to transform them so that each output file associates each user's submission with its corresponding grades, reviewers, feedbacks, and assessments. This is where the main part of the code of MWDEX gets executed. At this point, there are two main data structures involved, an array of users, with a list of the students enrolled in the selected course, and a multidimensional array of heterogeneous data.