Moodle: Updating Student List – Documentation
Using this web-application, when the user uploads a CSV with student and course details, the students who are enrolled in the course according to uploaded CSV will be added, students who are not in the uploaded CSV but are still in enrolled in the course will be removed as it will be considered that those students dropped out of the class
Open the /add_csv tab on and
- Upload the CSV file with the updated student list
- Add the semester name Eg. fall19, spring19
The students who are not registered will automatically be registered and will be able to login through their ASU Ids.
Moodle: Running the Flask Server
- In the directory beck@runge.la.asu.edu:/home/beck/arunima/
Run the following commands:
source moodle_venv/bin/activate (this command will start the virtual environment)
python moodle_flask/flasklog.py (this command will start the Flask server)
2. In your browser open http://runge.la.asu.edu:1212/add_csv to upload the csv of the student list
This Flask Server is built on Python3.6
Libraries required for proper functioning of this server are: Flask, Pandas, Numpy, Flask-WTF, WTForms,requests, response
However, if you are running the server through virtual environment or pm2, all these dependencies will already be taken care off.
Moodle: To start the Flask Application using pm2
In the directory beck@runge.la.asu.edu:/home/beck/arunima/moodle_flask
Run: pm2 start flasklog.py
Format of the Uploaded CSV File:
- The uploaded file must always be in .csv format. Any other format will not be uploaded.
- The format of the .csv file must be (First Nm,Last Nm,Emplid,Class Nbr,Primary Instructor,Sub & Cat,Asu Email Addr,Asu Asurite Id). The format is anything else, appropriate results will not be rendered.
Moodle-Flask: Documentation
For running flask in production environment run the following commands:
export FLASK_DEBUG=False
export ENV= ‘production’
For running flask in development environment run the following commands:
export FLASK_DEBUG=True
export ENV= ‘development’
