Commit cb7c4463 authored by LammLukas's avatar LammLukas

Added example_2.py

parent fee526af
"""
Example 1 - Making your own scripts with miraculix
This short script will guide you through the process of writing your own scripts using the miraculix software.
This short script will guide you through the process of writing your own scripts using the
Miraculix framework. It covers the creation of an examination as well as the automated generation
of protocols etc.
Author: L. Lamm (lamm@ifam.rwth-aachen.de)
"""
......@@ -47,6 +49,17 @@ protocol = Protocol(exam)
protocol.make_protocol('./data/example_protocol.docx')
"""
6. Save examination
6. Create and export rating list
To record the points for every student, you can generate an easy to use .csv file for your exam.
After creating this file, you can open it in Microsoft Excel or Libre/OpenOffice to fill in the
points achieved for every participant.
If you wish, you can also calculate the final grades within your spreadsheet software. Otherwise,
you can also use the build in functionality of Miraculix as will be described in example_2.py.
"""
exam.export_rating_list('./data/example_rating_list.csv')
"""
7. Save examination
"""
exam.save_exam('./data/example_exam.json')
\ No newline at end of file
"""
Example 2 - Making your own scripts with miraculix
This examples shows you how to do simple automated evaluation of your examination.
To work on this example, you first need to run example_1.py.
Author: L. Lamm (lamm@ifam.rwth-aachen.de)
"""
"""
1. Import all necessary packages
"""
from src.exam import Exam
from src.evaluator import Evaluator
"""
2. Load examination from file and import ratings
After saving the examination from example_1 to a .json file, we can now load the stored data
into a new exam object. If you have already recorded the scores of each participant within the
exported list from example_1, you can also import these scores now.
"""
exam = Exam()
exam.load_exam('./data/example_exam.json')
exam.import_rating_list('./data/example_rating_list_filled.csv')
"""
3. Evaluate your exam
If you did do the evaluation within your desired spreadsheet software, you can easily skip this
section. Otherwise, you can now use the build in evaluation tool to evaluate your examination.
All you need to provide is the scoring thresholds for your passing grade (4.0) and for the excellent
grade (1.0). By default, these values are set to 50% and 90%.
"""
eval = Evaluator(exam)
eval.evaluate(0.5, 0.9)
"""
4. Save examination
"""
exam.save_exam('./data/example_exam.json')
"""
5. Export data to RWTHOnline file
Finally, you can write the results of your examination to the file you downloaded from RWTHOnline.
Once this is done, you can easily upload this file in RWTHOnline and your examination process is
done. Congratulations!
"""
exam.export_data_RWTHOnline()
......@@ -3,11 +3,13 @@ from src.protocols import Protocol
from src.evaluator import Evaluator
ex = Exam('./tests/testdata/large_exam_inputdata.csv')
ex = Exam('D:/work/Lehre/Kontinuumsmechanik/WiSe1920/Prüfung_Auswertungen/Fachpruefung_17022020-1130_31PV00008_FA_Kontinnumsmechanik-ContinuumMechanics.csv')
ex.Points_per_task = [25, 25, 25, 25]
#ex.assign_participants()
#prot = Protocol(ex)
#prot.make_protocol('./tests/testdata/test_protocol.docx')
ex.assign_participants()
prot = Protocol(ex)
prot.make_protocol('D:/work/Lehre/Kontinuumsmechanik/WiSe1920/Prüfung_Auswertungen/Protokoll.docx')
ex.save_exam('D:/work/Lehre/Kontinuumsmechanik/WiSe1920/Prüfung_Auswertungen/Exam.json')
ex.export_rating_list('D:/work/Lehre/Kontinuumsmechanik/WiSe1920/Prüfung_Auswertungen/Rating_list.csv')
eval = Evaluator(ex)
eval.evaluate()
\ No newline at end of file
#eval = Evaluator(ex)
#eval.evaluate()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment