copyclare.data package#
Subpackages#
Submodules#
copyclare.data.database module#
Contributors: Adi Bozzhanov, Sree Sanakkayala, Tianhao Chen
-
class
copyclare.data.database.
Database
(db_file)# -
Bases:
object
-
add_attempt
(attempt)#
-
add_exercise
(exercise)#
-
add_tag
(tag)#
-
add_tag_to_exercise
(tag, exercise)#
-
close
()#
-
delete
(table_name, key_name, key)#
-
get_all_attempts
()#
-
get_all_exercises
()# -
Returns a list of all exercise objects
-
get_all_tags
()#
-
get_attempt_in_exercise
()#
-
get_exercise_name_and_desc_by_ID
(id)#
-
get_exercise_tags
(exercise)# -
Given the exercise id returns a list of tag objects
-
get_exercises_by_tag
(tag)#
-
get_one_attempt_by_ID
(id)#
-
get_one_exercise_by_ID
(id)#
-
remove_tag_from_exercise
(tag, exercise)#
-
-
copyclare.data.database.
main
()#
copyclare.data.exporter module#
Contributors: Yan Lai, Sree Sanakkayala
-
class
copyclare.data.exporter.
AccuracyGraphExporter
# -
Bases:
object
-
draw_accuracy_graph
(session_json)# -
- Parameters
session_json ([[int,int]]]) – A list of tuples containing timestamps and accuracy for an attempt.
- Returns
The plotted graph widget.
- Return type
PlotWidget
-
export_accuracy_graph
(session_json, attempt_id)# -
- Parameters
session_json ([[int,int]]]) – A list of tuples containing timestamps and accuracy for an attempt.
attempt_id (int) – The id of selected attempt.
-
-
class
copyclare.data.exporter.
DocumentWriter
# -
Bases:
object
This is a helper class build the .docx file based on the inputted data
-
create_document
(saveAs, export_title, exercise_info, quantitative_data, qualitative_data)# -
the main function to call to create a .docx file
- Parameters
saveAs (_type_) – absolute path of where the file needs to be stored
export_title (_type_) – the title of the document
exercise_info (_type_) – basic info of the exercise
quantitative_data (_type_) – quantitative data of the exercise (see above)
qualitative_data (_type_) – qualitative data of the exercise (see above)
-
-
class
copyclare.data.exporter.
Exporter
(database)# -
Bases:
object
This class has the functions to gather all of the necessary information to from the given database to create a progress report.
- Parameters
database – The database from which that data will be exported from
-
export
(saveAs, attempt_id=None)# -
Exports the data from the database to a .docx file. :param saveAs: absolute path for where report needs to be saved. :param attempt_id: the attempt id of the attempt that needs to be exported.
if null, then the tool will export all
Module contents#
Contributors: Adi Bozzhanov