studium 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of studium might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +1982 -0
- data/bin/ask_exam_question +7 -0
- data/bin/check_description_of_these_lectures +7 -0
- data/bin/curriculum_module_displayer +7 -0
- data/bin/d10 +7 -0
- data/bin/d100 +7 -0
- data/bin/d15 +7 -0
- data/bin/d20 +7 -0
- data/bin/d25 +7 -0
- data/bin/d3 +7 -0
- data/bin/d30 +7 -0
- data/bin/d5 +7 -0
- data/bin/determine_curricula +7 -0
- data/bin/exam_registration_at +7 -0
- data/bin/exam_statistics +7 -0
- data/bin/exams_per_month +9 -0
- data/bin/finished_exams_at_this_university +7 -0
- data/bin/flashcards +7 -0
- data/bin/mandatory_continuous_assessment +7 -0
- data/bin/mandatory_upcoming_courses +7 -0
- data/bin/n_exam_questions_already_answered +16 -0
- data/bin/nquestions +7 -0
- data/bin/nsolved +7 -0
- data/bin/open_last_exam_question_asked_file +7 -0
- data/bin/passed_pr/303/274fungsimmanente_courses +7 -0
- data/bin/return_n_ects_from_this_file +7 -0
- data/bin/show_lectures_on_the_commandline +7 -0
- data/bin/show_themes +7 -0
- data/bin/solved +9 -0
- data/bin/solved_ects +7 -0
- data/bin/studienkennzahl +7 -0
- data/bin/studium +7 -0
- data/bin/studium_skeleton +7 -0
- data/bin/ufind +7 -0
- data/bin/upcoming_exams +7 -0
- data/bin/week_parser +7 -0
- data/doc/ECTS_CONSIDERATIONS.md +81 -0
- data/doc/HOW_TO_ADAPT_THIS_PROJECT.md +43 -0
- data/doc/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER.md +47 -0
- data/doc/README.gen +1965 -0
- data/doc/TODO_FOR_STUDIUM_GEM.md +113 -0
- data/doc/deprecated_components.md +24 -0
- data/doc/documentation_for_the_file_lecture_information.md +294 -0
- data/doc/elegant_colours.md +20 -0
- data/img/STUDIES.png +0 -0
- data/lib/studium.rb +5 -0
- data/lib/studium/autoinclude.rb +7 -0
- data/lib/studium/base/base.rb +84 -0
- data/lib/studium/base/cliner.rb +58 -0
- data/lib/studium/base/colours.rb +307 -0
- data/lib/studium/base/commandline_arguments.rb +64 -0
- data/lib/studium/base/constants.rb +34 -0
- data/lib/studium/base/curriculum.rb +329 -0
- data/lib/studium/base/directory_to_the_exam_topics.rb +23 -0
- data/lib/studium/base/editor.rb +28 -0
- data/lib/studium/base/encoding.rb +36 -0
- data/lib/studium/base/esystem.rb +23 -0
- data/lib/studium/base/minimal_prototype.rb +66 -0
- data/lib/studium/base/misc.rb +854 -0
- data/lib/studium/base/mode.rb +92 -0
- data/lib/studium/base/obtain.rb +145 -0
- data/lib/studium/base/opnn.rb +46 -0
- data/lib/studium/base/prototype.rb +92 -0
- data/lib/studium/base/readlines.rb +55 -0
- data/lib/studium/base/replace.rb +110 -0
- data/lib/studium/base/reset.rb +77 -0
- data/lib/studium/base/run.rb +17 -0
- data/lib/studium/base/src_dir_at_home.rb +20 -0
- data/lib/studium/base/time.rb +634 -0
- data/lib/studium/base/unicode.rb +95 -0
- data/lib/studium/base/word_wrap.rb +58 -0
- data/lib/studium/boku/README.md +4 -0
- data/lib/studium/boku/boku_biotechnology_all_master_lectures.rb +142 -0
- data/lib/studium/boku/boku_/303/266ffnungszeiten.rb +29 -0
- data/lib/studium/boku/show_three_pillars_of_these_lectures.rb +96 -0
- data/lib/studium/boku/three_pillars.rb +232 -0
- data/lib/studium/check_and_sanitize/README.md +11 -0
- data/lib/studium/check_and_sanitize/check_curriculum_for_correct_separation_of_bachelor_and_master.rb +149 -0
- data/lib/studium/check_and_sanitize/check_for_all_exam_topics_being_registered.rb +107 -0
- data/lib/studium/check_and_sanitize/check_for_existing_description_of_this_lecture.rb +197 -0
- data/lib/studium/check_and_sanitize/check_the_lecture_information_file.rb +171 -0
- data/lib/studium/check_and_sanitize/missing_priority_entry.rb +44 -0
- data/lib/studium/check_and_sanitize/sanitize_this_string_containing_the_lva_dates.rb +79 -0
- data/lib/studium/colours/colours.rb +570 -0
- data/lib/studium/colours/sfancy.rb +40 -0
- data/lib/studium/colours/sfile.rb +35 -0
- data/lib/studium/colours/simp.rb +38 -0
- data/lib/studium/colours/use_this_colour_for_exam_questions_and_exam_answers.rb +76 -0
- data/lib/studium/commandline/commandline.rb +25 -0
- data/lib/studium/commandline/constants.rb +16 -0
- data/lib/studium/commandline/help.rb +152 -0
- data/lib/studium/commandline/initialize.rb +27 -0
- data/lib/studium/commandline/menu.rb +760 -0
- data/lib/studium/commandline/misc.rb +707 -0
- data/lib/studium/commandline/reset.rb +24 -0
- data/lib/studium/commandline/run.rb +20 -0
- data/lib/studium/constants/boku_wien.rb +52 -0
- data/lib/studium/constants/constants.rb +25 -0
- data/lib/studium/constants/delay.rb +28 -0
- data/lib/studium/constants/editor.rb +28 -0
- data/lib/studium/constants/exam_topics.rb +183 -0
- data/lib/studium/constants/file_constants.rb +875 -0
- data/lib/studium/constants/image_constants.rb +216 -0
- data/lib/studium/constants/last_question_asked.rb +38 -0
- data/lib/studium/constants/lecture_types_that_are_mandatory_continuous_assessment.rb +47 -0
- data/lib/studium/constants/misc.rb +163 -0
- data/lib/studium/constants/namespace.rb +14 -0
- data/lib/studium/constants/newline.rb +14 -0
- data/lib/studium/constants/regexes.rb +35 -0
- data/lib/studium/constants/return_file_for_this_curriculum.rb +411 -0
- data/lib/studium/constants/roebe.rb +173 -0
- data/lib/studium/constants/time.rb +52 -0
- data/lib/studium/constants/tu_wien.rb +39 -0
- data/lib/studium/constants/uni_wien.rb +24 -0
- data/lib/studium/constants/unicode.rb +27 -0
- data/lib/studium/constants/week.rb +138 -0
- data/lib/studium/constants/www_constants.rb +23 -0
- data/lib/studium/curricula/curriculum.rb +199 -0
- data/lib/studium/curricula/curriculum_as_string.rb +279 -0
- data/lib/studium/curricula/curriculum_module_displayer/constants.rb +38 -0
- data/lib/studium/curricula/curriculum_module_displayer/curriculum_module_displayer.rb +417 -0
- data/lib/studium/curricula/curriculum_module_displayer/initialize.rb +25 -0
- data/lib/studium/curricula/curriculum_module_displayer/menu.rb +45 -0
- data/lib/studium/curricula/curriculum_module_displayer/reset.rb +77 -0
- data/lib/studium/curricula/curriculum_module_displayer/run.rb +20 -0
- data/lib/studium/curricula/curriculum_module_displayer/set_use_this_curriculum.rb +93 -0
- data/lib/studium/curricula/curriculum_module_displayer/show_and_report.rb +190 -0
- data/lib/studium/curricula/determine_curricula/constants.rb +16 -0
- data/lib/studium/curricula/determine_curricula/determine_curricula.rb +36 -0
- data/lib/studium/curricula/determine_curricula/help.rb +39 -0
- data/lib/studium/curricula/determine_curricula/initialize.rb +48 -0
- data/lib/studium/curricula/determine_curricula/menu.rb +138 -0
- data/lib/studium/curricula/determine_curricula/misc.rb +402 -0
- data/lib/studium/curricula/determine_curricula/report.rb +131 -0
- data/lib/studium/curricula/determine_curricula/reset.rb +62 -0
- data/lib/studium/curricula/determine_curricula/run.rb +19 -0
- data/lib/studium/curricula/determine_elective_courses_in_this_curriculum.rb +112 -0
- data/lib/studium/curricula/display_bachelor_curricula.rb +89 -0
- data/lib/studium/curricula/mitteilungsbl/303/244tter.rb +336 -0
- data/lib/studium/curricula/modules/display_on_the_commandline.rb +316 -0
- data/lib/studium/curricula/modules/return_n_ects_in_this_module.rb +74 -0
- data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +75 -0
- data/lib/studium/curricula/random_curriculum_creator.rb +171 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum.rb +114 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/constants.rb +16 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/initialize.rb +27 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/menu.rb +35 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/misc.rb +242 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/report.rb +140 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/reset.rb +67 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/show_lectures_of_this_curriculum_id.rb +37 -0
- data/lib/studium/curricula/show_solved_percentage_among_the_registered_curricula.rb +87 -0
- data/lib/studium/ects/boku_ects_splitter.rb +127 -0
- data/lib/studium/ects/ects_parser.rb +179 -0
- data/lib/studium/ects/ects_per_university.rb +140 -0
- data/lib/studium/ects/ects_scanner.rb +141 -0
- data/lib/studium/ects/ects_to_university_parser.rb +148 -0
- data/lib/studium/ects/erledigt.rb +131 -0
- data/lib/studium/ects/last_entry_is_curriculum.rb +147 -0
- data/lib/studium/ects/n_ects_in_these_lectures.rb +185 -0
- data/lib/studium/ects/n_ects_points_in_mandatory_presence_courses.rb +50 -0
- data/lib/studium/ects/noch_zu_absolvieren.rb +172 -0
- data/lib/studium/ects/return_n_ects_from_this_file.rb +58 -0
- data/lib/studium/ects/return_n_ects_from_this_url.rb +202 -0
- data/lib/studium/ects/search_for_n_ects.rb +540 -0
- data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +210 -0
- data/lib/studium/ects/show_passed_credits_per_curriculum.rb +254 -0
- data/lib/studium/ects/simple_total_ects_points.rb +143 -0
- data/lib/studium/ects/solved_ects/constants.rb +24 -0
- data/lib/studium/ects/solved_ects/reset.rb +54 -0
- data/lib/studium/ects/solved_ects/solved_ects.rb +325 -0
- data/lib/studium/ects/solved_ects_per_university/reset.rb +25 -0
- data/lib/studium/ects/solved_ects_per_university/solved_ects_per_university.rb +106 -0
- data/lib/studium/ects/still_missing.rb +133 -0
- data/lib/studium/ects/sum_of_ects.rb +150 -0
- data/lib/studium/encoding/encoding.rb +150 -0
- data/lib/studium/exam_topics/RNAi_siRNA_and_miRNA +79 -0
- data/lib/studium/exam_topics/abfall_als_ressource +86 -0
- data/lib/studium/exam_topics/advanced_biochemistry +762 -0
- data/lib/studium/exam_topics/advanced_biotechnology +192 -0
- data/lib/studium/exam_topics/advanced_cellbiology +25 -0
- data/lib/studium/exam_topics/advanced_chemistry +453 -0
- data/lib/studium/exam_topics/advanced_microbiology +44 -0
- data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +51 -0
- data/lib/studium/exam_topics/advanced_virology +52 -0
- data/lib/studium/exam_topics/ageing +101 -0
- data/lib/studium/exam_topics/agrar_ecology +61 -0
- data/lib/studium/exam_topics/agrarmarkt +70 -0
- data/lib/studium/exam_topics/agrarphysik +35 -0
- data/lib/studium/exam_topics/alcohols +29 -0
- data/lib/studium/exam_topics/algorithms +49 -0
- data/lib/studium/exam_topics/allergie +73 -0
- data/lib/studium/exam_topics/allgemeine_genetik +1006 -0
- data/lib/studium/exam_topics/allgemeine_mikrobiologie +855 -0
- data/lib/studium/exam_topics/aminoacids +417 -0
- data/lib/studium/exam_topics/analytische_chemie_1 +131 -0
- data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
- data/lib/studium/exam_topics/anatomie +248 -0
- data/lib/studium/exam_topics/anorganische_chemie +289 -0
- data/lib/studium/exam_topics/anthropologie +115 -0
- data/lib/studium/exam_topics/antibodies_and_antigens +747 -0
- data/lib/studium/exam_topics/apoptosis +35 -0
- data/lib/studium/exam_topics/archaea +41 -0
- data/lib/studium/exam_topics/architecture +8 -0
- data/lib/studium/exam_topics/artificial_intelligence +81 -0
- data/lib/studium/exam_topics/audio +10 -0
- data/lib/studium/exam_topics/bacteriophages +224 -0
- data/lib/studium/exam_topics/basic_biochemistry +1008 -0
- data/lib/studium/exam_topics/basic_biotechnology +1011 -0
- data/lib/studium/exam_topics/basic_chemistry +1007 -0
- data/lib/studium/exam_topics/basic_virology +955 -0
- data/lib/studium/exam_topics/bauwesen +6 -0
- data/lib/studium/exam_topics/betriebssysteme +125 -0
- data/lib/studium/exam_topics/betriebswirtschaftslehre +29 -0
- data/lib/studium/exam_topics/bioanalytik_und_biosensoren +381 -0
- data/lib/studium/exam_topics/biochips +78 -0
- data/lib/studium/exam_topics/bioelektrochemie +56 -0
- data/lib/studium/exam_topics/biofilms +22 -0
- data/lib/studium/exam_topics/bioinformatics +475 -0
- data/lib/studium/exam_topics/biological_therapeutics +152 -0
- data/lib/studium/exam_topics/biologie +134 -0
- data/lib/studium/exam_topics/biomarkers +106 -0
- data/lib/studium/exam_topics/biomaterials +46 -0
- data/lib/studium/exam_topics/biomembranes +6 -0
- data/lib/studium/exam_topics/bionik +65 -0
- data/lib/studium/exam_topics/biophysik +34 -0
- data/lib/studium/exam_topics/biopolymers +10 -0
- data/lib/studium/exam_topics/bioprozesstechnik +139 -0
- data/lib/studium/exam_topics/bioressourcenmanagement +78 -0
- data/lib/studium/exam_topics/bodenkunde +345 -0
- data/lib/studium/exam_topics/bodenmikrobiologie +40 -0
- data/lib/studium/exam_topics/cancerbiology +441 -0
- data/lib/studium/exam_topics/cell_cultures +154 -0
- data/lib/studium/exam_topics/cellbiology +962 -0
- data/lib/studium/exam_topics/cellular_transport_and_protein_secretion +27 -0
- data/lib/studium/exam_topics/chemische_technologie_anorganischer_stoffe +208 -0
- data/lib/studium/exam_topics/chemisches_labor +59 -0
- data/lib/studium/exam_topics/chemotaxis_and_motility_in_prokaryotes +74 -0
- data/lib/studium/exam_topics/citric_acid_cycle +70 -0
- data/lib/studium/exam_topics/clinical_microbiology +486 -0
- data/lib/studium/exam_topics/computer_graphics +5 -0
- data/lib/studium/exam_topics/computer_science +269 -0
- data/lib/studium/exam_topics/crispr +25 -0
- data/lib/studium/exam_topics/cyanobacteria +37 -0
- data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +506 -0
- data/lib/studium/exam_topics/databases_and_sql +105 -0
- data/lib/studium/exam_topics/dna_mutation_and_dna_repair +33 -0
- data/lib/studium/exam_topics/dna_replication +53 -0
- data/lib/studium/exam_topics/ecogenetics +27 -0
- data/lib/studium/exam_topics/ecological_agriculture +12 -0
- data/lib/studium/exam_topics/ecology +313 -0
- data/lib/studium/exam_topics/economy +210 -0
- data/lib/studium/exam_topics/elektronenmikroskopie +353 -0
- data/lib/studium/exam_topics/elektrophorese +88 -0
- data/lib/studium/exam_topics/elektrotechnik +8 -0
- data/lib/studium/exam_topics/elisa +54 -0
- data/lib/studium/exam_topics/embryologie_und_entwicklung +541 -0
- data/lib/studium/exam_topics/endospores_and_spores +92 -0
- data/lib/studium/exam_topics/enzymes_and_cofactors +327 -0
- data/lib/studium/exam_topics/epigenetik +177 -0
- data/lib/studium/exam_topics/ethik +125 -0
- data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +323 -0
- data/lib/studium/exam_topics/excel +7 -0
- data/lib/studium/exam_topics/fish +19 -0
- data/lib/studium/exam_topics/fluorescence_microscopy +7 -0
- data/lib/studium/exam_topics/food_microbiology_and_food_biotechnology +17 -0
- data/lib/studium/exam_topics/forensik +11 -0
- data/lib/studium/exam_topics/forstwirtschaft +52 -0
- data/lib/studium/exam_topics/fortgeschrittene_genetik +429 -0
- data/lib/studium/exam_topics/fortgeschrittene_gentechnik +189 -0
- data/lib/studium/exam_topics/fortgeschrittene_physik +6 -0
- data/lib/studium/exam_topics/fungi +78 -0
- data/lib/studium/exam_topics/genetische_krankheiten +150 -0
- data/lib/studium/exam_topics/genexpression +1008 -0
- data/lib/studium/exam_topics/genomics_and_metagenomics +205 -0
- data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +863 -0
- data/lib/studium/exam_topics/geochemistry +66 -0
- data/lib/studium/exam_topics/geography +5 -0
- data/lib/studium/exam_topics/geologie_und_mineralogie +610 -0
- data/lib/studium/exam_topics/geschichte +94 -0
- data/lib/studium/exam_topics/gluconeogenesis +34 -0
- data/lib/studium/exam_topics/glycolysis +95 -0
- data/lib/studium/exam_topics/glykomik +42 -0
- data/lib/studium/exam_topics/glyoxylatzyklus +23 -0
- data/lib/studium/exam_topics/grassland_cultivation +32 -0
- data/lib/studium/exam_topics/hormone +122 -0
- data/lib/studium/exam_topics/html +7 -0
- data/lib/studium/exam_topics/human_ecology +8 -0
- data/lib/studium/exam_topics/hygiene +191 -0
- data/lib/studium/exam_topics/imaging_and_microscopy +224 -0
- data/lib/studium/exam_topics/immunanalytik +88 -0
- data/lib/studium/exam_topics/immunologie +888 -0
- data/lib/studium/exam_topics/informatik +95 -0
- data/lib/studium/exam_topics/innate_immunity +20 -0
- data/lib/studium/exam_topics/insekten +30 -0
- data/lib/studium/exam_topics/insulin_and_diabetes +55 -0
- data/lib/studium/exam_topics/java +440 -0
- data/lib/studium/exam_topics/javascript +10 -0
- data/lib/studium/exam_topics/klima +6 -0
- data/lib/studium/exam_topics/landtechnik +27 -0
- data/lib/studium/exam_topics/lebensmittel +206 -0
- data/lib/studium/exam_topics/lebensmitteltechnologie +16 -0
- data/lib/studium/exam_topics/linux +5 -0
- data/lib/studium/exam_topics/lipids +95 -0
- data/lib/studium/exam_topics/macroeconomics +39 -0
- data/lib/studium/exam_topics/mathematics +175 -0
- data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +250 -0
- data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +397 -0
- data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
- data/lib/studium/exam_topics/metabolismus +433 -0
- data/lib/studium/exam_topics/microbial_ecology +35 -0
- data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +34 -0
- data/lib/studium/exam_topics/mikrobielle_physiologie +153 -0
- data/lib/studium/exam_topics/mixed +289 -0
- data/lib/studium/exam_topics/molecular_biology_of_plants +235 -0
- data/lib/studium/exam_topics/molekulare_medizin +129 -0
- data/lib/studium/exam_topics/nanotechnologie +303 -0
- data/lib/studium/exam_topics/nature_conservation_and_biodiversity +165 -0
- data/lib/studium/exam_topics/naturstoffe +9 -0
- data/lib/studium/exam_topics/netzwerke +32 -0
- data/lib/studium/exam_topics/neurobiology +266 -0
- data/lib/studium/exam_topics/nucleotide_sequencing +30 -0
- data/lib/studium/exam_topics/object_oriented_modeling +14 -0
- data/lib/studium/exam_topics/obstbau +234 -0
- data/lib/studium/exam_topics/organische_chemie +1007 -0
- data/lib/studium/exam_topics/organische_chemie_2 +72 -0
- data/lib/studium/exam_topics/paleobiology +33 -0
- data/lib/studium/exam_topics/parasitic_diseases_and_molecular_infection_biology +335 -0
- data/lib/studium/exam_topics/patent_law +55 -0
- data/lib/studium/exam_topics/pathologie +713 -0
- data/lib/studium/exam_topics/pcr +133 -0
- data/lib/studium/exam_topics/peroxisomes_glycosomes_and_lysosomes +54 -0
- data/lib/studium/exam_topics/pflanzenanatomie +240 -0
- data/lib/studium/exam_topics/pflanzenbau +24 -0
- data/lib/studium/exam_topics/pflanzenschutz +35 -0
- data/lib/studium/exam_topics/pflanzenwissenschaften +1009 -0
- data/lib/studium/exam_topics/pharmaceutical_biotechnology +250 -0
- data/lib/studium/exam_topics/physik +338 -0
- data/lib/studium/exam_topics/physikalische_chemie +85 -0
- data/lib/studium/exam_topics/physiology_and_histology +485 -0
- data/lib/studium/exam_topics/phytochemie +33 -0
- data/lib/studium/exam_topics/plant_biotechnology +127 -0
- data/lib/studium/exam_topics/plant_breeding +64 -0
- data/lib/studium/exam_topics/plant_development +50 -0
- data/lib/studium/exam_topics/populationsgenetik +136 -0
- data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +186 -0
- data/lib/studium/exam_topics/projektmanagement +218 -0
- data/lib/studium/exam_topics/prokaryote_genetics +470 -0
- data/lib/studium/exam_topics/proteomik +38 -0
- data/lib/studium/exam_topics/prozesstechnik +95 -0
- data/lib/studium/exam_topics/psychologie +9 -0
- data/lib/studium/exam_topics/python +350 -0
- data/lib/studium/exam_topics/quality_management +241 -0
- data/lib/studium/exam_topics/rechtsgrundlagen +115 -0
- data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
- data/lib/studium/exam_topics/rna_and_dna +362 -0
- data/lib/studium/exam_topics/rna_seq +11 -0
- data/lib/studium/exam_topics/ruby +131 -0
- data/lib/studium/exam_topics/ruby_on_rails +62 -0
- data/lib/studium/exam_topics/scientific_writing_and_publishing +38 -0
- data/lib/studium/exam_topics/semisynthese_von_proteinen_und_nukleotiden +120 -0
- data/lib/studium/exam_topics/sexualbiologie +59 -0
- data/lib/studium/exam_topics/signal_transduction_and_laser_systems +136 -0
- data/lib/studium/exam_topics/splicing_exons_and_introns +57 -0
- data/lib/studium/exam_topics/statistik +202 -0
- data/lib/studium/exam_topics/stemcells +87 -0
- data/lib/studium/exam_topics/structural_bioinformatics +54 -0
- data/lib/studium/exam_topics/strukturbiologie +319 -0
- data/lib/studium/exam_topics/system_biology_and_synthetic_biology +87 -0
- data/lib/studium/exam_topics/systematische_zoologie +430 -0
- data/lib/studium/exam_topics/technical_ecology +144 -0
- data/lib/studium/exam_topics/technische_chemie +194 -0
- data/lib/studium/exam_topics/technische_grundlagen_der_informatik +22 -0
- data/lib/studium/exam_topics/technische_mikrobiologie +403 -0
- data/lib/studium/exam_topics/technisches_zeichnen +5 -0
- data/lib/studium/exam_topics/the_bacterial_cell_wall +86 -0
- data/lib/studium/exam_topics/the_c_plus_plus_programming_language +488 -0
- data/lib/studium/exam_topics/the_c_programming_language +128 -0
- data/lib/studium/exam_topics/the_cellcycle +65 -0
- data/lib/studium/exam_topics/the_european_union +119 -0
- data/lib/studium/exam_topics/the_interferon_system +32 -0
- data/lib/studium/exam_topics/the_microbiome +163 -0
- data/lib/studium/exam_topics/the_universe +6 -0
- data/lib/studium/exam_topics/theoretische_chemie +5 -0
- data/lib/studium/exam_topics/theoretische_informatik +157 -0
- data/lib/studium/exam_topics/tierzucht +94 -0
- data/lib/studium/exam_topics/toxikologie +403 -0
- data/lib/studium/exam_topics/transcription +26 -0
- data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +138 -0
- data/lib/studium/exam_topics/umweltbiotechnologie +58 -0
- data/lib/studium/exam_topics/umweltchemie +233 -0
- data/lib/studium/exam_topics/urbanism_and_traffic +19 -0
- data/lib/studium/exam_topics/vaccines_and_vaccination +234 -0
- data/lib/studium/exam_topics/vectors_and_gene_therapy +237 -0
- data/lib/studium/exam_topics/verfahrenstechnik +32 -0
- data/lib/studium/exam_topics/veterinary_medicine +10 -0
- data/lib/studium/exam_topics/vitamine +19 -0
- data/lib/studium/exam_topics/wasserkunde +141 -0
- data/lib/studium/exam_topics/weinbau +59 -0
- data/lib/studium/exam_topics/wissenschaft +17 -0
- data/lib/studium/exam_topics/yeast +97 -0
- data/lib/studium/exam_topics/zoologie +329 -0
- data/lib/studium/exams/afterburn.rb +264 -0
- data/lib/studium/exams/ask_exam_from_the_upcoming_exams_pool.rb +158 -0
- data/lib/studium/exams/ask_exam_question/answer.rb +106 -0
- data/lib/studium/exams/ask_exam_question/ask_exam_question.rb +135 -0
- data/lib/studium/exams/ask_exam_question/constants.rb +74 -0
- data/lib/studium/exams/ask_exam_question/delay.rb +101 -0
- data/lib/studium/exams/ask_exam_question/help.rb +72 -0
- data/lib/studium/exams/ask_exam_question/initialize.rb +70 -0
- data/lib/studium/exams/ask_exam_question/menu.rb +382 -0
- data/lib/studium/exams/ask_exam_question/misc.rb +938 -0
- data/lib/studium/exams/ask_exam_question/question.rb +77 -0
- data/lib/studium/exams/ask_exam_question/reset.rb +103 -0
- data/lib/studium/exams/ask_exam_question/run.rb +49 -0
- data/lib/studium/exams/ask_exam_topic_question.rb +120 -0
- data/lib/studium/exams/ask_question_from_alias.rb +151 -0
- data/lib/studium/exams/ask_question_from_any_of_the_still_missing_lectures.rb +133 -0
- data/lib/studium/exams/ask_question_from_grouped_themes.rb +141 -0
- data/lib/studium/exams/ask_question_from_last_topic.rb +93 -0
- data/lib/studium/exams/ask_random_question.rb +190 -0
- data/lib/studium/exams/autoinclude.rb +7 -0
- data/lib/studium/exams/class.rb +127 -0
- data/lib/studium/exams/csv/create_csv_passed_exams_file.rb +225 -0
- data/lib/studium/exams/cycle.rb +283 -0
- data/lib/studium/exams/dataset.rb +90 -0
- data/lib/studium/exams/exam_registration_at/constants.rb +49 -0
- data/lib/studium/exams/exam_registration_at/exam_registration_at.rb +254 -0
- data/lib/studium/exams/exam_registration_at/help.rb +46 -0
- data/lib/studium/exams/exam_registration_at/menu.rb +81 -0
- data/lib/studium/exams/exam_registration_at/report.rb +108 -0
- data/lib/studium/exams/exam_registration_at/reset.rb +49 -0
- data/lib/studium/exams/exam_statistics_from_this_file/exam_statistics_from_this_file.rb +127 -0
- data/lib/studium/exams/exam_topics.rb +202 -0
- data/lib/studium/exams/exams.rb +18 -0
- data/lib/studium/exams/exams_per_month/colours.rb +81 -0
- data/lib/studium/exams/exams_per_month/constants.rb +69 -0
- data/lib/studium/exams/exams_per_month/dataset.rb +64 -0
- data/lib/studium/exams/exams_per_month/exams_per_month.rb +291 -0
- data/lib/studium/exams/exams_per_month/help.rb +72 -0
- data/lib/studium/exams/exams_per_month/initialize.rb +39 -0
- data/lib/studium/exams/exams_per_month/menu.rb +258 -0
- data/lib/studium/exams/exams_per_month/open.rb +139 -0
- data/lib/studium/exams/exams_per_month/requires.rb +8 -0
- data/lib/studium/exams/exams_per_month/reset.rb +115 -0
- data/lib/studium/exams/exams_per_month/run.rb +18 -0
- data/lib/studium/exams/exams_per_month/sanitize.rb +129 -0
- data/lib/studium/exams/exams_per_month/show_and_report.rb +1281 -0
- data/lib/studium/exams/exams_this_week.rb +179 -0
- data/lib/studium/exams/fix_exam_dates.rb +129 -0
- data/lib/studium/exams/last_exams/last_exams.rb +381 -0
- data/lib/studium/exams/lectures_without_exam_entry.rb +145 -0
- data/lib/studium/exams/mandatory_continuous_assessment/compare.rb +144 -0
- data/lib/studium/exams/mandatory_continuous_assessment/constants.rb +18 -0
- data/lib/studium/exams/mandatory_continuous_assessment/help.rb +92 -0
- data/lib/studium/exams/mandatory_continuous_assessment/initialize.rb +46 -0
- data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1115 -0
- data/lib/studium/exams/mandatory_continuous_assessment/menu.rb +114 -0
- data/lib/studium/exams/mandatory_continuous_assessment/misc.rb +61 -0
- data/lib/studium/exams/mandatory_continuous_assessment/reset.rb +85 -0
- data/lib/studium/exams/mandatory_continuous_assessment/run.rb +33 -0
- data/lib/studium/exams/mandatory_continuous_assessment/set_title_of_the_curriculum.rb +181 -0
- data/lib/studium/exams/mandatory_continuous_assessment/show_and_report.rb +147 -0
- data/lib/studium/exams/move_the_last_exam_question_to_the_top_of_the_file/move_the_last_exam_question_to_the_top_of_the_file.rb +119 -0
- data/lib/studium/exams/n_exams_in_these_topics.rb +408 -0
- data/lib/studium/exams/new_questions_per_year.rb +153 -0
- data/lib/studium/exams/next_exam.rb +111 -0
- data/lib/studium/exams/next_exams.rb +385 -0
- data/lib/studium/exams/open_exam_associated_url.rb +158 -0
- data/lib/studium/exams/open_last_exam_question_asked_file/constants.rb +20 -0
- data/lib/studium/exams/open_last_exam_question_asked_file/initialize.rb +29 -0
- data/lib/studium/exams/open_last_exam_question_asked_file/open_last_exam_question_asked_file.rb +112 -0
- data/lib/studium/exams/passed_exams/passed_exams.rb +46 -0
- data/lib/studium/exams/pruefung.rb +288 -0
- data/lib/studium/exams/push_solved_questions_on_top.rb +188 -0
- data/lib/studium/exams/question_answer/question_answer.rb +842 -0
- data/lib/studium/exams/questions_solved_from_day_to_day.rb +353 -0
- data/lib/studium/exams/repeat_last_question.rb +78 -0
- data/lib/studium/exams/show_all_passed_exams_of_this_university.rb +260 -0
- data/lib/studium/exams/show_backlog_of_exams.rb +125 -0
- data/lib/studium/exams/show_next_exams_for.rb +141 -0
- data/lib/studium/exams/show_themes/constants.rb +33 -0
- data/lib/studium/exams/show_themes/menu.rb +61 -0
- data/lib/studium/exams/show_themes/misc.rb +536 -0
- data/lib/studium/exams/show_themes/reset.rb +64 -0
- data/lib/studium/exams/show_themes/show_themes.rb +27 -0
- data/lib/studium/exams/show_upcoming_exams/consider_autogenerating_exam_aliases.rb +170 -0
- data/lib/studium/exams/show_upcoming_exams/constants.rb +82 -0
- data/lib/studium/exams/show_upcoming_exams/help.rb +33 -0
- data/lib/studium/exams/show_upcoming_exams/initialize.rb +71 -0
- data/lib/studium/exams/show_upcoming_exams/menu.rb +53 -0
- data/lib/studium/exams/show_upcoming_exams/report.rb +195 -0
- data/lib/studium/exams/show_upcoming_exams/reset.rb +38 -0
- data/lib/studium/exams/show_upcoming_exams/run.rb +20 -0
- data/lib/studium/exams/show_upcoming_exams/show_upcoming_exams.rb +494 -0
- data/lib/studium/exams/solve_all_questions_from_this_topic.rb +122 -0
- data/lib/studium/exams/solved/constants.rb +37 -0
- data/lib/studium/exams/solved/help.rb +23 -0
- data/lib/studium/exams/solved/menu.rb +35 -0
- data/lib/studium/exams/solved/reset.rb +30 -0
- data/lib/studium/exams/solved/solved.rb +306 -0
- data/lib/studium/exams/steop.rb +99 -0
- data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +170 -0
- data/lib/studium/exams/upcoming_exams/constants.rb +20 -0
- data/lib/studium/exams/upcoming_exams/help.rb +38 -0
- data/lib/studium/exams/upcoming_exams/initialize.rb +27 -0
- data/lib/studium/exams/upcoming_exams/menu.rb +79 -0
- data/lib/studium/exams/upcoming_exams/misc.rb +360 -0
- data/lib/studium/exams/upcoming_exams/reset.rb +37 -0
- data/lib/studium/exams/upcoming_exams/run.rb +25 -0
- data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +32 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/constants.rb +23 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/html.rb +64 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/upcoming_exams_at_the_boku.rb +194 -0
- data/lib/studium/exams/upcoming_exams_dataset.rb +251 -0
- data/lib/studium/exams/upload_exam_topics.rb +357 -0
- data/lib/studium/flashcards/flashcards.rb +95 -0
- data/lib/studium/graphviz/README.md +4 -0
- data/lib/studium/graphviz/bachelor_vector_based_strategies.dot +160 -0
- data/lib/studium/graphviz/master_vector_based_strategies.dot +46 -0
- data/lib/studium/gui/gtk2/constants.rb +52 -0
- data/lib/studium/gui/gtk2/exam_card.rb +199 -0
- data/lib/studium/gui/gtk2/flip_card.rb +8 -0
- data/lib/studium/gui/gtk2/frame.rb +319 -0
- data/lib/studium/gui/gtk2/main_box.rb +188 -0
- data/lib/studium/gui/gtk2/misc.rb +99 -0
- data/lib/studium/gui/gtk2/module_methods.rb +58 -0
- data/lib/studium/gui/gtk2/require_gtk_files.rb +25 -0
- data/lib/studium/gui/gtk2/run.rb +47 -0
- data/lib/studium/gui/gtk2/show_curriculum_entries.rb +186 -0
- data/lib/studium/gui/gtk2/simple_widget_question_answer.rb +185 -0
- data/lib/studium/gui/gtk2/vbox.rb +748 -0
- data/lib/studium/gui/gtk3/README.md +1 -0
- data/lib/studium/gui/gtk3/studium_panel.rb +54 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/constants.rb +22 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/determine.rb +630 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/help.rb +44 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/html.rb +599 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/initialize.rb +53 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/konsole.rb +32 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/menu.rb +466 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/misc.rb +598 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/reset.rb +120 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/run.rb +44 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/show.rb +106 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb +491 -0
- data/lib/studium/lectures/show_lectures_on_the_commandline/sorted_individual_curricula.rb +117 -0
- data/lib/studium/logging/README.md +2 -0
- data/lib/studium/logging/ensure_that_the_log_directory_exists.rb +47 -0
- data/lib/studium/logging/html_log_directory.rb +35 -0
- data/lib/studium/logging/log_directory.rb +100 -0
- data/lib/studium/logging/store_last_question_asked_into_file.rb +138 -0
- data/lib/studium/misc/return_remote_homepage_of_this_lecture.rb +8661 -0
- data/lib/studium/misc/return_remote_moodle_link_of_this_lecture.rb +1343 -0
- data/lib/studium/parsers/README.md +2 -0
- data/lib/studium/parsers/custom_exam_results_parser.rb +208 -0
- data/lib/studium/parsers/parse_lva_dates.rb +190 -0
- data/lib/studium/pdf/README.md +2 -0
- data/lib/studium/pdf/create_pdf_file_for_this_exam_topic.rb +277 -0
- data/lib/studium/project/project.rb +80 -0
- data/lib/studium/requires/common_popular_requires.rb +37 -0
- data/lib/studium/requires/commonly_used_requires.rb +13 -0
- data/lib/studium/requires/require_class_exams_solved.rb +7 -0
- data/lib/studium/requires/require_ects_scripts.rb +25 -0
- data/lib/studium/requires/require_encoding.rb +7 -0
- data/lib/studium/requires/require_the_exam_scripts.rb +37 -0
- data/lib/studium/requires/require_the_studium_constants.rb +14 -0
- data/lib/studium/requires/require_the_studium_project.rb +47 -0
- data/lib/studium/requires/require_the_utility_scripts.rb +26 -0
- data/lib/studium/requires/require_toplevel_methods.rb +26 -0
- data/lib/studium/requires/require_upcoming_exams.rb +7 -0
- data/lib/studium/requires/require_yaml.rb +7 -0
- data/lib/studium/requires/with_GUI.rb +12 -0
- data/lib/studium/requires/www_mode.rb +17 -0
- data/lib/studium/sinatra/app.rb +225 -0
- data/lib/studium/sinatra/misc.rb +111 -0
- data/lib/studium/statistics/README.md +4 -0
- data/lib/studium/statistics/best_exam_months.rb +81 -0
- data/lib/studium/statistics/curriculum_comparer.rb +344 -0
- data/lib/studium/statistics/determine_exam_statistics_from_this_file.rb +140 -0
- data/lib/studium/statistics/max_stats.rb +171 -0
- data/lib/studium/statistics/report_how_many_ects_points_per_curriculum_were_completed.rb +172 -0
- data/lib/studium/statistics/report_how_many_exam_questions_were_answered.rb +478 -0
- data/lib/studium/statistics/show_exam_statistics.rb +60 -0
- data/lib/studium/statistics/top_stats.rb +122 -0
- data/lib/studium/steop/README.md +4 -0
- data/lib/studium/steop/show_all_steop_lectures.rb +101 -0
- data/lib/studium/steop/steop_lectures_in_this_curriculum.rb +291 -0
- data/lib/studium/steop/steop_lva_dates.rb +102 -0
- data/lib/studium/toplevel_methods/all_passed_exams.rb +35 -0
- data/lib/studium/toplevel_methods/already_solved_this_lecture.rb +98 -0
- data/lib/studium/toplevel_methods/available_curricula.rb +71 -0
- data/lib/studium/toplevel_methods/available_topics.rb +145 -0
- data/lib/studium/toplevel_methods/average_grade.rb +141 -0
- data/lib/studium/toplevel_methods/calculate_pr/303/274fungsimmanente_lectures_from_this_file.rb +55 -0
- data/lib/studium/toplevel_methods/cd.rb +25 -0
- data/lib/studium/toplevel_methods/cd_stud.rb +134 -0
- data/lib/studium/toplevel_methods/copy_the_last_backup_of_file_lecture_information.rb +27 -0
- data/lib/studium/toplevel_methods/determine_local_directory_of_this_lecture.rb +72 -0
- data/lib/studium/toplevel_methods/does_this_course_require_mandatory_presence.rb +44 -0
- data/lib/studium/toplevel_methods/download.rb +157 -0
- data/lib/studium/toplevel_methods/e.rb +16 -0
- data/lib/studium/toplevel_methods/ects_from_lectures.rb +251 -0
- data/lib/studium/toplevel_methods/editor.rb +64 -0
- data/lib/studium/toplevel_methods/esystem.rb +22 -0
- data/lib/studium/toplevel_methods/exams_dataset.rb +45 -0
- data/lib/studium/toplevel_methods/filter_away_invalid_questions.rb +77 -0
- data/lib/studium/toplevel_methods/find_exam_topic_and_exam_title.rb +2771 -0
- data/lib/studium/toplevel_methods/from_curriculum_id_to_university.rb +47 -0
- data/lib/studium/toplevel_methods/frozen.rb +32 -0
- data/lib/studium/toplevel_methods/handle_archive_of_the_exam_questions.rb +136 -0
- data/lib/studium/toplevel_methods/has_a_bachelor_or_master_curriculum.rb +84 -0
- data/lib/studium/toplevel_methods/has_this_lecture_been_already_passed_but_the_id_was_changed_lateron.rb +41 -0
- data/lib/studium/toplevel_methods/has_this_module_been_completed.rb +206 -0
- data/lib/studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb +32 -0
- data/lib/studium/toplevel_methods/is_on_roebe.rb +26 -0
- data/lib/studium/toplevel_methods/is_this_exam_topic_included.rb +46 -0
- data/lib/studium/toplevel_methods/is_this_homepage_registered.rb +31 -0
- data/lib/studium/toplevel_methods/is_this_lecture_a_practical_course.rb +100 -0
- data/lib/studium/toplevel_methods/is_this_lecture_part_of_the_vector_curriculum.rb +110 -0
- data/lib/studium/toplevel_methods/is_this_lecture_registered_in_upcoming_exams.rb +43 -0
- data/lib/studium/toplevel_methods/lecture_information.rb +101 -0
- data/lib/studium/toplevel_methods/lectures_without_attribution_to_any_curriculum.rb +42 -0
- data/lib/studium/toplevel_methods/lva_numbers.rb +339 -0
- data/lib/studium/toplevel_methods/main_dataset.rb +73 -0
- data/lib/studium/toplevel_methods/map_curriculum_number_to_curriculum_name.rb +97 -0
- data/lib/studium/toplevel_methods/methods_related_to_curricula.rb +47 -0
- data/lib/studium/toplevel_methods/methods_related_to_files.rb +197 -0
- data/lib/studium/toplevel_methods/mkdir.rb +25 -0
- data/lib/studium/toplevel_methods/n_questions_available.rb +128 -0
- data/lib/studium/toplevel_methods/n_topics_available.rb +63 -0
- data/lib/studium/toplevel_methods/name_of_this_curriculum.rb +38 -0
- data/lib/studium/toplevel_methods/names_of_all_solved_exams.rb +71 -0
- data/lib/studium/toplevel_methods/note_down_the_start_time_and_how_many_exams_have_been_already_solved.rb +70 -0
- data/lib/studium/toplevel_methods/opnn.rb +25 -0
- data/lib/studium/toplevel_methods/passed_this_exam_on.rb +105 -0
- data/lib/studium/toplevel_methods/pristine.rb +69 -0
- data/lib/studium/toplevel_methods/read_dataset_from_a_curriculum_file.rb +133 -0
- data/lib/studium/toplevel_methods/read_delay_between_questions_from_file.rb +34 -0
- data/lib/studium/toplevel_methods/regexes.rb +90 -0
- data/lib/studium/toplevel_methods/registered_for_this_exam.rb +62 -0
- data/lib/studium/toplevel_methods/remote_url.rb +57 -0
- data/lib/studium/toplevel_methods/remove_comments.rb +26 -0
- data/lib/studium/toplevel_methods/remove_exam_topics_that_were_already_answered.rb +27 -0
- data/lib/studium/toplevel_methods/remove_tags.rb +26 -0
- data/lib/studium/toplevel_methods/report.rb +143 -0
- data/lib/studium/toplevel_methods/report_all_lectures_matching_this_lecture_type.rb +45 -0
- data/lib/studium/toplevel_methods/report_attributed_lectures_to_universities.rb +30 -0
- data/lib/studium/toplevel_methods/report_n_ects_per_university.rb +63 -0
- data/lib/studium/toplevel_methods/report_n_entries_in_the_file_lecture_information.rb +36 -0
- data/lib/studium/toplevel_methods/report_nquestions_of.rb +96 -0
- data/lib/studium/toplevel_methods/report_solved_topics.rb +56 -0
- data/lib/studium/toplevel_methods/return_all_exams_on_this_day.rb +66 -0
- data/lib/studium/toplevel_methods/return_curriculum_of_this_lva_number.rb +82 -0
- data/lib/studium/toplevel_methods/return_dataset_for_this_exam_topic.rb +41 -0
- data/lib/studium/toplevel_methods/return_dataset_from_this_curriculum_file.rb +150 -0
- data/lib/studium/toplevel_methods/return_directory_for.rb +66 -0
- data/lib/studium/toplevel_methods/return_div_timetable_of_upcoming_exams.rb +489 -0
- data/lib/studium/toplevel_methods/return_ects_from_this_lecture_stored_in_the_file_lecture_information.rb +197 -0
- data/lib/studium/toplevel_methods/return_hash_of_already_solved_lectures.rb +41 -0
- data/lib/studium/toplevel_methods/return_local_path_of_this_pwdstud.rb +59 -0
- data/lib/studium/toplevel_methods/return_lva_number_of_this_lecture.rb +72 -0
- data/lib/studium/toplevel_methods/return_n_percent_solved_from_this_topic.rb +75 -0
- data/lib/studium/toplevel_methods/return_n_questions_were_answered_for_this_topic.rb +37 -0
- data/lib/studium/toplevel_methods/return_proper_university_image.rb +80 -0
- data/lib/studium/toplevel_methods/return_question_answer_string_from_this_topic.rb +56 -0
- data/lib/studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb +126 -0
- data/lib/studium/toplevel_methods/return_theme_of_the_next_upcoming_exam.rb +38 -0
- data/lib/studium/toplevel_methods/return_this_curriculum_as_a_string.rb +26 -0
- data/lib/studium/toplevel_methods/return_title_from_this_curriculum_file.rb +91 -0
- data/lib/studium/toplevel_methods/rinstall2.rb +34 -0
- data/lib/studium/toplevel_methods/rti_conflict.rb +29 -0
- data/lib/studium/toplevel_methods/runmode.rb +86 -0
- data/lib/studium/toplevel_methods/sanitize_this_theme_topic.rb +128 -0
- data/lib/studium/toplevel_methods/sanitized_dataset_from_file_passed_exams_per_month.rb +52 -0
- data/lib/studium/toplevel_methods/save_all_registered_upcoming_exams.rb +62 -0
- data/lib/studium/toplevel_methods/save_file.rb +81 -0
- data/lib/studium/toplevel_methods/save_this_delay_between_questions_and_answers.rb +43 -0
- data/lib/studium/toplevel_methods/set_last_file_for_exam_questions.rb +64 -0
- data/lib/studium/toplevel_methods/set_this_cd_alias_to.rb +86 -0
- data/lib/studium/toplevel_methods/show_passed_ects_in_the_individual_bachelor_and_master_curricula.rb +81 -0
- data/lib/studium/toplevel_methods/show_passed_exams_having_this_grade.rb +27 -0
- data/lib/studium/toplevel_methods/spacer.rb +18 -0
- data/lib/studium/toplevel_methods/time.rb +220 -0
- data/lib/studium/toplevel_methods/total_ects_points_passed.rb +72 -0
- data/lib/studium/toplevel_methods/try_to_guess_the_most_likely_lva_id.rb +57 -0
- data/lib/studium/toplevel_methods/try_to_return_the_expanded_name_of_this_lecture.rb +63 -0
- data/lib/studium/toplevel_methods/unfinished.rb +51 -0
- data/lib/studium/toplevel_methods/url.rb +74 -0
- data/lib/studium/toplevel_methods/verbose_truth.rb +21 -0
- data/lib/studium/toplevel_methods/when_was_this_lecture_passed.rb +53 -0
- data/lib/studium/toplevel_methods/yes_or_no_ja_oder_nein.rb +33 -0
- data/lib/studium/tu_vienna/README.md +6 -0
- data/lib/studium/tu_vienna/tu_ferien.rb +38 -0
- data/lib/studium/tu_vienna/tu_/303/266ffnungszeiten.rb +29 -0
- data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_boku_lecture_to_curriculum.rb +389 -0
- data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_lecture_to_curriculum.rb +236 -0
- data/lib/studium/utility_scripts/attribute_lectures_to_university/attribute_lectures_to_university.rb +385 -0
- data/lib/studium/utility_scripts/audio_stats.rb +176 -0
- data/lib/studium/utility_scripts/auto_stud/auto_stud.rb +253 -0
- data/lib/studium/utility_scripts/auto_stud/constants.rb +23 -0
- data/lib/studium/utility_scripts/auto_stud/initialize.rb +23 -0
- data/lib/studium/utility_scripts/auto_stud/misc.rb +18 -0
- data/lib/studium/utility_scripts/autopurge_this_lecture_date.rb +101 -0
- data/lib/studium/utility_scripts/calendar/README.md +2 -0
- data/lib/studium/utility_scripts/calendar/calendar.rb +244 -0
- data/lib/studium/utility_scripts/calendar/misc.rb +35 -0
- data/lib/studium/utility_scripts/check_description_of_these_lectures.rb +224 -0
- data/lib/studium/utility_scripts/clean_up_lecture_date.rb +151 -0
- data/lib/studium/utility_scripts/current_lectures_belonging_to_both_bachelor_and_master_curriculum.rb +113 -0
- data/lib/studium/utility_scripts/currently_participating_in_these_lectures.rb +104 -0
- data/lib/studium/utility_scripts/display_lecture_url.rb +117 -0
- data/lib/studium/utility_scripts/expand_time_range.rb +422 -0
- data/lib/studium/utility_scripts/find_duplicate_lectures.rb +121 -0
- data/lib/studium/utility_scripts/finished_exams_at_this_university.rb +94 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/constants.rb +28 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/foreign_language_percentage.rb +142 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/help.rb +29 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/initialize.rb +25 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/menu.rb +141 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/report.rb +62 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/reset.rb +57 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/run.rb +19 -0
- data/lib/studium/utility_scripts/generate_spreadsheet.rb +349 -0
- data/lib/studium/utility_scripts/holidays.rb +143 -0
- data/lib/studium/utility_scripts/lecture_downloader.rb +115 -0
- data/lib/studium/utility_scripts/lectures_attributed_to_universities.rb +344 -0
- data/lib/studium/utility_scripts/lva_nummer.rb +440 -0
- data/lib/studium/utility_scripts/mandatory_lectures_in_this_month.rb +321 -0
- data/lib/studium/utility_scripts/name_of_this_lva_id.rb +110 -0
- data/lib/studium/utility_scripts/new_stud.rb +332 -0
- data/lib/studium/utility_scripts/next_week.rb +111 -0
- data/lib/studium/utility_scripts/passed_ects_per_year.rb +172 -0
- data/lib/studium/utility_scripts/passed_pr/303/274fungsimmanente_courses/passed_pr/303/274fungsimmanente_courses.rb +181 -0
- data/lib/studium/utility_scripts/prepare_individual_curriculum.rb +182 -0
- data/lib/studium/utility_scripts/priority.rb +126 -0
- data/lib/studium/utility_scripts/priority_points.rb +263 -0
- data/lib/studium/utility_scripts/publish_my_exams.rb +174 -0
- data/lib/studium/utility_scripts/regexes/README.md +2 -0
- data/lib/studium/utility_scripts/regexes/generate_regex.rb +278 -0
- data/lib/studium/utility_scripts/regexes/generate_regexes_for_the_available_moodle_links.rb +54 -0
- data/lib/studium/utility_scripts/regexes/generate_regexes_for_the_registered_lectures.rb +48 -0
- data/lib/studium/utility_scripts/report_outdated_timetable_entries.rb +148 -0
- data/lib/studium/utility_scripts/report_total_amount_of_questions_and_answers_for.rb +120 -0
- data/lib/studium/utility_scripts/report_whether_this_lecture_is_registered_in_the_file_lecture_information.rb +125 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/individual_resolve_practical_courses_date_conflicts.rb +257 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/resolve_practical_courses_date_conflicts.rb +273 -0
- data/lib/studium/utility_scripts/scrape_remote_university_url.rb +146 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_container.rb +142 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_schedule_creator.rb +381 -0
- data/lib/studium/utility_scripts/semesterplaner.rb +289 -0
- data/lib/studium/utility_scripts/show_all_lectures.rb +403 -0
- data/lib/studium/utility_scripts/show_all_passed_master_lectures.rb +127 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/constants.rb +56 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/do_report_the_upcoming_exams.rb +60 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/help.rb +49 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/initialize.rb +28 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/menu.rb +54 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/misc.rb +214 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/report.rb +118 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/reset.rb +80 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/run.rb +22 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb +651 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/constants.rb +28 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/menu.rb +62 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/reset.rb +36 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/run.rb +35 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/show_descriptions_of_lectures_belonging_to_this_module.rb +145 -0
- data/lib/studium/utility_scripts/show_lecturers/show_lecturers.rb +145 -0
- data/lib/studium/utility_scripts/show_lectures/constants.rb +16 -0
- data/lib/studium/utility_scripts/show_lectures/help.rb +34 -0
- data/lib/studium/utility_scripts/show_lectures/initialize.rb +23 -0
- data/lib/studium/utility_scripts/show_lectures/menu.rb +106 -0
- data/lib/studium/utility_scripts/show_lectures/misc.rb +582 -0
- data/lib/studium/utility_scripts/show_lectures/reset.rb +92 -0
- data/lib/studium/utility_scripts/show_lectures/run.rb +27 -0
- data/lib/studium/utility_scripts/show_lectures/show_lectures.rb +48 -0
- data/lib/studium/utility_scripts/show_lectures_fitting_to_this_language.rb +129 -0
- data/lib/studium/utility_scripts/show_lectures_fitting_to_this_theme.rb +100 -0
- data/lib/studium/utility_scripts/show_lectures_on_this_day.rb +154 -0
- data/lib/studium/utility_scripts/show_lva_dates_of_this_lecture.rb +177 -0
- data/lib/studium/utility_scripts/show_outdated_lva_dates.rb +218 -0
- data/lib/studium/utility_scripts/show_solved_english_lectures.rb +139 -0
- data/lib/studium/utility_scripts/show_the_associated_lectures_for_the_individual_curriculum.rb +285 -0
- data/lib/studium/utility_scripts/studienkennzahl.rb +109 -0
- data/lib/studium/utility_scripts/studium_skeleton.rb +220 -0
- data/lib/studium/utility_scripts/stundenplan.rb +603 -0
- data/lib/studium/utility_scripts/sync_studium_relevant_entries_one_level_downwards.rb +221 -0
- data/lib/studium/utility_scripts/ufind.rb +101 -0
- data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/constants.rb +31 -0
- data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/run.rb +20 -0
- data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/upcoming_mandatory_presence_courses.rb +179 -0
- data/lib/studium/utility_scripts/vorbesprechungen.rb +293 -0
- data/lib/studium/utility_scripts/week_parser/constants.rb +28 -0
- data/lib/studium/utility_scripts/week_parser/help.rb +32 -0
- data/lib/studium/utility_scripts/week_parser/menu.rb +56 -0
- data/lib/studium/utility_scripts/week_parser/misc.rb +51 -0
- data/lib/studium/utility_scripts/week_parser/reset.rb +55 -0
- data/lib/studium/utility_scripts/week_parser/run.rb +18 -0
- data/lib/studium/utility_scripts/week_parser/show.rb +242 -0
- data/lib/studium/utility_scripts/week_parser/week_parser.rb +362 -0
- data/lib/studium/utility_scripts/weekday_parser.rb +159 -0
- data/lib/studium/utility_scripts/weekly_schedule.rb +209 -0
- data/lib/studium/utility_scripts/wochenplanung.rb +278 -0
- data/lib/studium/version/version.rb +46 -0
- data/lib/studium/www/curricula_displayer.cgi +170 -0
- data/lib/studium/www/curriculum_displayer.rb +162 -0
- data/lib/studium/www/exams.cgi +50 -0
- data/lib/studium/www/statistics.cgi +55 -0
- data/lib/studium/yaml/allowed_themes_for_exams.yml +307 -0
- data/lib/studium/yaml/array_allowed_entries_for_the_file_lecture_information.yml +68 -0
- data/lib/studium/yaml/backlog_of_exams.yml +35 -0
- data/lib/studium/yaml/current_exams.yml +19 -0
- data/lib/studium/yaml/curricula.yml +530 -0
- data/lib/studium/yaml/curricula/README.md +3 -0
- data/lib/studium/yaml/curricula/bachelor_agrarwissenschaften_033255.yml +130 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_basisblock_033630.yml +65 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_botanik_033630.yml +84 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_ecology_033630.yml +74 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_mikrobiologie_und_genetik_033630.yml +120 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_molekulare_biologie_033630.yml +104 -0
- data/lib/studium/yaml/curricula/bachelor_biologie_zoologie_033630.yml +87 -0
- data/lib/studium/yaml/curricula/bachelor_chemie_033662.yml +164 -0
- data/lib/studium/yaml/curricula/bachelor_dummy_curriculum.yml +135 -0
- data/lib/studium/yaml/curricula/bachelor_elektrotechnik_und_informationstechnik_033235.yml +13 -0
- data/lib/studium/yaml/curricula/bachelor_forstwirtschaft_033225.yml +105 -0
- data/lib/studium/yaml/curricula/bachelor_informatik_033521.yml +130 -0
- data/lib/studium/yaml/curricula/bachelor_informatik_und_molekulare_biologie.yml +1144 -0
- data/lib/studium/yaml/curricula/bachelor_ktww_033231.yml +84 -0
- data/lib/studium/yaml/curricula/bachelor_lmbt_033217.yml +108 -0
- data/lib/studium/yaml/curricula/bachelor_medizinische_informatik_033533.yml +200 -0
- data/lib/studium/yaml/curricula/bachelor_molekularbiologie_033665.yml +93 -0
- data/lib/studium/yaml/curricula/bachelor_nutrition_science_033638.yml +117 -0
- data/lib/studium/yaml/curricula/bachelor_pharmazie_033305.yml +170 -0
- data/lib/studium/yaml/curricula/bachelor_technische_chemie_033290.yml +129 -0
- data/lib/studium/yaml/curricula/bachelor_technische_informatik_033535.yml +23 -0
- data/lib/studium/yaml/curricula/bachelor_ubrm_033227.yml +140 -0
- data/lib/studium/yaml/curricula/bachelor_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +1157 -0
- data/lib/studium/yaml/curricula/bachelor_verfahrenstechnik_033273.yml +167 -0
- data/lib/studium/yaml/curricula/bachelor_wirtschaftsinformatik_033526.yml +29 -0
- data/lib/studium/yaml/curricula/master_bioinformatics_and_molecular_biotechnology_including_aspects_from_molecular_medicine.yml +438 -0
- data/lib/studium/yaml/curricula/master_bioinformatik_066875.yml +76 -0
- data/lib/studium/yaml/curricula/master_biologie_molekulare_mikrobiologie_mikrobielle_oekologie_und_immunbiologie_066830.yml +78 -0
- data/lib/studium/yaml/curricula/master_biologische_chemie_066863.yml +61 -0
- data/lib/studium/yaml/curricula/master_dummy_curriculum.yml +137 -0
- data/lib/studium/yaml/curricula/master_food_science_and_plant_biotechnology.yml +30 -0
- data/lib/studium/yaml/curricula/master_genetik_und_entwicklungsbiologie_066877.yml +90 -0
- data/lib/studium/yaml/curricula/master_lmbt_066418.yml +65 -0
- data/lib/studium/yaml/curricula/master_molekulare_biologie_066834.yml +142 -0
- data/lib/studium/yaml/curricula/master_pharmazie_066605.yml +170 -0
- data/lib/studium/yaml/curricula/master_technische_chemie_066490.yml +123 -0
- data/lib/studium/yaml/curricula/master_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +741 -0
- data/lib/studium/yaml/custom_colours.yml +21 -0
- data/lib/studium/yaml/daily_questions_solved.yml +789 -0
- data/lib/studium/yaml/default_delay.yml +4 -0
- data/lib/studium/yaml/default_encoding.yml +1 -0
- data/lib/studium/yaml/directory_to_the_exam_topics.yml +0 -0
- data/lib/studium/yaml/editor.yml +1 -0
- data/lib/studium/yaml/file_for_exam_questions.yml +1 -0
- data/lib/studium/yaml/german/README.md +2 -0
- data/lib/studium/yaml/german/german_to_english_month_names.yml +16 -0
- data/lib/studium/yaml/grouped_themes.yml +187 -0
- data/lib/studium/yaml/holidays.yml +176 -0
- data/lib/studium/yaml/important_exams.yml +194 -0
- data/lib/studium/yaml/inscription_dates_of_universities.yml +58 -0
- data/lib/studium/yaml/lecture_aliases.yml +108 -0
- data/lib/studium/yaml/lecture_information.yml +47783 -0
- data/lib/studium/yaml/log_dir.yml +1 -0
- data/lib/studium/yaml/main_topic.yml +11 -0
- data/lib/studium/yaml/max_stats.yml +227 -0
- data/lib/studium/yaml/mitteilungsbl/303/244tter.yml +315 -0
- data/lib/studium/yaml/n_total_questions.yml +1 -0
- data/lib/studium/yaml/participating_in_these_courses.yml +50 -0
- data/lib/studium/yaml/rename_konsole_tab.yml +1 -0
- data/lib/studium/yaml/show_topic.yml +1 -0
- data/lib/studium/yaml/statistics.yml +57 -0
- data/lib/studium/yaml/use_colours.yml +1 -0
- data/studium.gemspec +79 -0
- data/test/testing_studium.rb +244 -0
- data/test/testing_time_component.rb +29 -0
- metadata +1079 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
require 'studium/exams/exams_per_month/constants.rb'
|
6
|
+
require 'studium/exams/exams_per_month/colours.rb'
|
7
|
+
require 'studium/exams/exams_per_month/menu.rb'
|
8
|
+
require 'studium/exams/exams_per_month/help.rb'
|
@@ -0,0 +1,115 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
module Studium
|
6
|
+
|
7
|
+
class ExamsPerMonth < Base # === Studium::ExamsPerMonth
|
8
|
+
|
9
|
+
# ========================================================================= #
|
10
|
+
# === reset (reset tag)
|
11
|
+
# ========================================================================= #
|
12
|
+
def reset
|
13
|
+
super() # Initialize the instance variables of the parent-class reset() method.
|
14
|
+
do_show_ects_points
|
15
|
+
# ======================================================================= #
|
16
|
+
# === @namespace
|
17
|
+
# ======================================================================= #
|
18
|
+
@namespace = NAMESPACE
|
19
|
+
# ======================================================================= #
|
20
|
+
# === @shall_we_report
|
21
|
+
# ======================================================================= #
|
22
|
+
@shall_we_report = true # Whether to output anything or not.
|
23
|
+
# ======================================================================= #
|
24
|
+
# === @show_only_grade_for
|
25
|
+
# ======================================================================= #
|
26
|
+
@show_only_grade_for = nil # Set the initial state.
|
27
|
+
# ======================================================================= #
|
28
|
+
# === @total_grade
|
29
|
+
# ======================================================================= #
|
30
|
+
@total_grade = 0
|
31
|
+
# ======================================================================= #
|
32
|
+
# === @n_exams_in_total_passed
|
33
|
+
# ======================================================================= #
|
34
|
+
@n_exams_in_total_passed = 0
|
35
|
+
# ======================================================================= #
|
36
|
+
# === @n_ects_points_belonging_to_mandatory_presence_courses
|
37
|
+
#
|
38
|
+
# The next variable keeps track over how many ECTS points belong to
|
39
|
+
# a "prüfungsimmanente" lecture, aka one requiring mandatory presence.
|
40
|
+
# ======================================================================= #
|
41
|
+
@n_ects_points_belonging_to_mandatory_presence_courses = 0
|
42
|
+
# ======================================================================= #
|
43
|
+
# === @total_ects_points
|
44
|
+
# ======================================================================= #
|
45
|
+
@total_ects_points = 0 # The total amount of ECTS points per given month.
|
46
|
+
# ======================================================================= #
|
47
|
+
# === @n_ects_points
|
48
|
+
# ======================================================================= #
|
49
|
+
@n_ects_points = 0 # How many ECTS points this exam has.
|
50
|
+
# ======================================================================= #
|
51
|
+
# === @n_ects_points_in_total
|
52
|
+
# ======================================================================= #
|
53
|
+
@n_ects_points_in_total = 0 # The total amount of ECTS points altogether.
|
54
|
+
# ======================================================================= #
|
55
|
+
# === @n_hours_passed_in_total
|
56
|
+
# ======================================================================= #
|
57
|
+
@n_hours_passed_in_total = 0 # How many hours of exams did we pass.
|
58
|
+
# ======================================================================= #
|
59
|
+
# === @compare_these_numbers
|
60
|
+
# ======================================================================= #
|
61
|
+
@compare_these_numbers = nil
|
62
|
+
# ======================================================================= #
|
63
|
+
# === @show_only_this_year
|
64
|
+
# ======================================================================= #
|
65
|
+
@show_only_this_year = nil
|
66
|
+
# ======================================================================= #
|
67
|
+
# === @use_colours
|
68
|
+
# ======================================================================= #
|
69
|
+
@use_colours = true # Whether to use colours or not.
|
70
|
+
# ======================================================================= #
|
71
|
+
# === @show_average_ects_passed_per_exam
|
72
|
+
# ======================================================================= #
|
73
|
+
@show_average_ects_passed_per_exam = true
|
74
|
+
# ======================================================================= #
|
75
|
+
# === @show_yearly_average_grades
|
76
|
+
# ======================================================================= #
|
77
|
+
@show_yearly_average_grades = false
|
78
|
+
# ======================================================================= #
|
79
|
+
# === @show_n_best_months
|
80
|
+
# ======================================================================= #
|
81
|
+
@show_n_best_months = SHOW_N_BEST_MONTHS
|
82
|
+
# ======================================================================= #
|
83
|
+
# === @dataset_from_the_file_lecture_information
|
84
|
+
# ======================================================================= #
|
85
|
+
@dataset_from_the_file_lecture_information =
|
86
|
+
return_dataset_from_the_file_lecture_information
|
87
|
+
set_current_year(Time.now.strftime('%Y').to_i)
|
88
|
+
set_last_year
|
89
|
+
reset_main_hash
|
90
|
+
obtain_dataset
|
91
|
+
end
|
92
|
+
|
93
|
+
# ========================================================================= #
|
94
|
+
# === reset_main_hash
|
95
|
+
# ========================================================================= #
|
96
|
+
def reset_main_hash
|
97
|
+
@hash = {}
|
98
|
+
@hash.default = []
|
99
|
+
end
|
100
|
+
|
101
|
+
# ========================================================================= #
|
102
|
+
# === reset_n_hours
|
103
|
+
# ========================================================================= #
|
104
|
+
def reset_n_hours
|
105
|
+
@n_hours_passed_in_total = 0
|
106
|
+
end; alias reset_hours reset_n_hours # === reset_hours
|
107
|
+
|
108
|
+
# ========================================================================= #
|
109
|
+
# === reset_ects_points
|
110
|
+
# ========================================================================= #
|
111
|
+
def reset_ects_points
|
112
|
+
@n_ects_points = 0
|
113
|
+
end; alias reset_ects reset_ects_points # === reset_ects
|
114
|
+
|
115
|
+
end; end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
module Studium
|
6
|
+
|
7
|
+
class ExamsPerMonth < Base # === Studium::ExamsPerMonth
|
8
|
+
|
9
|
+
# ========================================================================= #
|
10
|
+
# === run
|
11
|
+
# ========================================================================= #
|
12
|
+
def run
|
13
|
+
sanitize_dataset
|
14
|
+
check_against_menu
|
15
|
+
report if @shall_we_report
|
16
|
+
end
|
17
|
+
|
18
|
+
end; end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'studium/exams_per_month/sanitize.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
require 'studium/base/base.rb'
|
8
|
+
|
9
|
+
module Studium
|
10
|
+
|
11
|
+
class ExamsPerMonth < Base # === Studium::ExamsPerMonth
|
12
|
+
|
13
|
+
# ========================================================================= #
|
14
|
+
# === sanitize_dataset
|
15
|
+
#
|
16
|
+
# Purpose of this method is to give us a sorted hash with the specific
|
17
|
+
# entries. In order for this to work, simply pass in your dataset into
|
18
|
+
# this method. By default, we will use the dataset? object, which
|
19
|
+
# is essentially just the @dataset instance variable.
|
20
|
+
#
|
21
|
+
# The initial dataset should have 6 entries, thus 5 occurrences of '|'.
|
22
|
+
#
|
23
|
+
# Example for such a dataset/line:
|
24
|
+
#
|
25
|
+
# "06.07.2018 | 1.0 | 1.0 | 1 | UniWien | M | VO | 270073 | 2018S | Nukleinsäureanalytik-Genomics"
|
26
|
+
#
|
27
|
+
# ========================================================================= #
|
28
|
+
def sanitize_dataset(
|
29
|
+
i = dataset?,
|
30
|
+
modify_time_entry = true
|
31
|
+
)
|
32
|
+
@n_ects_points_belonging_to_mandatory_presence_courses = 0 # Reset it here.
|
33
|
+
case modify_time_entry
|
34
|
+
when :leave_time_entry_alone
|
35
|
+
modify_time_entry = false
|
36
|
+
end
|
37
|
+
# ======================================================================= #
|
38
|
+
# Re-assign the @dataset here.
|
39
|
+
# ======================================================================= #
|
40
|
+
@dataset = i.map {|entry|
|
41
|
+
if entry.is_a? Array
|
42
|
+
splitted = entry
|
43
|
+
else
|
44
|
+
# =================================================================== #
|
45
|
+
# Ensure that the encoding is proper here.
|
46
|
+
# =================================================================== #
|
47
|
+
encoding_to_use = ::Studium.encoding?
|
48
|
+
unless entry.encoding.to_s.include? encoding_to_use
|
49
|
+
entry = entry.force_encoding(encoding_to_use)
|
50
|
+
end
|
51
|
+
splitted = entry.split(' | ') # .reverse
|
52
|
+
end
|
53
|
+
if splitted.size <= 2 # Assume this to be an invalid entry.
|
54
|
+
splitted = nil
|
55
|
+
else
|
56
|
+
# =================================================================== #
|
57
|
+
# Modify the time-entry which is the first entry.
|
58
|
+
# We don't need the day, only the specific month. But this is not
|
59
|
+
# always wanted, so we also must honour an option passed into this
|
60
|
+
# method.
|
61
|
+
# =================================================================== #
|
62
|
+
if modify_time_entry
|
63
|
+
formatted_time = splitted[0].split('.')[1..-1].join('.') # This entry is now something such as "10.2001"
|
64
|
+
splitted[0] = formatted_time
|
65
|
+
end
|
66
|
+
# =================================================================== #
|
67
|
+
# === Compare only specific years
|
68
|
+
#
|
69
|
+
# If the user wants to compare only specific years, we enter
|
70
|
+
# the next section.
|
71
|
+
# =================================================================== #
|
72
|
+
if @compare_these_numbers and formatted_time
|
73
|
+
the_year = formatted_time.split('.').last.to_i
|
74
|
+
unless @compare_these_numbers.include? the_year
|
75
|
+
splitted = nil
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
splitted
|
80
|
+
}
|
81
|
+
@dataset.compact! # Weed out nil-values.
|
82
|
+
@n_exams_passed = 0
|
83
|
+
# ======================================================================= #
|
84
|
+
# Next we populate our hash, which is used to report stuff.
|
85
|
+
#
|
86
|
+
# We will store the amount of hours passed, the amount of ECTS points
|
87
|
+
# that were achieved, and count up for the amount of exams that were
|
88
|
+
# passed.
|
89
|
+
# ======================================================================= #
|
90
|
+
@dataset.each {|entry|
|
91
|
+
entry.map!(&:strip)
|
92
|
+
month_and_year = entry[0] # Month and Year is the first entry.
|
93
|
+
n_hours = entry[1].to_f # n hours is the second entry.
|
94
|
+
n_ects_points = entry[2].to_f # n ects points is the third entry.
|
95
|
+
# ===================================================================== #
|
96
|
+
# The grade is a bit problematic. It has to be kept as an Array.
|
97
|
+
# ===================================================================== #
|
98
|
+
grade = entry[3] # The grade, the fourth entry. Can be 1,2,3,4,5 or '+'.
|
99
|
+
university = entry[4].strip.downcase # The university at fifth position.
|
100
|
+
_curriculum_type = entry[5].strip # The curriculum type such as Bachelor or Master. Currently not used here.
|
101
|
+
lecture_type = entry[6].strip # The lecture type such as VO, UE, VU, SE.
|
102
|
+
if is_a_prüfungsimmanent_course?(lecture_type)
|
103
|
+
@n_ects_points_belonging_to_mandatory_presence_courses += n_ects_points
|
104
|
+
end
|
105
|
+
@n_exams_passed += 1
|
106
|
+
# ===================================================================== #
|
107
|
+
# === Put the dataset into the @hash instance variable next
|
108
|
+
# ===================================================================== #
|
109
|
+
if @hash.has_key? month_and_year
|
110
|
+
# =================================================================== #
|
111
|
+
# In this case, add it because we already did initialize it.
|
112
|
+
# =================================================================== #
|
113
|
+
new_n_hours = @hash[month_and_year][0]+n_hours
|
114
|
+
new_n_ects_points = @hash[month_and_year][1]+n_ects_points
|
115
|
+
array_grade = @hash[month_and_year][2] << grade
|
116
|
+
@hash[month_and_year] = [
|
117
|
+
new_n_hours, new_n_ects_points, array_grade, university, @n_exams_passed
|
118
|
+
]
|
119
|
+
else # Else simply append it, as it is a new month.
|
120
|
+
@n_exams_passed = 0 # And reset it here again.
|
121
|
+
@n_exams_passed += 1 # Must be at least one.
|
122
|
+
@hash[month_and_year] = [
|
123
|
+
n_hours, n_ects_points, [grade], university, @n_exams_passed
|
124
|
+
]
|
125
|
+
end
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
end; end
|
@@ -0,0 +1,1281 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'studium/exams_per_month/show_and_report.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
module Studium
|
8
|
+
|
9
|
+
class ExamsPerMonth < Base # === Studium::ExamsPerMonth
|
10
|
+
|
11
|
+
require 'studium/ects/n_ects_points_in_mandatory_presence_courses.rb'
|
12
|
+
require 'studium/ects/ects_per_university.rb'
|
13
|
+
|
14
|
+
# ========================================================================= #
|
15
|
+
# === calculate_the_average_amount_per_passed_exam
|
16
|
+
# ========================================================================= #
|
17
|
+
def calculate_the_average_amount_per_passed_exam
|
18
|
+
ects_per_exams_passed = # This is: total ects / n_exams
|
19
|
+
(
|
20
|
+
@n_ects_points_in_total.to_f / @n_exams_in_total_passed.to_f
|
21
|
+
).round(2)
|
22
|
+
return ects_per_exams_passed
|
23
|
+
end
|
24
|
+
|
25
|
+
# ========================================================================= #
|
26
|
+
# === show_half_split_exams_per_year
|
27
|
+
#
|
28
|
+
# This method can be used to show how many exams were passed, per
|
29
|
+
# year, in each half of that year.
|
30
|
+
#
|
31
|
+
# Invocation example:
|
32
|
+
#
|
33
|
+
# emo --half-split
|
34
|
+
#
|
35
|
+
# ========================================================================= #
|
36
|
+
def show_half_split_exams_per_year
|
37
|
+
array_early_months = %w( 1 2 3 4 5 6 ).map(&:to_i)
|
38
|
+
array_late_months = %w( 7 8 9 10 11 12 ).map(&:to_i)
|
39
|
+
hash = {}
|
40
|
+
raw_dataset?.each {|this_line|
|
41
|
+
next unless this_line.include? '|'
|
42
|
+
splitted = this_line.strip.split('|').map(&:strip)
|
43
|
+
first_element = splitted.first # e. g. '25.11.1997'
|
44
|
+
n_ects = splitted[2].to_f
|
45
|
+
year = first_element.split('.').last
|
46
|
+
hash[year] = {
|
47
|
+
:early_months => 0,
|
48
|
+
:late_months => 0
|
49
|
+
} unless hash.has_key? year
|
50
|
+
month = first_element.split('.')[1].to_i
|
51
|
+
if array_early_months.include? month
|
52
|
+
hash[year][:early_months] += n_ects
|
53
|
+
elsif array_late_months.include? month
|
54
|
+
hash[year][:late_months] += n_ects
|
55
|
+
end
|
56
|
+
}
|
57
|
+
# ======================================================================= #
|
58
|
+
# Next, we will display that Hash, but only if we have any ECTS
|
59
|
+
# points to report..
|
60
|
+
# ======================================================================= #
|
61
|
+
hash.each_pair {|year, value|
|
62
|
+
n_ljust = 28
|
63
|
+
first_half_ects_points = value[:early_months].to_f
|
64
|
+
second_half_ects_points = value[:late_months].to_f
|
65
|
+
unless ( (first_half_ects_points == 0) and (second_half_ects_points == 0) )
|
66
|
+
e slateblue(year+':')
|
67
|
+
e
|
68
|
+
if first_half_ects_points > 0
|
69
|
+
e (' Start of the year '+year+': ').ljust(n_ljust)+
|
70
|
+
orange(first_half_ects_points.to_s.rjust(4)+' ECTS points')
|
71
|
+
end
|
72
|
+
if second_half_ects_points > 0
|
73
|
+
e (' End of the year '+year+':').ljust(n_ljust)+
|
74
|
+
orange(second_half_ects_points.to_s.rjust(4)+' ECTS points')
|
75
|
+
end
|
76
|
+
e
|
77
|
+
end
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# ========================================================================= #
|
82
|
+
# === do_show_only_this_year_here
|
83
|
+
#
|
84
|
+
# Use this method if you only want to show a specific year, such as
|
85
|
+
# 2013 or 2017 and so forth.
|
86
|
+
# ========================================================================= #
|
87
|
+
def do_show_only_this_year_here(i)
|
88
|
+
@show_only_this_year = i # This variable may also contain a '-' character.
|
89
|
+
# ======================================================================= #
|
90
|
+
# Next, select only these entries from the dataset that have
|
91
|
+
# a matching year entry.
|
92
|
+
# ======================================================================= #
|
93
|
+
_ = dataset?.select {|entry| # === emo --year=1997-2009
|
94
|
+
the_year = entry.first.strip.split('.').last.to_s
|
95
|
+
is_it_included = false
|
96
|
+
is_it_included = true if @show_only_this_year == the_year
|
97
|
+
# =================================================================== #
|
98
|
+
# === Range input
|
99
|
+
#
|
100
|
+
# First, handle '-' input given.
|
101
|
+
# =================================================================== #
|
102
|
+
if @show_only_this_year.include? '-'
|
103
|
+
# ================================================================= #
|
104
|
+
# Then we turn it into a range, in order to look whether the
|
105
|
+
# year is within that given Range.
|
106
|
+
# ================================================================= #
|
107
|
+
range = Range.new(*@show_only_this_year.split('-').map(&:to_i))
|
108
|
+
if range.include? the_year.to_i # Since we work with numbers past this point.
|
109
|
+
is_it_included = true
|
110
|
+
end
|
111
|
+
end
|
112
|
+
is_it_included
|
113
|
+
}
|
114
|
+
reset_main_hash # Empty @hash again.
|
115
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
116
|
+
end
|
117
|
+
|
118
|
+
# ========================================================================= #
|
119
|
+
# === show_only_exams_at_the_vetmed_uni
|
120
|
+
#
|
121
|
+
# Invoke this method like so:
|
122
|
+
# emo --vetmed
|
123
|
+
# ========================================================================= #
|
124
|
+
def show_only_exams_at_the_vetmed_uni
|
125
|
+
opnn; e 'Showing all exams passed at the Vetmed Uni.'
|
126
|
+
_ = dataset?.select {|entry|
|
127
|
+
name_of_university = entry[4]
|
128
|
+
(name_of_university.strip.downcase == 'vetmed')
|
129
|
+
}
|
130
|
+
reset_main_hash
|
131
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
132
|
+
end
|
133
|
+
|
134
|
+
# ========================================================================= #
|
135
|
+
# === show_numbered_exams
|
136
|
+
#
|
137
|
+
# This method will output the passed exams.
|
138
|
+
#
|
139
|
+
# To output this method, try this:
|
140
|
+
# emo --show-numbered-exams
|
141
|
+
# emo --reversed-nl
|
142
|
+
# ========================================================================= #
|
143
|
+
def show_numbered_exams(normal_or_reversed = :normal)
|
144
|
+
dataset = File.readlines(csv_file?).reject {|entry|
|
145
|
+
entry.start_with? '#'
|
146
|
+
}.reject {|entry|
|
147
|
+
entry.to_s.strip.empty?
|
148
|
+
}
|
149
|
+
size_of_the_dataset = dataset.size
|
150
|
+
e; dataset.each_with_index {|line, index|
|
151
|
+
index += 1
|
152
|
+
if normal_or_reversed == :reversed
|
153
|
+
index = (size_of_the_dataset - index)+1
|
154
|
+
end
|
155
|
+
e ' '+orange(index.to_s.rjust(4))+') '+simp(line.chomp)
|
156
|
+
}; e
|
157
|
+
end
|
158
|
+
|
159
|
+
# ========================================================================= #
|
160
|
+
# === show_only_exams_at_the_uniwien
|
161
|
+
#
|
162
|
+
# Invoke this method like so:
|
163
|
+
# emo --uniwien
|
164
|
+
# ========================================================================= #
|
165
|
+
def show_only_exams_at_the_uniwien
|
166
|
+
opnn; e 'Showing all exams passed at the UniWien.'
|
167
|
+
_ = dataset?.select {|entry|
|
168
|
+
name_of_university = entry[4]
|
169
|
+
(name_of_university.strip.downcase == 'uniwien')
|
170
|
+
}
|
171
|
+
reset_main_hash
|
172
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
173
|
+
end
|
174
|
+
|
175
|
+
# ========================================================================= #
|
176
|
+
# === show_only_exams_at_the_meduni
|
177
|
+
#
|
178
|
+
# Invoke this method like so:
|
179
|
+
# emo --meduni
|
180
|
+
# ========================================================================= #
|
181
|
+
def show_only_exams_at_the_meduni
|
182
|
+
opnn; e 'Showing all exams passed at the MedUni Wien.'
|
183
|
+
_ = dataset?.select {|entry|
|
184
|
+
name_of_university = entry[4]
|
185
|
+
(name_of_university.strip.downcase == 'meduni')
|
186
|
+
}
|
187
|
+
reset_main_hash
|
188
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
189
|
+
end
|
190
|
+
|
191
|
+
# ========================================================================= #
|
192
|
+
# === show_all_exams_from_this_month
|
193
|
+
#
|
194
|
+
# Use this method to show all exams from a given month only.
|
195
|
+
#
|
196
|
+
# We also support english names for the months, since as of April 2017.
|
197
|
+
#
|
198
|
+
# Usage example:
|
199
|
+
# emo --januar
|
200
|
+
# ========================================================================= #
|
201
|
+
def show_all_exams_from_this_month(i = 'januar')
|
202
|
+
i.delete!('-') if i.include? '-'
|
203
|
+
i.downcase!
|
204
|
+
# ======================================================================= #
|
205
|
+
# Next, sanitize the month.
|
206
|
+
# ======================================================================= #
|
207
|
+
case i # case tag
|
208
|
+
when 'januar','january'
|
209
|
+
i = '01'
|
210
|
+
when 'februar','february',/feb/
|
211
|
+
i = '02'
|
212
|
+
when 'märz','march'
|
213
|
+
i = '03'
|
214
|
+
when 'april'
|
215
|
+
i = '04'
|
216
|
+
when 'mai','may'
|
217
|
+
i = '05'
|
218
|
+
when 'juni','june'
|
219
|
+
i = '06'
|
220
|
+
when 'juli','july'
|
221
|
+
i = '07'
|
222
|
+
when 'august'
|
223
|
+
i = '08'
|
224
|
+
when 'september'
|
225
|
+
i = '09'
|
226
|
+
when 'oktober','october'
|
227
|
+
i = '10'
|
228
|
+
when 'november'
|
229
|
+
i = '11'
|
230
|
+
when 'dezember','december'
|
231
|
+
i = '12'
|
232
|
+
end
|
233
|
+
_ = dataset?.select {|inner_array|
|
234
|
+
month_and_year = inner_array.first
|
235
|
+
splitted = month_and_year.split('.')
|
236
|
+
month = splitted.first
|
237
|
+
month == i
|
238
|
+
}
|
239
|
+
reset_main_hash
|
240
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
241
|
+
end
|
242
|
+
|
243
|
+
# ========================================================================= #
|
244
|
+
# === show_only_practical_courses_that_were_passed_already
|
245
|
+
#
|
246
|
+
# Use this method if you wish to show only practical courses that
|
247
|
+
# were passed already.
|
248
|
+
#
|
249
|
+
# The currently acknowledged practical courses include UE, PR and LU.
|
250
|
+
#
|
251
|
+
# Invocation example:
|
252
|
+
# emo --übungen
|
253
|
+
# ========================================================================= #
|
254
|
+
def show_only_practical_courses_that_were_passed_already
|
255
|
+
@show_average_ects_passed_per_exam = false # This method won't report average amount of ECTS per exam.
|
256
|
+
_ = dataset?
|
257
|
+
_.select! {|entry|
|
258
|
+
type_of_lecture = entry[6].strip
|
259
|
+
type_of_lecture.include?('UE') or
|
260
|
+
type_of_lecture.include?('PR') or
|
261
|
+
type_of_lecture.include?('LU')
|
262
|
+
}
|
263
|
+
reset_main_hash
|
264
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
265
|
+
report_main_hash
|
266
|
+
end
|
267
|
+
|
268
|
+
# ========================================================================= #
|
269
|
+
# === show_exam_ects_points_passed_per_semester
|
270
|
+
# ========================================================================= #
|
271
|
+
def show_exam_ects_points_passed_per_semester
|
272
|
+
# ======================================================================= #
|
273
|
+
# First, we need a way to group months into "sommersemester" or
|
274
|
+
# "wintersemester.
|
275
|
+
# ======================================================================= #
|
276
|
+
hash = {}
|
277
|
+
_ = dataset?
|
278
|
+
opnn; e 'We will next show how many exams were passed in a given semester.'
|
279
|
+
# ======================================================================= #
|
280
|
+
# Each entry in the dataset looks like this:
|
281
|
+
# ["10.2001", "3.0"," xxx","4", "UniWien", " D ", " 898249 ","Allgemeine Biologie III"],
|
282
|
+
# SWS ECTS
|
283
|
+
# And it is already sorted.
|
284
|
+
# ======================================================================= #
|
285
|
+
_.each {|inner_array|
|
286
|
+
_n_wochenstunden = inner_array[1]
|
287
|
+
n_ects_points = inner_array[2]
|
288
|
+
_name_of_the_lecture = inner_array.last
|
289
|
+
month_year = inner_array.first
|
290
|
+
year = month_year.dup
|
291
|
+
if month_year.include? '.'
|
292
|
+
splitted = month_year.split('.')
|
293
|
+
month_year = splitted.first
|
294
|
+
year = splitted.last.to_i
|
295
|
+
end
|
296
|
+
sommersemester_or_wintersemester = is_this_sommersemester_or_wintersemester?(
|
297
|
+
month_year
|
298
|
+
)
|
299
|
+
# ======================================================================= #
|
300
|
+
# Note that the Wintersemester may be from the last year, so we
|
301
|
+
# may have to deduct 1. This will be the case only for January
|
302
|
+
# and February though.
|
303
|
+
# ======================================================================= #
|
304
|
+
month_as_number = month_year.split('.').first.to_i
|
305
|
+
if (sommersemester_or_wintersemester == 'WS') and
|
306
|
+
[1,2].include?(month_as_number)
|
307
|
+
year -= 1
|
308
|
+
end
|
309
|
+
# ======================================================================= #
|
310
|
+
# Every time a toggle from SS to WS happens, we populate it into
|
311
|
+
# another Hash. Note that we only care for when the exam was
|
312
|
+
# officially registered and simply count this as a "sommersemester"
|
313
|
+
# or "wintersemester" lecture.
|
314
|
+
# ======================================================================= #
|
315
|
+
hash_key_to_use = sommersemester_or_wintersemester+' '+year.to_s
|
316
|
+
if hash.has_key? hash_key_to_use # Then add to it.
|
317
|
+
hash[hash_key_to_use] = hash[hash_key_to_use]+n_ects_points.to_f
|
318
|
+
else
|
319
|
+
hash[hash_key_to_use] = n_ects_points.to_f
|
320
|
+
end
|
321
|
+
}
|
322
|
+
e 'We have determined these ECTS points per semester:'; e
|
323
|
+
hash.each_pair {|semester_and_year, n_ects_points|
|
324
|
+
e ' '+simp(semester_and_year.ljust(8))+' '+
|
325
|
+
sfancy(((n_ects_points.to_s.rjust(4))+' ECTS').rjust(8))
|
326
|
+
}
|
327
|
+
e; e 'Total ECTS points: '+simp(hash.values.sum.to_s)
|
328
|
+
end
|
329
|
+
|
330
|
+
# ========================================================================= #
|
331
|
+
# === show_only_exams_before_this_date
|
332
|
+
#
|
333
|
+
# The argument to this method should be the starting time, the day at
|
334
|
+
# which you wish to keep track of exams made BEFORE this date.
|
335
|
+
#
|
336
|
+
# To invoke this method, do:
|
337
|
+
# emo "before 10.01.2011"
|
338
|
+
# ========================================================================= #
|
339
|
+
def show_only_exams_before_this_date(this_date)
|
340
|
+
unless this_date.include? '.'
|
341
|
+
this_date.prepend('01.01.') # In this case, we assume this to mean the first January.
|
342
|
+
end
|
343
|
+
opnn; e 'Showing only passed exams before the date '+simp(this_date.to_s)+'.'
|
344
|
+
# ======================================================================= #
|
345
|
+
# Convert a String into a time object.
|
346
|
+
# ======================================================================= #
|
347
|
+
this_date = Time.parse(this_date) if this_date.is_a? String
|
348
|
+
a = this_date # Shorter to type. :)
|
349
|
+
_ = dataset?
|
350
|
+
new_array_with_matches = []
|
351
|
+
_.each {|entry|
|
352
|
+
date = Time.parse('01.'+entry.first.strip) # Must insert date here.
|
353
|
+
b = date
|
354
|
+
if a > b
|
355
|
+
new_array_with_matches << entry
|
356
|
+
end
|
357
|
+
}
|
358
|
+
reset_main_hash
|
359
|
+
sanitize_dataset(new_array_with_matches, :leave_time_entry_alone)
|
360
|
+
end
|
361
|
+
|
362
|
+
# ========================================================================= #
|
363
|
+
# === show_only_bachelor_exams
|
364
|
+
#
|
365
|
+
# Use this method to show only exams relevant for the Bachelor.
|
366
|
+
#
|
367
|
+
# Invocation example:
|
368
|
+
# emo --show-only-bachelor
|
369
|
+
# ========================================================================= #
|
370
|
+
def show_only_bachelor_exams
|
371
|
+
opnn; e 'Showing only Bachelor exams.'
|
372
|
+
_ = dataset?.select {|entry|
|
373
|
+
curriculum_type = entry[5].strip # The sixth entry is the bachelor/master distinction.
|
374
|
+
curriculum_type.include? 'B'
|
375
|
+
}
|
376
|
+
reset_main_hash
|
377
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
378
|
+
end
|
379
|
+
|
380
|
+
# ========================================================================= #
|
381
|
+
# === show_only_master_lectures
|
382
|
+
#
|
383
|
+
# This method is tasked to show only master lectures. For this purpose,
|
384
|
+
# we define a lecture to be a "master" lecture if it is part of at the
|
385
|
+
# least one master-curriculum. With this definition, a lecture that
|
386
|
+
# is registered in both a bachelor and a master curriculum, will
|
387
|
+
# satisfy this defintion and thus be listed.
|
388
|
+
#
|
389
|
+
# We will take the file passed_exams_per_month.csv for this.
|
390
|
+
#
|
391
|
+
# That file will have entries such as:
|
392
|
+
#
|
393
|
+
# 28.11.2016 | 3.0 | 6.0 | 1 | UniWien | M | 330011 | Zell- und Molekularbiologie
|
394
|
+
#
|
395
|
+
# So we can pick field number 6. If that field has an upcased 'M' then
|
396
|
+
# it qualifies.
|
397
|
+
#
|
398
|
+
# To invoke this method from the commandline, do:
|
399
|
+
# emo --show-only-master-lectures
|
400
|
+
# ========================================================================= #
|
401
|
+
def show_only_master_lectures
|
402
|
+
_ = @dataset.select {|array|
|
403
|
+
bachelor_or_master_curriculum = array[5].strip
|
404
|
+
bachelor_or_master_curriculum.include? 'M'
|
405
|
+
}
|
406
|
+
total_ects_points = 0
|
407
|
+
e
|
408
|
+
_.each_with_index {|lecture_data, index|
|
409
|
+
index += 1
|
410
|
+
n_ects = lecture_data[2]
|
411
|
+
total_ects_points += n_ects.to_f
|
412
|
+
name_of_the_lecture = lecture_data.last
|
413
|
+
leistung_erbracht_am = lecture_data.first
|
414
|
+
which_university = mediumturquoise(lecture_data[4])
|
415
|
+
show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
|
416
|
+
index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
|
417
|
+
)
|
418
|
+
}
|
419
|
+
report_total_amount_of_ects_points(total_ects_points, :master)
|
420
|
+
end
|
421
|
+
|
422
|
+
# ========================================================================= #
|
423
|
+
# === show_only_bachelor_lectures
|
424
|
+
#
|
425
|
+
# As the variant for master lectures, just for bachelor lectures.
|
426
|
+
#
|
427
|
+
# To invoke it, do:
|
428
|
+
# emo --show-only-bachelor-lectures
|
429
|
+
# ========================================================================= #
|
430
|
+
def show_only_bachelor_lectures
|
431
|
+
_ = @dataset.select {|array|
|
432
|
+
bachelor_or_master_curriculum = array[5].strip
|
433
|
+
bachelor_or_master_curriculum.include? 'B'
|
434
|
+
}
|
435
|
+
total_ects_points = 0
|
436
|
+
e
|
437
|
+
_.each_with_index {|lecture_data, index|
|
438
|
+
index += 1
|
439
|
+
n_ects = lecture_data[2]
|
440
|
+
total_ects_points += n_ects.to_f
|
441
|
+
name_of_the_lecture = lecture_data.last
|
442
|
+
leistung_erbracht_am = lecture_data.first
|
443
|
+
which_university = mediumturquoise(lecture_data[4])
|
444
|
+
show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
|
445
|
+
index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
|
446
|
+
)
|
447
|
+
}
|
448
|
+
report_total_amount_of_ects_points(total_ects_points, :bachelor)
|
449
|
+
end
|
450
|
+
|
451
|
+
# ========================================================================= #
|
452
|
+
# === report_total_amount_of_ects_points
|
453
|
+
# ========================================================================= #
|
454
|
+
def report_total_amount_of_ects_points(
|
455
|
+
total_ects_points,
|
456
|
+
bachelor_or_master = :bachelor,
|
457
|
+
ljust_to_use = 41 # Reason for this value is so that it aligns.
|
458
|
+
)
|
459
|
+
bachelor_or_master = bachelor_or_master.to_s.capitalize # Capitalization is nicer.
|
460
|
+
e
|
461
|
+
e 'Total ECTS points from '+bachelor_or_master+' lectures: '.
|
462
|
+
ljust(ljust_to_use)+
|
463
|
+
slateblue(total_ects_points.to_s+' ECTS')
|
464
|
+
e
|
465
|
+
end
|
466
|
+
|
467
|
+
# ========================================================================= #
|
468
|
+
# === show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university
|
469
|
+
#
|
470
|
+
# This long compound method is only used from within the following two
|
471
|
+
# methods:
|
472
|
+
#
|
473
|
+
# show_only_bachelor_lectures
|
474
|
+
# show_only_master_lectures
|
475
|
+
#
|
476
|
+
# ========================================================================= #
|
477
|
+
def show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
|
478
|
+
index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
|
479
|
+
)
|
480
|
+
e lightgreen((index.to_s+')').rjust(6))+' '+
|
481
|
+
orange(name_of_the_lecture.ljust(74))+' '+
|
482
|
+
slateblue(n_ects.to_s+' ECTS')+crimson(
|
483
|
+
' '+leistung_erbracht_am.to_s
|
484
|
+
)+' '+which_university
|
485
|
+
end
|
486
|
+
|
487
|
+
# ========================================================================= #
|
488
|
+
# === show_only_exams_past_this_date
|
489
|
+
#
|
490
|
+
# The argument to this method should be the starting time, the day at
|
491
|
+
# which you wish to keep track of exams made afterwards.
|
492
|
+
#
|
493
|
+
# To invoke this method, do:
|
494
|
+
# emo "since 10.02.2014"
|
495
|
+
# ========================================================================= #
|
496
|
+
def show_only_exams_past_this_date(this_date)
|
497
|
+
unless this_date.include? '.'
|
498
|
+
this_date.prepend('01.01.') # In this case, we assume this to mean the first January.
|
499
|
+
end
|
500
|
+
# ======================================================================= #
|
501
|
+
# The variable this_date will be something like "18.08.2013".
|
502
|
+
# ======================================================================= #
|
503
|
+
opnn; e 'Showing only passed exams past the date '+simp(this_date.to_s)+'.'
|
504
|
+
# ======================================================================= #
|
505
|
+
# Convert a String into a time object.
|
506
|
+
# ======================================================================= #
|
507
|
+
this_date = Time.parse(this_date) if this_date.is_a? String
|
508
|
+
a = this_date # Shorter to type. :)
|
509
|
+
_ = dataset?
|
510
|
+
new_array_with_matches = []
|
511
|
+
_.each {|entry|
|
512
|
+
# ======================================================================= #
|
513
|
+
# We simply assume the first day of the given month next.
|
514
|
+
# ======================================================================= #
|
515
|
+
first = '01.'+entry.first.strip
|
516
|
+
date = Time.parse(first) # Must insert date here.
|
517
|
+
b = date
|
518
|
+
if a < b
|
519
|
+
new_array_with_matches << entry # Only add entries that are relevant.
|
520
|
+
end
|
521
|
+
}
|
522
|
+
reset_main_hash # Reset for a clean state again.
|
523
|
+
sanitize_dataset(new_array_with_matches, :leave_time_entry_alone)
|
524
|
+
end
|
525
|
+
|
526
|
+
# ========================================================================= #
|
527
|
+
# === show_only_exams_at_the_tu
|
528
|
+
#
|
529
|
+
# Show only exams at the TU.
|
530
|
+
# ========================================================================= #
|
531
|
+
def show_only_exams_at_the_tu
|
532
|
+
opnn; e 'Showing all exams passed at the TU.'
|
533
|
+
_ = dataset?.select {|entry|
|
534
|
+
name_of_university = entry[4]
|
535
|
+
(name_of_university.strip.downcase.start_with? 'tu')
|
536
|
+
}
|
537
|
+
reset_main_hash
|
538
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
539
|
+
end
|
540
|
+
|
541
|
+
# ========================================================================= #
|
542
|
+
# === do_show_the_grades_statistics
|
543
|
+
#
|
544
|
+
# Show all grade statistics.
|
545
|
+
#
|
546
|
+
# Invocation example:
|
547
|
+
# emo --grades
|
548
|
+
# ========================================================================= #
|
549
|
+
def do_show_the_grades_statistics
|
550
|
+
_ = dataset?
|
551
|
+
# ======================================================================= #
|
552
|
+
# The dataset will have entries such as:
|
553
|
+
# ["05.1998","2.0"," xxx","4","UniWien"," D "," 854623 ","1998W","Biologische Physik II (Physik für Biologen II)"]
|
554
|
+
# So for our purpose, we are only interested in entry at position
|
555
|
+
# 2, 3 and 4.
|
556
|
+
# ======================================================================= #
|
557
|
+
hash_containing_the_relevant_entries = {}
|
558
|
+
# ======================================================================= #
|
559
|
+
# The following data structures are of interest:
|
560
|
+
# - How many exams were passed for this grade
|
561
|
+
# - The total amount of ECTS points passed
|
562
|
+
# - The total amount of hours passed
|
563
|
+
# ======================================================================= #
|
564
|
+
hash_containing_the_relevant_entries[1] = [0,0,0]
|
565
|
+
hash_containing_the_relevant_entries[2] = [0,0,0]
|
566
|
+
hash_containing_the_relevant_entries[3] = [0,0,0]
|
567
|
+
hash_containing_the_relevant_entries[4] = [0,0,0]
|
568
|
+
# ======================================================================= #
|
569
|
+
# Iterate over the dataset.
|
570
|
+
# ======================================================================= #
|
571
|
+
_.each {|line|
|
572
|
+
this_grade = line[3].to_i
|
573
|
+
if this_grade == 0
|
574
|
+
# pp 'DEBUG'; pp line # For entries that have a '+' evaluation rather.
|
575
|
+
else
|
576
|
+
n_ects_points = line[1].to_f
|
577
|
+
n_hours = line[2].to_f
|
578
|
+
array = hash_containing_the_relevant_entries[this_grade]
|
579
|
+
array[0] += 1
|
580
|
+
array[1] += n_ects_points # For ECTS points.
|
581
|
+
array[2] += n_hours # For Semesterwochenstunden.
|
582
|
+
hash_containing_the_relevant_entries[this_grade] = array
|
583
|
+
end
|
584
|
+
}
|
585
|
+
e
|
586
|
+
e lightgreen('The grades that were passed successfully, are as follows:')
|
587
|
+
e
|
588
|
+
average_grade = 0
|
589
|
+
average_grade_weighted_by_ects_points = 0
|
590
|
+
n_total_exams = hash_containing_the_relevant_entries.values.map {|array|
|
591
|
+
array.first
|
592
|
+
}.sum
|
593
|
+
hash_containing_the_relevant_entries.each_pair {|grade, array_dataset|
|
594
|
+
n_exams_passed = array_dataset.first
|
595
|
+
total_n_ects_points = array_dataset[1]
|
596
|
+
total_n_hours = array_dataset.last
|
597
|
+
n_percent = (n_exams_passed.to_i * 100 / n_total_exams).round(3).to_s
|
598
|
+
e "For the grade #{simp(grade)} #{crimson(n_exams_passed.to_s)} "\
|
599
|
+
"exams were passed successfully. (#{crimson(n_percent.to_s+'%')})"
|
600
|
+
e " n ECTS points: #{mediumorchid(total_n_ects_points.to_s.rjust(5))}"
|
601
|
+
e " n hours: #{mediumpurple(total_n_hours.to_s.rjust(5))}"
|
602
|
+
e
|
603
|
+
}
|
604
|
+
hash = hash_containing_the_relevant_entries
|
605
|
+
average_grade = (1 * hash[1][0]+
|
606
|
+
2 * hash[2][0]+
|
607
|
+
3 * hash[3][0]+
|
608
|
+
4 * hash[4][0])
|
609
|
+
total_n_ects_points = hash[1][1].to_f+
|
610
|
+
hash[2][1].to_f+
|
611
|
+
hash[3][1].to_f+
|
612
|
+
hash[4][1].to_f
|
613
|
+
average_grade_weighted_by_ects_points = (
|
614
|
+
1 * hash[1][1].to_f+
|
615
|
+
2 * hash[2][1].to_f+
|
616
|
+
3 * hash[3][1].to_f+
|
617
|
+
4 * hash[4][1].to_f
|
618
|
+
)
|
619
|
+
average_grade_weighted_by_ects_points =
|
620
|
+
average_grade_weighted_by_ects_points.to_f / total_n_ects_points.to_f # Gesamtzahl an ECTS
|
621
|
+
average_grade = average_grade.to_f / (
|
622
|
+
hash[1][0]+
|
623
|
+
hash[2][0]+
|
624
|
+
hash[3][0]+
|
625
|
+
hash[4][0]
|
626
|
+
) # Have to divide it by the amount of exams.
|
627
|
+
average_grade = average_grade.round(2)
|
628
|
+
# ======================================================================= #
|
629
|
+
# Next, show some statistics.
|
630
|
+
# ======================================================================= #
|
631
|
+
e 'This means that the average grade is: '+
|
632
|
+
slateblue(average_grade.to_s)
|
633
|
+
e 'And the average grade, weighted per single (1.0) ECTS point, is: '+
|
634
|
+
lightblue(average_grade_weighted_by_ects_points.round(2).to_s)
|
635
|
+
e
|
636
|
+
end
|
637
|
+
|
638
|
+
# ========================================================================= #
|
639
|
+
# === show_how_many_exams_we_have_passed_in_this_curriculum
|
640
|
+
#
|
641
|
+
# This method will show how many exams we have already passed for
|
642
|
+
# a given curriculum xyz.
|
643
|
+
#
|
644
|
+
# To invoke this, do:
|
645
|
+
#
|
646
|
+
# emo --agrarwissenschaften
|
647
|
+
#
|
648
|
+
# ========================================================================= #
|
649
|
+
def show_how_many_exams_we_have_passed_in_this_curriculum(i)
|
650
|
+
require 'studium/lectures/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb'
|
651
|
+
i = i.to_s.delete('_')
|
652
|
+
_ = ::Studium::ShowLecturesOnTheCommandline.new(
|
653
|
+
i, :do_not_run_yet
|
654
|
+
)
|
655
|
+
_.do_not_report_anything
|
656
|
+
_.iterate_over_the_lectures
|
657
|
+
_.report_how_many_exams_have_been_passed_already
|
658
|
+
end
|
659
|
+
|
660
|
+
# ========================================================================= #
|
661
|
+
# === show_ects_passed_per_university
|
662
|
+
# ========================================================================= #
|
663
|
+
def show_ects_passed_per_university
|
664
|
+
Studium::EctsPerUniversity.new
|
665
|
+
end
|
666
|
+
|
667
|
+
# ========================================================================= #
|
668
|
+
# === set_n_exams_in_total_passed
|
669
|
+
# ========================================================================= #
|
670
|
+
def set_n_exams_in_total_passed(i)
|
671
|
+
@n_exams_in_total_passed = i.to_f
|
672
|
+
end
|
673
|
+
|
674
|
+
# ========================================================================= #
|
675
|
+
# === set_n_ects_points_in_total
|
676
|
+
# ========================================================================= #
|
677
|
+
def set_n_ects_points_in_total(i)
|
678
|
+
@n_ects_points_in_total = i.to_f
|
679
|
+
end
|
680
|
+
|
681
|
+
# ========================================================================= #
|
682
|
+
# === determine_n_ects_points_in_total
|
683
|
+
#
|
684
|
+
# The main Hash will look like this:
|
685
|
+
#
|
686
|
+
# {"07.2018"=>[9.0, 14.0, ["+", "4", "1", "1"], "uniwien", 4]
|
687
|
+
#
|
688
|
+
# The relevant ECTS entries are in the value part, at the second
|
689
|
+
# position, so [1].
|
690
|
+
# ========================================================================= #
|
691
|
+
def determine_n_ects_points_in_total
|
692
|
+
n_ects_points = @hash.values.map {|entry| entry[1] }.sum
|
693
|
+
set_n_ects_points_in_total(n_ects_points)
|
694
|
+
end
|
695
|
+
|
696
|
+
# ========================================================================= #
|
697
|
+
# === determine_n_exams_in_total_were_passed
|
698
|
+
# ========================================================================= #
|
699
|
+
def determine_n_exams_in_total_were_passed
|
700
|
+
n_exams = @hash.values.map {|entry| entry.last }.sum
|
701
|
+
set_n_exams_in_total_passed(n_exams)
|
702
|
+
end
|
703
|
+
|
704
|
+
# ========================================================================= #
|
705
|
+
# === show_the_years_in_a_short_table_overview
|
706
|
+
#
|
707
|
+
# To invoke this method, do:
|
708
|
+
# emo --years
|
709
|
+
# ========================================================================= #
|
710
|
+
def show_the_years_in_a_short_table_overview
|
711
|
+
total_ects = 0
|
712
|
+
_ = dataset? # Prepare the dataset a bit.
|
713
|
+
_.map! {|inner_array|
|
714
|
+
n_ects_points = inner_array[2] # Grab the amount of ECTS of this exam.
|
715
|
+
[inner_array[0].split('.').last, n_ects_points]
|
716
|
+
}
|
717
|
+
# ======================================================================= #
|
718
|
+
# Determine the current year automatically.
|
719
|
+
# ======================================================================= #
|
720
|
+
current_year = Date.today.year # 2017
|
721
|
+
total_ects_points_in_that_year = 0
|
722
|
+
e
|
723
|
+
e steelblue('Year')+
|
724
|
+
sfancy(' n ECTS points')
|
725
|
+
show_colourized_line
|
726
|
+
_.each {|year, n_ects_points|
|
727
|
+
year = year.to_i
|
728
|
+
n_ects_points = n_ects_points.to_f
|
729
|
+
total_ects += n_ects_points
|
730
|
+
if current_year == year
|
731
|
+
total_ects_points_in_that_year += n_ects_points
|
732
|
+
else
|
733
|
+
e ' '+
|
734
|
+
steelblue(( (current_year.to_s+': ') ).ljust(15))+
|
735
|
+
sfancy(total_ects_points_in_that_year.to_s.rjust(5)+' ECTS points')
|
736
|
+
total_ects_points_in_that_year = 0
|
737
|
+
current_year = year
|
738
|
+
total_ects_points_in_that_year += n_ects_points
|
739
|
+
end
|
740
|
+
}
|
741
|
+
show_colourized_line
|
742
|
+
e (' ' * 16)+sfancy(total_ects.to_s+' ECTS points')
|
743
|
+
e
|
744
|
+
end
|
745
|
+
|
746
|
+
# ========================================================================= #
|
747
|
+
# === show_colourized_line
|
748
|
+
# ========================================================================= #
|
749
|
+
def show_colourized_line(n_times = 34)
|
750
|
+
e simp('-' * n_times)
|
751
|
+
end
|
752
|
+
|
753
|
+
# ========================================================================= #
|
754
|
+
# === show_best_months
|
755
|
+
#
|
756
|
+
# This method will show the best months, sorted. Best comes first.
|
757
|
+
#
|
758
|
+
# Invocation example:
|
759
|
+
#
|
760
|
+
# emo --show-best-months
|
761
|
+
#
|
762
|
+
# ========================================================================= #
|
763
|
+
def show_best_months(
|
764
|
+
do_show_n_months = @show_n_best_months
|
765
|
+
)
|
766
|
+
opnn; e 'Showing the '+slateblue(do_show_n_months.to_s)+' best '\
|
767
|
+
'months next, sorted by n ECTS points passed:'
|
768
|
+
e
|
769
|
+
hash_month_statistics = {}
|
770
|
+
_ = @hash.sort_by {|key, inner_array|
|
771
|
+
n_ECTS_points = inner_array[1].to_f
|
772
|
+
n_ECTS_points
|
773
|
+
}.reverse
|
774
|
+
# ======================================================================= #
|
775
|
+
# Next we must determine the sub-array which we will display.
|
776
|
+
# ======================================================================= #
|
777
|
+
array_to_display = []
|
778
|
+
_.each {|month, inner_array|
|
779
|
+
array_to_display << [ month, inner_array[1].to_f ]
|
780
|
+
}
|
781
|
+
# ======================================================================= #
|
782
|
+
# How many months to analyze will be determined next:
|
783
|
+
# ======================================================================= #
|
784
|
+
array_to_display = array_to_display[0..(do_show_n_months - 1)]
|
785
|
+
# ======================================================================= #
|
786
|
+
# Now we have our dataset - array_to_display keeps track of it.
|
787
|
+
# ======================================================================= #
|
788
|
+
exam_number_n = 0 # <- Keep track of which exam is in use.
|
789
|
+
array_to_display.each {|month, n_ECTS_points_passed|
|
790
|
+
# ===================================================================== #
|
791
|
+
# The dataset may look like this:
|
792
|
+
#
|
793
|
+
# [["01.2017", 41.0],
|
794
|
+
# ["06.2015", 35.0],
|
795
|
+
#
|
796
|
+
# ===================================================================== #
|
797
|
+
exam_number_n += 1
|
798
|
+
left_pad = ((exam_number_n.to_s+')').rjust(5)).ljust(6)
|
799
|
+
# ======================================================================= #
|
800
|
+
# Report this to the user:
|
801
|
+
# ======================================================================= #
|
802
|
+
rounded_n_ECTS_points_passed = n_ECTS_points_passed.to_s.to_f.round(1)
|
803
|
+
e yellow(left_pad)+'In the month '+
|
804
|
+
sfancy(month)+', '+
|
805
|
+
violet(rounded_n_ECTS_points_passed.to_s.rjust(4))+
|
806
|
+
' ECTS points were completed.'
|
807
|
+
# ======================================================================= #
|
808
|
+
# Also add to the hash that keeps track about the month-statistics.
|
809
|
+
# ======================================================================= #
|
810
|
+
this_month = month.split('.').first.to_i # <- Example input: "01.2017"
|
811
|
+
this_month = Studium::MONTH_NUMBER_TO_MONTH_NAME[this_month]
|
812
|
+
hash = {
|
813
|
+
:n_ects => n_ECTS_points_passed,
|
814
|
+
:n_times_mentioned => 1
|
815
|
+
}
|
816
|
+
if hash_month_statistics.has_key? this_month
|
817
|
+
hash_month_statistics[this_month][:n_ects] += n_ECTS_points_passed
|
818
|
+
hash_month_statistics[this_month][:n_times_mentioned] += 1
|
819
|
+
else
|
820
|
+
hash_month_statistics[this_month] = hash
|
821
|
+
end
|
822
|
+
}
|
823
|
+
e
|
824
|
+
# ======================================================================= #
|
825
|
+
# Next, we will also show some month statistics.
|
826
|
+
# ======================================================================= #
|
827
|
+
colourized_n_best_months = orange(do_show_n_months)
|
828
|
+
opnn; e "The best #{colourized_n_best_months} (top) months "\
|
829
|
+
"seem to be the following ones:"
|
830
|
+
e
|
831
|
+
_ = hash_month_statistics
|
832
|
+
# ======================================================================= #
|
833
|
+
# The variable name_of_the_month keeps track of the month at hand,
|
834
|
+
# e. g. "January" or "March".
|
835
|
+
# ======================================================================= #
|
836
|
+
_ = _.sort_by {|name_of_the_month, hash_containing_n_ects_and_n_times_mentioned|
|
837
|
+
n_ects = hash_containing_n_ects_and_n_times_mentioned[:n_ects]
|
838
|
+
n_ects
|
839
|
+
}.reverse
|
840
|
+
counter = 0
|
841
|
+
# ======================================================================= #
|
842
|
+
# Now we have the entry properly sorted. We will display only up to
|
843
|
+
# n times specified as above (e. g. 8 times right now).
|
844
|
+
# ======================================================================= #
|
845
|
+
_.each {|name_of_the_month, hash_containing_n_ects_and_n_times_mentioned|
|
846
|
+
next if counter > 7 # <- Sync it with the above value of 8.
|
847
|
+
n_ects = hash_containing_n_ects_and_n_times_mentioned[:n_ects]
|
848
|
+
n_times_mentioned = hash_containing_n_ects_and_n_times_mentioned[:n_times_mentioned]
|
849
|
+
counter += 1
|
850
|
+
e ' '+
|
851
|
+
sfancy((name_of_the_month+':').ljust(12))+
|
852
|
+
orange(n_times_mentioned.to_s.rjust(2))+ # <- n_times mentioned
|
853
|
+
olivedrab(' (ECTS in total: ')+
|
854
|
+
colourize_ects_points(n_ects.to_s.rjust(5))+
|
855
|
+
olivedrab('; average ECTS in that month: ')+
|
856
|
+
colourize_ects_points(
|
857
|
+
(n_ects.to_f / n_times_mentioned.to_i).round(1).to_s.rjust(4)
|
858
|
+
)+
|
859
|
+
olivedrab(')')
|
860
|
+
}
|
861
|
+
e
|
862
|
+
end
|
863
|
+
|
864
|
+
# ========================================================================= #
|
865
|
+
# === show_total_summary_for_year_hours_ects_n_exams
|
866
|
+
#
|
867
|
+
# This method will show the total summary for a given year.
|
868
|
+
# ========================================================================= #
|
869
|
+
def show_total_summary_for_year_hours_ects_n_exams(
|
870
|
+
last_year,
|
871
|
+
total_n_hours_passed_in_this_year,
|
872
|
+
total_n_ects_passed_in_this_year,
|
873
|
+
total_n_exams_passed_in_this_year,
|
874
|
+
optional_average_grade_per_exam = nil # The average grade per exam in a given year. Optional entr.y
|
875
|
+
)
|
876
|
+
if @show_only_this_year and
|
877
|
+
@show_only_this_year.include?('-') and
|
878
|
+
@show_only_this_year.split('-').last.to_i < last_year
|
879
|
+
# This is the case here when we show a range.
|
880
|
+
elsif @show_only_this_year and
|
881
|
+
(@show_only_this_year != last_year)
|
882
|
+
else
|
883
|
+
e # And a newline too.
|
884
|
+
result = 'Total Summary in '+sfancy(last_year.to_s)+': '+
|
885
|
+
# Add n_hours next.
|
886
|
+
colourize_hours(
|
887
|
+
total_n_hours_passed_in_this_year.to_s.rjust(4)
|
888
|
+
)+' '
|
889
|
+
# ======================================================================= #
|
890
|
+
# Add n_ECTS next.
|
891
|
+
# ======================================================================= #
|
892
|
+
if show_ects_points?
|
893
|
+
result << colourize_ects(
|
894
|
+
total_n_ects_passed_in_this_year.to_f.to_s.rjust(5)+
|
895
|
+
' ECTS passed'
|
896
|
+
)
|
897
|
+
end
|
898
|
+
# ======================================================================= #
|
899
|
+
# We will use papayawhip here instead.
|
900
|
+
# ======================================================================= #
|
901
|
+
result << colourize_n_exams(' (n exams passed that year: '+
|
902
|
+
total_n_exams_passed_in_this_year.to_s.rjust(3)+')',
|
903
|
+
:mediumseagreen
|
904
|
+
)
|
905
|
+
e result
|
906
|
+
if @show_yearly_average_grades and optional_average_grade_per_exam
|
907
|
+
if block_given?
|
908
|
+
yielded = yield
|
909
|
+
if yielded.is_a? Hash
|
910
|
+
if yielded.has_key? :exclude_n_exams_from_the_grade_list
|
911
|
+
total_n_exams_passed_in_this_year -= yielded[:exclude_n_exams_from_the_grade_list].to_i
|
912
|
+
end
|
913
|
+
end
|
914
|
+
end
|
915
|
+
_ = (
|
916
|
+
optional_average_grade_per_exam.to_f / total_n_exams_passed_in_this_year.to_f
|
917
|
+
).round(2)
|
918
|
+
_ = _.to_s.ljust(4,'0')
|
919
|
+
e 'The average grade of the exams passed in this year is: '+
|
920
|
+
sfancy(_)
|
921
|
+
end
|
922
|
+
end
|
923
|
+
end
|
924
|
+
|
925
|
+
# ========================================================================= #
|
926
|
+
# === show_only_exams_at_the_boku
|
927
|
+
#
|
928
|
+
# Show only exams at the BOKU.
|
929
|
+
# ========================================================================= #
|
930
|
+
def show_only_exams_at_the_boku
|
931
|
+
opnn; e 'Showing all exams passed at the BOKU.'
|
932
|
+
_ = dataset?.select {|entry|
|
933
|
+
name_of_university = entry[4]
|
934
|
+
(name_of_university.strip.downcase == 'boku')
|
935
|
+
}
|
936
|
+
reset_main_hash
|
937
|
+
sanitize_dataset(_, :leave_time_entry_alone)
|
938
|
+
end
|
939
|
+
|
940
|
+
# ========================================================================= #
|
941
|
+
# === show_n_exams_passed_per_month (report tag)
|
942
|
+
#
|
943
|
+
# This is the main report-method for this class.
|
944
|
+
#
|
945
|
+
# Make sure that the input to this method is correct.
|
946
|
+
# ========================================================================= #
|
947
|
+
def show_n_exams_passed_per_month(
|
948
|
+
i = @hash
|
949
|
+
)
|
950
|
+
month = 0
|
951
|
+
year = 0
|
952
|
+
n_hours = 0
|
953
|
+
n_ECTS = 0
|
954
|
+
grade = 0
|
955
|
+
# ======================================================================= #
|
956
|
+
# We must initialize some variables here.
|
957
|
+
# ======================================================================= #
|
958
|
+
n_exams_passed_in_this_month = 0
|
959
|
+
total_n_ects_passed_in_this_year = 0
|
960
|
+
total_n_hours_passed_in_this_year = 0
|
961
|
+
total_n_exams_passed_in_this_year = 0
|
962
|
+
total_grade_count_in_this_year = 0
|
963
|
+
exclude_n_exams_from_the_grade_list = 0
|
964
|
+
|
965
|
+
last_year = LAST_YEAR # Will point to the current year actually.
|
966
|
+
this_year = Time.now.year.to_i
|
967
|
+
# ======================================================================= #
|
968
|
+
# Check whether we shall only show certain grades.
|
969
|
+
# ======================================================================= #
|
970
|
+
if @show_only_grade_for
|
971
|
+
opnn; e "We will only show grades that are equal to "\
|
972
|
+
"#{simp(@show_only_grade_for.to_s)}."
|
973
|
+
end
|
974
|
+
e
|
975
|
+
opnn; e 'We will show how many hours / ECTS we passed per '\
|
976
|
+
'given month and then year.'
|
977
|
+
e
|
978
|
+
spacer
|
979
|
+
# ======================================================================= #
|
980
|
+
# Header:
|
981
|
+
# ======================================================================= #
|
982
|
+
if @show_only_this_year and
|
983
|
+
@show_only_this_year.include?('-') and
|
984
|
+
@show_only_this_year.split('-').last.to_i < last_year
|
985
|
+
# ===================================================================== #
|
986
|
+
# In this case, do not show the last year.
|
987
|
+
# ===================================================================== #
|
988
|
+
elsif @show_only_this_year and
|
989
|
+
(@show_only_this_year != last_year) and
|
990
|
+
(this_year != last_year)
|
991
|
+
# ===================================================================== #
|
992
|
+
# In this case we will also not show the last year.
|
993
|
+
# ===================================================================== #
|
994
|
+
else # This here is the main clause - most conditions lead to this case.
|
995
|
+
output_colourized_year_and_colourized_hours(last_year)
|
996
|
+
end
|
997
|
+
# ======================================================================= #
|
998
|
+
# We iterate through our hash. Each entry processed through .each
|
999
|
+
# is the dataset for a whole month.
|
1000
|
+
#
|
1001
|
+
# The entries are:
|
1002
|
+
#
|
1003
|
+
# - On the left side, the month.year entry.
|
1004
|
+
#
|
1005
|
+
# - On the right side, an Array with n hours, n ects points,
|
1006
|
+
# the grade, n exams passed and the university .
|
1007
|
+
# ======================================================================= #
|
1008
|
+
i.each {|month_year, n_hours_n_ECTS_grade_university_n_exams_passed|
|
1009
|
+
month, year = month_year.split('.').map(&:to_i)
|
1010
|
+
# ===================================================================== #
|
1011
|
+
# First we deconstruct the information stored in our Array:
|
1012
|
+
# n_hours | n_ECTS | grade | university | n_exams_passed
|
1013
|
+
# ===================================================================== #
|
1014
|
+
n_hours, n_ECTS, grade, _university, n_exams_passed_in_this_month =
|
1015
|
+
n_hours_n_ECTS_grade_university_n_exams_passed
|
1016
|
+
# ===================================================================== #
|
1017
|
+
# Currently, the grade is not output as it is not so important. It
|
1018
|
+
# can, however had, be used for showing the average grade per year.
|
1019
|
+
# ===================================================================== #
|
1020
|
+
# Next, the case will be handled when we only show exams that have a
|
1021
|
+
# specific grade.
|
1022
|
+
# ===================================================================== #
|
1023
|
+
if @show_only_grade_for
|
1024
|
+
next unless grade == @show_only_grade_for
|
1025
|
+
end
|
1026
|
+
# ===================================================================== #
|
1027
|
+
# Switch to another year in that event.
|
1028
|
+
# ===================================================================== #
|
1029
|
+
if year != last_year
|
1030
|
+
# =================================================================== #
|
1031
|
+
# Show the total summary per given year. The last entry showing the
|
1032
|
+
# average grade is optional.
|
1033
|
+
# =================================================================== #
|
1034
|
+
show_total_summary_for_year_hours_ects_n_exams(
|
1035
|
+
last_year, total_n_hours_passed_in_this_year,
|
1036
|
+
total_n_ects_passed_in_this_year,
|
1037
|
+
total_n_exams_passed_in_this_year,
|
1038
|
+
total_grade_count_in_this_year
|
1039
|
+
) {{ exclude_n_exams_from_the_grade_list: exclude_n_exams_from_the_grade_list }}
|
1040
|
+
# =================================================================== #
|
1041
|
+
# Reset various variables next, in order to prepare for the dataset
|
1042
|
+
# from a new year.
|
1043
|
+
# =================================================================== #
|
1044
|
+
total_n_ects_passed_in_this_year = 0
|
1045
|
+
total_n_hours_passed_in_this_year = 0
|
1046
|
+
total_n_exams_passed_in_this_year = 0
|
1047
|
+
total_grade_count_in_this_year = 0
|
1048
|
+
exclude_n_exams_from_the_grade_list = 0
|
1049
|
+
# =================================================================== #
|
1050
|
+
# Show the spacer after the summary.
|
1051
|
+
# =================================================================== #
|
1052
|
+
spacer unless @show_only_this_year and (@show_only_this_year != last_year)
|
1053
|
+
# =================================================================== #
|
1054
|
+
# Red year.
|
1055
|
+
# =================================================================== #
|
1056
|
+
output_colourized_year_and_colourized_hours(year)
|
1057
|
+
# =================================================================== #
|
1058
|
+
# New year starts here. We will display end-of-year stuff,
|
1059
|
+
# before resetting other counters.
|
1060
|
+
# =================================================================== #
|
1061
|
+
last_year = year
|
1062
|
+
end
|
1063
|
+
total_n_hours_passed_in_this_year += n_hours
|
1064
|
+
@n_hours_passed_in_total += n_hours
|
1065
|
+
total_n_ects_passed_in_this_year += n_ECTS
|
1066
|
+
@n_ects_points_in_total += n_ECTS
|
1067
|
+
total_n_exams_passed_in_this_year += n_exams_passed_in_this_month
|
1068
|
+
@n_exams_in_total_passed += n_exams_passed_in_this_month.to_i
|
1069
|
+
# ===================================================================== #
|
1070
|
+
# Before we can add to the total grade count in this year, we must
|
1071
|
+
# first ensure that the input is not a '+', since this would mean
|
1072
|
+
# passing an exam without getting a grade such as 1, 2, 3, 4 or 5.
|
1073
|
+
#
|
1074
|
+
# Note that grade is an Array.
|
1075
|
+
# ===================================================================== #
|
1076
|
+
if grade.include? '+'
|
1077
|
+
exclude_n_exams_from_the_grade_list += grade.count('+')
|
1078
|
+
grade.reject! {|entry| entry == '+' }
|
1079
|
+
end
|
1080
|
+
# ===================================================================== #
|
1081
|
+
# Next, we can push it into the variable total_grade_count_in_this_year
|
1082
|
+
# ===================================================================== #
|
1083
|
+
add_this_number = grade.map(&:to_i).sum
|
1084
|
+
total_grade_count_in_this_year += add_this_number
|
1085
|
+
# ===================================================================== #
|
1086
|
+
# We can always display the dataset for the given month.
|
1087
|
+
# ===================================================================== #
|
1088
|
+
report_month_year_hours_ects_n_exams_passed_in_this_month(
|
1089
|
+
month, year, n_hours, n_ECTS, n_exams_passed_in_this_month
|
1090
|
+
)
|
1091
|
+
}
|
1092
|
+
# ======================================================================= #
|
1093
|
+
# Must display it one more time, for the last year:
|
1094
|
+
# ======================================================================= #
|
1095
|
+
show_total_summary_for_year_hours_ects_n_exams(
|
1096
|
+
last_year,
|
1097
|
+
total_n_hours_passed_in_this_year,
|
1098
|
+
total_n_ects_passed_in_this_year,
|
1099
|
+
total_n_exams_passed_in_this_year,
|
1100
|
+
total_grade_count_in_this_year
|
1101
|
+
) {{ exclude_n_exams_from_the_grade_list: exclude_n_exams_from_the_grade_list }}
|
1102
|
+
# ======================================================================= #
|
1103
|
+
# Last but not least, we also say how many exams we have passed
|
1104
|
+
# in total, and how many ECTS points these are.
|
1105
|
+
# ======================================================================= #
|
1106
|
+
e
|
1107
|
+
ljust_it_n_times = :default
|
1108
|
+
report_how_many_exams_were_passed_in_total(@n_exams_in_total_passed, ljust_it_n_times)
|
1109
|
+
if show_ects_points? # We here will also assume that the user wants to show the amount of hours as well.
|
1110
|
+
# ===================================================================== #
|
1111
|
+
# Hours, total ects and ects-per-passed-exam:
|
1112
|
+
# ===================================================================== #
|
1113
|
+
ects_per_exams_passed = # This is: total ects / n_exams
|
1114
|
+
(
|
1115
|
+
@n_ects_points_in_total.to_f / @n_exams_in_total_passed.to_f
|
1116
|
+
).round(2)
|
1117
|
+
report_how_many_hours_were_passed_in_total(
|
1118
|
+
@n_hours_passed_in_total, ljust_it_n_times
|
1119
|
+
)
|
1120
|
+
report_how_many_ects_points_have_been_gathered_so_far
|
1121
|
+
report_how_many_of_these_ects_points_required_mandatory_presence(
|
1122
|
+
@n_ects_points_belonging_to_mandatory_presence_courses
|
1123
|
+
)
|
1124
|
+
if @show_average_ects_passed_per_exam
|
1125
|
+
report_the_average_amount_of_ects_per_passed_exam(
|
1126
|
+
ects_per_exams_passed, ljust_it_n_times
|
1127
|
+
)
|
1128
|
+
end
|
1129
|
+
report_the_average_grade(ljust_it_n_times)
|
1130
|
+
end
|
1131
|
+
end; alias report_main_hash show_n_exams_passed_per_month # === report_main_hash
|
1132
|
+
alias report show_n_exams_passed_per_month # === report
|
1133
|
+
|
1134
|
+
# ========================================================================= #
|
1135
|
+
# === report_how_many_of_these_ects_points_required_mandatory_presence
|
1136
|
+
#
|
1137
|
+
# Report how many ECTS points have been passed that required a
|
1138
|
+
# mandatory presence (aka "prüfungsimmanent" in german).
|
1139
|
+
# ========================================================================= #
|
1140
|
+
def report_how_many_of_these_ects_points_required_mandatory_presence(
|
1141
|
+
n_ects_points_in_mandatory_presence_courses =
|
1142
|
+
Studium.n_ects_points_in_mandatory_presence_courses,
|
1143
|
+
n_ljust = 77
|
1144
|
+
)
|
1145
|
+
if n_ljust == :default
|
1146
|
+
n_ljust = 77
|
1147
|
+
end
|
1148
|
+
n_total_ects = @n_ects_points_in_total.to_f
|
1149
|
+
percentage_value = (
|
1150
|
+
n_ects_points_in_mandatory_presence_courses.to_f * 100
|
1151
|
+
) / n_total_ects
|
1152
|
+
rounded_percentage_value = percentage_value.round(2)
|
1153
|
+
e (
|
1154
|
+
"Of these, #{slategray('n ECTS points')} are \"prüfungsimmanent\": "
|
1155
|
+
).ljust(n_ljust)+
|
1156
|
+
sfancy(
|
1157
|
+
n_ects_points_in_mandatory_presence_courses.to_s.rjust(5)
|
1158
|
+
)+
|
1159
|
+
orange(' ('+rounded_percentage_value.to_s+'%)')
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
# ========================================================================= #
|
1163
|
+
# === report_the_average_grade
|
1164
|
+
# ========================================================================= #
|
1165
|
+
def report_the_average_grade(
|
1166
|
+
n_ljust = 76,
|
1167
|
+
n_rjust = 4
|
1168
|
+
)
|
1169
|
+
if n_ljust == :default
|
1170
|
+
n_ljust = 76
|
1171
|
+
end
|
1172
|
+
e "The #{slategray('average grade')} for these exams is: ".ljust(n_ljust+3)+
|
1173
|
+
sfancy(
|
1174
|
+
average_grade.to_s.rjust(n_rjust)
|
1175
|
+
)
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
# ========================================================================= #
|
1179
|
+
# === report_how_many_ects_points_have_been_gathered_so_far
|
1180
|
+
# ========================================================================= #
|
1181
|
+
def report_how_many_ects_points_have_been_gathered_so_far(
|
1182
|
+
n_ljust = 52
|
1183
|
+
)
|
1184
|
+
e "In total, #{slategray('n ECTS points')} have been "\
|
1185
|
+
"gathered so far: ".ljust(n_ljust)+
|
1186
|
+
"#{sfancy(@n_ects_points_in_total.to_s)}"
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
# ========================================================================= #
|
1190
|
+
# === report_the_average_amount_of_ects_per_passed_exam
|
1191
|
+
# ========================================================================= #
|
1192
|
+
def report_the_average_amount_of_ects_per_passed_exam(
|
1193
|
+
ects_per_exams_passed = calculate_the_average_amount_per_passed_exam,
|
1194
|
+
ljust_n_times = 76,
|
1195
|
+
rjust_n_times = 12
|
1196
|
+
)
|
1197
|
+
if ljust_n_times == :default
|
1198
|
+
ljust_n_times = 76
|
1199
|
+
end
|
1200
|
+
left_padded_side = "On average, the "\
|
1201
|
+
"#{slategray('ECTS per passed exam')} "\
|
1202
|
+
"are: ".ljust(ljust_n_times)
|
1203
|
+
e left_padded_side+
|
1204
|
+
sfancy(
|
1205
|
+
(ects_per_exams_passed.to_s+' ECTS').rjust(rjust_n_times)
|
1206
|
+
)
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
# ========================================================================= #
|
1210
|
+
# === show_the_summary
|
1211
|
+
#
|
1212
|
+
# To use this method from the commandline, do:
|
1213
|
+
#
|
1214
|
+
# emo --summary
|
1215
|
+
#
|
1216
|
+
# ========================================================================= #
|
1217
|
+
def show_the_summary
|
1218
|
+
determine_n_ects_points_in_total
|
1219
|
+
determine_n_exams_in_total_were_passed
|
1220
|
+
determine_n_hours_were_passed_in_total # <- How many hours were passed in total.
|
1221
|
+
# ======================================================================= #
|
1222
|
+
# Next report our findings:
|
1223
|
+
# ======================================================================= #
|
1224
|
+
report_how_many_exams_were_passed_in_total(@n_exams_in_total_passed)
|
1225
|
+
report_how_many_hours_were_passed_in_total
|
1226
|
+
report_how_many_ects_points_have_been_gathered_so_far
|
1227
|
+
if @show_average_ects_passed_per_exam
|
1228
|
+
report_the_average_amount_of_ects_per_passed_exam
|
1229
|
+
end
|
1230
|
+
report_the_average_grade
|
1231
|
+
end; alias show_only_the_summary show_the_summary # === show_only_the_summary
|
1232
|
+
|
1233
|
+
# ========================================================================= #
|
1234
|
+
# === determine_n_hours_were_passed_in_total
|
1235
|
+
# ========================================================================= #
|
1236
|
+
def determine_n_hours_were_passed_in_total
|
1237
|
+
i = @hash.values.map {|entry| entry[0].to_f }.sum.to_f
|
1238
|
+
@n_hours_passed_in_total = i
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
# ========================================================================= #
|
1242
|
+
# === report_how_many_exams_were_passed_in_total
|
1243
|
+
# ========================================================================= #
|
1244
|
+
def report_how_many_exams_were_passed_in_total(
|
1245
|
+
i = @n_exams_in_total_passed,
|
1246
|
+
ljust_n_times = 76,
|
1247
|
+
n_rjust = 4
|
1248
|
+
)
|
1249
|
+
if ljust_n_times == :default
|
1250
|
+
ljust_n_times = 76
|
1251
|
+
end
|
1252
|
+
e (
|
1253
|
+
"In total, #{slategray('n exams')} have been passed:"
|
1254
|
+
).ljust(ljust_n_times)+
|
1255
|
+
sfancy(i.to_s.rjust(n_rjust))
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
# ========================================================================= #
|
1259
|
+
# === report_how_many_hours_were_passed_in_total
|
1260
|
+
#
|
1261
|
+
# This method will report how many hours were passed in total.
|
1262
|
+
# ========================================================================= #
|
1263
|
+
def report_how_many_hours_were_passed_in_total(
|
1264
|
+
i = @n_hours_passed_in_total,
|
1265
|
+
n_ljust = 76,
|
1266
|
+
n_rjust = 6
|
1267
|
+
)
|
1268
|
+
if n_ljust == :default
|
1269
|
+
n_ljust = 76
|
1270
|
+
end
|
1271
|
+
left_side_string = "In total, #{slategray('n hours')} were completed: ".ljust(n_ljust)
|
1272
|
+
# ======================================================================= #
|
1273
|
+
# Since as of 04.03.2020 the result is rounded, since otherwise the
|
1274
|
+
# display may include parts such as "00001", which we don't want here.
|
1275
|
+
# ======================================================================= #
|
1276
|
+
i = i.round(1) if i.is_a? Float
|
1277
|
+
e left_side_string+
|
1278
|
+
sfancy(i.to_s.rjust(n_rjust))
|
1279
|
+
end
|
1280
|
+
|
1281
|
+
end; end
|