studium 0.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of studium might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +3211 -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/cycle +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/display_lecture_url +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/from_curriculum_id_to_university +9 -0
- data/bin/location_to_this_exam_topic.rb +7 -0
- data/bin/mandatory_continuous_assessment +7 -0
- data/bin/mandatory_upcoming_courses +10 -0
- data/bin/n_ECTS +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_exams +7 -0
- data/bin/passed_pr/303/274fungsimmanente_courses +7 -0
- data/bin/pdf_for +7 -0
- data/bin/random_exam_topic +7 -0
- data/bin/report_solved_topics +7 -0
- data/bin/return_n_ects_from_this_file +7 -0
- data/bin/return_n_questions_solved_in_total +7 -0
- data/bin/rti_conflict +7 -0
- data/bin/search_for_n_ects +7 -0
- data/bin/show_lectures_on_the_commandline +7 -0
- data/bin/show_passed_exams_having_this_grade +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/ECTS_CONSIDERATIONS.md +82 -0
- data/doc/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER.md +44 -0
- data/doc/README.gen +3164 -0
- data/doc/SQL_database_specification/SQL_database_specification.md +46 -0
- data/doc/deprecated_components/deprecated_components.md +46 -0
- data/doc/documentation_for_the_file_lecture_information/documentation_for_the_file_lecture_information.md +311 -0
- data/doc/elegant_colours/elegant_colours.md +21 -0
- data/doc/statistics/yearly_statistics.md +8 -0
- data/doc/todo/todo_for_the_graphical_parts_of_the_studium_gem_including_www_related_aspects.md +92 -0
- data/doc/todo/todo_for_the_studium_gem.md +55 -0
- data/img/STUDIES.png +0 -0
- data/lib/studium/autoinclude.rb +7 -0
- data/lib/studium/base/base.rb +3229 -0
- data/lib/studium/base/colours.rb +246 -0
- data/lib/studium/base/commandline_arguments_module/commandline_arguments_module.rb +115 -0
- data/lib/studium/base/prototype/prototype.rb +230 -0
- data/lib/studium/base/runmode_module/runmode_module.rb +103 -0
- data/lib/studium/c/README.md +2 -0
- data/lib/studium/c/a.out +0 -0
- data/lib/studium/c/obtain_random_entry.c +11 -0
- data/lib/studium/check_and_sanitize/README.md +15 -0
- data/lib/studium/check_and_sanitize/check_curriculum_for_correct_separation_of_bachelor_and_master.rb +141 -0
- data/lib/studium/check_and_sanitize/check_for_all_exam_topics_being_registered.rb +118 -0
- data/lib/studium/check_and_sanitize/check_for_correct_themes_of_each_course.rb +100 -0
- data/lib/studium/check_and_sanitize/check_for_existing_description_of_this_lecture.rb +194 -0
- data/lib/studium/check_and_sanitize/check_important_exams.rb +132 -0
- data/lib/studium/check_and_sanitize/check_the_lecture_information_file.rb +166 -0
- data/lib/studium/check_and_sanitize/find_duplicate_lectures.rb +124 -0
- data/lib/studium/check_and_sanitize/missing_priority_entry.rb +44 -0
- data/lib/studium/check_and_sanitize/sanitize_lecture_information.rb +427 -0
- data/lib/studium/check_and_sanitize/sanitize_this_string_containing_the_lva_dates.rb +79 -0
- data/lib/studium/colours/colours.rb +587 -0
- data/lib/studium/colours/sfancy.rb +49 -0
- data/lib/studium/colours/sfile.rb +39 -0
- data/lib/studium/colours/simp.rb +40 -0
- data/lib/studium/colours/use_colours.rb +39 -0
- data/lib/studium/colours/use_this_colour_for_exam_questions_and_exam_answers.rb +80 -0
- data/lib/studium/commandline/commandline.rb +1839 -0
- data/lib/studium/constants/colours.rb +16 -0
- data/lib/studium/constants/constants.rb +533 -0
- data/lib/studium/constants/curricula_related_constants.rb +504 -0
- data/lib/studium/constants/exam_topics.rb +156 -0
- data/lib/studium/constants/file_lecture_information.rb +55 -0
- data/lib/studium/constants/image_constants.rb +272 -0
- data/lib/studium/constants/regexes.rb +58 -0
- data/lib/studium/constants/roebe_specific_constants.rb +216 -0
- data/lib/studium/constants/standalone_constants.rb +372 -0
- data/lib/studium/constants/web_constants.rb +28 -0
- data/lib/studium/css/project.css +267 -0
- data/lib/studium/curricula/attribute_lecture_to_curriculum/attribute_boku_lecture_to_curriculum.rb +384 -0
- data/lib/studium/curricula/attribute_lecture_to_curriculum/attribute_lecture_to_curriculum.rb +238 -0
- data/lib/studium/curricula/curricula_from_this_website/curricula_from_this_website.rb +141 -0
- data/lib/studium/curricula/curriculum.rb +213 -0
- data/lib/studium/curricula/curriculum_as_string.rb +280 -0
- data/lib/studium/curricula/curriculum_module_displayer/constants.rb +33 -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 +74 -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 +11 -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 +151 -0
- data/lib/studium/curricula/determine_curricula/misc.rb +403 -0
- data/lib/studium/curricula/determine_curricula/report.rb +143 -0
- data/lib/studium/curricula/determine_curricula/reset.rb +59 -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 +90 -0
- data/lib/studium/curricula/handle_curricula/README.md +9 -0
- data/lib/studium/curricula/handle_curricula/handle_curricula.rb +100 -0
- data/lib/studium/curricula/handle_curricula/misc.rb +798 -0
- data/lib/studium/curricula/mitteilungsbl/303/244tter/mitteilungsbl/303/244tter.rb +323 -0
- data/lib/studium/curricula/modules/display_on_the_commandline.rb +319 -0
- data/lib/studium/curricula/modules/return_n_ects_in_this_module.rb +75 -0
- data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +75 -0
- data/lib/studium/curricula/prepare_individual_curriculum.rb +304 -0
- data/lib/studium/curricula/random_curriculum_creator/random_curriculum_creator.rb +164 -0
- data/lib/studium/curricula/show_all_unfinished_courses_of_this_curriculum/show_all_unfinished_courses_of_this_curriculum.rb +116 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum.rb +114 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/show_lectures_of_this_curriculum_id.rb +554 -0
- data/lib/studium/curricula/show_solved_percentage_among_the_registered_curricula.rb +87 -0
- data/lib/studium/curricula/sorted_individual_curricula.rb +121 -0
- data/lib/studium/ects/boku_ects_splitter.rb +128 -0
- data/lib/studium/ects/ects_per_university/ects_per_university.rb +179 -0
- data/lib/studium/ects/ects_scanner.rb +141 -0
- data/lib/studium/ects/ects_to_university_parser.rb +142 -0
- data/lib/studium/ects/last_entry_is_curriculum.rb +150 -0
- data/lib/studium/ects/n_ects_in_these_lectures.rb +196 -0
- data/lib/studium/ects/n_ects_points_in_mandatory_presence_courses.rb +50 -0
- data/lib/studium/ects/return_n_ects_from_this_file.rb +59 -0
- data/lib/studium/ects/return_n_ects_from_this_url.rb +197 -0
- data/lib/studium/ects/search_for_n_ects/OLD_search_for_n_ects.rb +0 -0
- data/lib/studium/ects/search_for_n_ects/search_for_n_ects.rb +719 -0
- data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +232 -0
- data/lib/studium/ects/show_passed_credits_per_curriculum.rb +276 -0
- data/lib/studium/ects/simple_total_ects_points.rb +135 -0
- data/lib/studium/ects/solved_ects/constants.rb +19 -0
- data/lib/studium/ects/solved_ects/reset.rb +51 -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 +129 -0
- data/lib/studium/ects/sum_of_ects.rb +144 -0
- data/lib/studium/encoding/encoding.rb +109 -0
- data/lib/studium/exam_topics/RNAi_siRNA_and_miRNA +100 -0
- data/lib/studium/exam_topics/abfall_als_ressource +86 -0
- data/lib/studium/exam_topics/advanced_biochemistry +927 -0
- data/lib/studium/exam_topics/advanced_biotechnology +234 -0
- data/lib/studium/exam_topics/advanced_cellbiology +219 -0
- data/lib/studium/exam_topics/advanced_chemistry +527 -0
- data/lib/studium/exam_topics/advanced_immunology +152 -0
- data/lib/studium/exam_topics/advanced_microbiology +44 -0
- data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +109 -0
- data/lib/studium/exam_topics/advanced_virology +245 -0
- data/lib/studium/exam_topics/ageing +153 -0
- data/lib/studium/exam_topics/agrar_ecology +67 -0
- data/lib/studium/exam_topics/agrarmarkt +73 -0
- data/lib/studium/exam_topics/agrarphysik +35 -0
- data/lib/studium/exam_topics/alcohols +31 -0
- data/lib/studium/exam_topics/algorithms +77 -0
- data/lib/studium/exam_topics/allergie +76 -0
- data/lib/studium/exam_topics/allgemeine_genetik +1006 -0
- data/lib/studium/exam_topics/allgemeine_mikrobiologie +1008 -0
- data/lib/studium/exam_topics/aminoacids +464 -0
- data/lib/studium/exam_topics/analytische_chemie_1 +133 -0
- data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
- data/lib/studium/exam_topics/anatomie +295 -0
- data/lib/studium/exam_topics/anorganische_chemie +350 -0
- data/lib/studium/exam_topics/anthropologie +138 -0
- data/lib/studium/exam_topics/antibodies_and_antigens +791 -0
- data/lib/studium/exam_topics/apoptosis +35 -0
- data/lib/studium/exam_topics/archaea +112 -0
- data/lib/studium/exam_topics/archaeo_viruses +7 -0
- data/lib/studium/exam_topics/architecture +8 -0
- data/lib/studium/exam_topics/artificial_intelligence +89 -0
- data/lib/studium/exam_topics/atomemissionsspektrometrie +6 -0
- data/lib/studium/exam_topics/audio +11 -0
- data/lib/studium/exam_topics/bacteriophages +266 -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 +1007 -0
- data/lib/studium/exam_topics/bauwesen +6 -0
- data/lib/studium/exam_topics/betriebssysteme +128 -0
- data/lib/studium/exam_topics/betriebswirtschaftslehre +29 -0
- data/lib/studium/exam_topics/bioanalytik_und_biosensoren +391 -0
- data/lib/studium/exam_topics/biochips +79 -0
- data/lib/studium/exam_topics/bioelektrochemie +57 -0
- data/lib/studium/exam_topics/biofilms +54 -0
- data/lib/studium/exam_topics/bioinformatics +511 -0
- data/lib/studium/exam_topics/biological_therapeutics +156 -0
- data/lib/studium/exam_topics/biologie +149 -0
- data/lib/studium/exam_topics/biomarkers +137 -0
- data/lib/studium/exam_topics/biomaterials +90 -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 +149 -0
- data/lib/studium/exam_topics/bioressourcenmanagement +78 -0
- data/lib/studium/exam_topics/birds +5 -0
- data/lib/studium/exam_topics/bodenkunde +384 -0
- data/lib/studium/exam_topics/bodenmikrobiologie +40 -0
- data/lib/studium/exam_topics/cancerbiology +484 -0
- data/lib/studium/exam_topics/cell_cultures +229 -0
- data/lib/studium/exam_topics/cellbiology +1011 -0
- data/lib/studium/exam_topics/cellular_transport_and_protein_secretion +27 -0
- data/lib/studium/exam_topics/cellular_vesicles +11 -0
- data/lib/studium/exam_topics/cellulose +6 -0
- data/lib/studium/exam_topics/chemische_technologie_anorganischer_stoffe +209 -0
- data/lib/studium/exam_topics/chemische_technologie_organischer_stoffe +25 -0
- data/lib/studium/exam_topics/chemisches_labor +60 -0
- data/lib/studium/exam_topics/chemokines_and_cytokines +45 -0
- data/lib/studium/exam_topics/chemotaxis_quorum_sensing_and_motility_in_prokaryotes +116 -0
- data/lib/studium/exam_topics/citric_acid_cycle +84 -0
- data/lib/studium/exam_topics/clinical_microbiology +516 -0
- data/lib/studium/exam_topics/computer_science +308 -0
- data/lib/studium/exam_topics/computer_vision_and_computer_graphics +13 -0
- data/lib/studium/exam_topics/crispr +51 -0
- data/lib/studium/exam_topics/cyanobacteria +44 -0
- data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +579 -0
- data/lib/studium/exam_topics/databases_and_sql +126 -0
- data/lib/studium/exam_topics/dna_mutation_and_dna_repair +70 -0
- data/lib/studium/exam_topics/dna_replication +67 -0
- data/lib/studium/exam_topics/ecogenetics +26 -0
- data/lib/studium/exam_topics/ecological_agriculture +12 -0
- data/lib/studium/exam_topics/ecology +330 -0
- data/lib/studium/exam_topics/economy +218 -0
- data/lib/studium/exam_topics/electron_microscopy +7 -0
- data/lib/studium/exam_topics/elektronenmikroskopie +356 -0
- data/lib/studium/exam_topics/elektrophorese +132 -0
- data/lib/studium/exam_topics/elektrotechnik_und_elektrizit/303/244t +42 -0
- data/lib/studium/exam_topics/elisa +55 -0
- data/lib/studium/exam_topics/embryologie_und_entwicklung +650 -0
- data/lib/studium/exam_topics/endospores_and_spores +104 -0
- data/lib/studium/exam_topics/enzymes_and_cofactors +393 -0
- data/lib/studium/exam_topics/epigenetik +187 -0
- data/lib/studium/exam_topics/erste_hilfe +174 -0
- data/lib/studium/exam_topics/ethik +143 -0
- data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +367 -0
- data/lib/studium/exam_topics/excel +7 -0
- data/lib/studium/exam_topics/fish +19 -0
- data/lib/studium/exam_topics/fluorescence_microscopy +10 -0
- data/lib/studium/exam_topics/food_microbiology_and_food_biotechnology +92 -0
- data/lib/studium/exam_topics/forensik +11 -0
- data/lib/studium/exam_topics/forstwirtschaft +53 -0
- data/lib/studium/exam_topics/fortgeschrittene_genetik +643 -0
- data/lib/studium/exam_topics/fortgeschrittene_gentechnik +218 -0
- data/lib/studium/exam_topics/fortgeschrittene_physik +6 -0
- data/lib/studium/exam_topics/fungi +119 -0
- data/lib/studium/exam_topics/genetische_krankheiten +198 -0
- data/lib/studium/exam_topics/genexpression +1008 -0
- data/lib/studium/exam_topics/genomics_and_metagenomics +280 -0
- data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +954 -0
- data/lib/studium/exam_topics/geochemistry +67 -0
- data/lib/studium/exam_topics/geography +9 -0
- data/lib/studium/exam_topics/geologie_und_mineralogie +624 -0
- data/lib/studium/exam_topics/geometrie +56 -0
- data/lib/studium/exam_topics/geschichte +95 -0
- data/lib/studium/exam_topics/gluconeogenesis +72 -0
- data/lib/studium/exam_topics/glycogen +45 -0
- data/lib/studium/exam_topics/glycolysis +118 -0
- data/lib/studium/exam_topics/glykomik +121 -0
- data/lib/studium/exam_topics/glyoxylatzyklus +31 -0
- data/lib/studium/exam_topics/grassland_cultivation +32 -0
- data/lib/studium/exam_topics/hormone +148 -0
- data/lib/studium/exam_topics/html +8 -0
- data/lib/studium/exam_topics/human_ecology +8 -0
- data/lib/studium/exam_topics/hygiene +224 -0
- data/lib/studium/exam_topics/imaging_and_microscopy +267 -0
- data/lib/studium/exam_topics/immunanalytik +94 -0
- data/lib/studium/exam_topics/immunologie +1011 -0
- data/lib/studium/exam_topics/informatik +117 -0
- data/lib/studium/exam_topics/innate_immunity +42 -0
- data/lib/studium/exam_topics/insekten +64 -0
- data/lib/studium/exam_topics/insulin_and_diabetes +57 -0
- data/lib/studium/exam_topics/java +618 -0
- data/lib/studium/exam_topics/javascript +20 -0
- data/lib/studium/exam_topics/klima +6 -0
- data/lib/studium/exam_topics/kryptographie +9 -0
- data/lib/studium/exam_topics/landtechnik +26 -0
- data/lib/studium/exam_topics/lebensmittel_und_getr/303/244nke +223 -0
- data/lib/studium/exam_topics/lebensmitteltechnologie +16 -0
- data/lib/studium/exam_topics/light_microscopy +19 -0
- data/lib/studium/exam_topics/linux_and_unix +36 -0
- data/lib/studium/exam_topics/lipids +141 -0
- data/lib/studium/exam_topics/macroeconomics +39 -0
- data/lib/studium/exam_topics/marketing +7 -0
- data/lib/studium/exam_topics/mathematics +297 -0
- data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +254 -0
- data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +437 -0
- data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
- data/lib/studium/exam_topics/metabolismus +478 -0
- data/lib/studium/exam_topics/meteorologie_und_atmosph/303/244re +120 -0
- data/lib/studium/exam_topics/microbial_ecology +36 -0
- data/lib/studium/exam_topics/microcontrollers +11 -0
- data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +54 -0
- data/lib/studium/exam_topics/mikrobielle_physiologie +285 -0
- data/lib/studium/exam_topics/mitochondria +40 -0
- data/lib/studium/exam_topics/mixed +287 -0
- data/lib/studium/exam_topics/molecular_biology_of_plants +272 -0
- data/lib/studium/exam_topics/molekulare_medizin +133 -0
- data/lib/studium/exam_topics/nanotechnologie +453 -0
- data/lib/studium/exam_topics/nature_conservation_and_biodiversity +244 -0
- data/lib/studium/exam_topics/naturstoffe +9 -0
- data/lib/studium/exam_topics/netzwerke +63 -0
- data/lib/studium/exam_topics/neurobiology +307 -0
- data/lib/studium/exam_topics/nucleotide_sequencing +41 -0
- data/lib/studium/exam_topics/nutztierethologie +11 -0
- data/lib/studium/exam_topics/object_oriented_modeling +14 -0
- data/lib/studium/exam_topics/obstbau +249 -0
- data/lib/studium/exam_topics/organische_chemie +1007 -0
- data/lib/studium/exam_topics/organische_chemie_2 +136 -0
- data/lib/studium/exam_topics/paleobiology +39 -0
- data/lib/studium/exam_topics/parasitic_diseases_and_molecular_infection_biology +336 -0
- data/lib/studium/exam_topics/patent_law +55 -0
- data/lib/studium/exam_topics/pathologie +731 -0
- data/lib/studium/exam_topics/pcr +155 -0
- data/lib/studium/exam_topics/pentosephosphatweg +61 -0
- data/lib/studium/exam_topics/peroxisomes_glycosomes_and_lysosomes +66 -0
- data/lib/studium/exam_topics/pflanzenanatomie +261 -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 +251 -0
- data/lib/studium/exam_topics/physik +446 -1
- data/lib/studium/exam_topics/physikalische_chemie +79 -0
- data/lib/studium/exam_topics/physiology_and_histology +536 -0
- data/lib/studium/exam_topics/phytochemie +33 -0
- data/lib/studium/exam_topics/plant_biotechnology +131 -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 +138 -0
- data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +197 -0
- data/lib/studium/exam_topics/projektmanagement +220 -0
- data/lib/studium/exam_topics/prokaryote_genetics +562 -0
- data/lib/studium/exam_topics/protein_engineering +35 -0
- data/lib/studium/exam_topics/proteolyse +38 -0
- data/lib/studium/exam_topics/proteomik +41 -0
- data/lib/studium/exam_topics/protozoans +24 -0
- data/lib/studium/exam_topics/prozesstechnik +95 -0
- data/lib/studium/exam_topics/psychologie +18 -0
- data/lib/studium/exam_topics/python +372 -0
- data/lib/studium/exam_topics/quality_management +266 -0
- data/lib/studium/exam_topics/rechtsgrundlagen +123 -0
- data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
- data/lib/studium/exam_topics/rna_and_dna +519 -0
- data/lib/studium/exam_topics/rna_seq +13 -0
- data/lib/studium/exam_topics/robotics +12 -0
- data/lib/studium/exam_topics/ruby +238 -0
- data/lib/studium/exam_topics/ruby_on_rails +63 -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 +183 -0
- data/lib/studium/exam_topics/signal_transduction_and_laser_systems +212 -0
- data/lib/studium/exam_topics/sozialbiologie +9 -0
- data/lib/studium/exam_topics/splicing_exons_and_introns +65 -0
- data/lib/studium/exam_topics/statistik +268 -0
- data/lib/studium/exam_topics/stemcells +181 -0
- data/lib/studium/exam_topics/stickstofffixierung +91 -0
- data/lib/studium/exam_topics/structural_bioinformatics +54 -0
- data/lib/studium/exam_topics/strukturbiologie +423 -0
- data/lib/studium/exam_topics/system_biology_and_synthetic_biology +108 -0
- data/lib/studium/exam_topics/systematische_zoologie +439 -0
- data/lib/studium/exam_topics/technical_ecology +144 -0
- data/lib/studium/exam_topics/technische_chemie +208 -0
- data/lib/studium/exam_topics/technische_grundlagen_der_informatik +39 -0
- data/lib/studium/exam_topics/technische_mikrobiologie +393 -0
- data/lib/studium/exam_topics/technisches_zeichnen +5 -0
- data/lib/studium/exam_topics/the_bacterial_cell_wall +98 -0
- data/lib/studium/exam_topics/the_c_plus_plus_programming_language +531 -0
- data/lib/studium/exam_topics/the_c_programming_language +133 -0
- data/lib/studium/exam_topics/the_cellcycle +98 -0
- data/lib/studium/exam_topics/the_european_union +121 -0
- data/lib/studium/exam_topics/the_interferon_system +39 -0
- data/lib/studium/exam_topics/the_microbiome +164 -0
- data/lib/studium/exam_topics/the_universe +31 -0
- data/lib/studium/exam_topics/theoretische_chemie +5 -0
- data/lib/studium/exam_topics/theoretische_informatik +161 -0
- data/lib/studium/exam_topics/thermodynamics +21 -0
- data/lib/studium/exam_topics/tierzucht +139 -0
- data/lib/studium/exam_topics/toxikologie +453 -0
- data/lib/studium/exam_topics/transcription +185 -0
- data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +154 -0
- data/lib/studium/exam_topics/umweltbiotechnologie +64 -0
- data/lib/studium/exam_topics/umweltchemie +233 -0
- data/lib/studium/exam_topics/urbanism_and_traffic +19 -0
- data/lib/studium/exam_topics/urea_cycle +56 -0
- data/lib/studium/exam_topics/vaccines_and_vaccination +250 -0
- data/lib/studium/exam_topics/vectors_and_gene_therapy +247 -0
- data/lib/studium/exam_topics/verfahrenstechnik +37 -0
- data/lib/studium/exam_topics/verhaltensbiologie +56 -0
- data/lib/studium/exam_topics/veterinary_medicine +10 -0
- data/lib/studium/exam_topics/vitamine +32 -0
- data/lib/studium/exam_topics/wasserkunde +138 -0
- data/lib/studium/exam_topics/weinbau +86 -0
- data/lib/studium/exam_topics/wissenschaft +20 -0
- data/lib/studium/exam_topics/yeast +104 -0
- data/lib/studium/exam_topics/zoologie +334 -0
- data/lib/studium/exams/afterburn/afterburn.rb +304 -0
- data/lib/studium/exams/ask_exam_from_the_upcoming_exams_pool.rb +150 -0
- data/lib/studium/exams/ask_exam_question/ask_exam_question.rb +2757 -0
- data/lib/studium/exams/ask_exam_topic_question.rb +112 -0
- data/lib/studium/exams/ask_question_from_alias.rb +141 -0
- data/lib/studium/exams/ask_question_from_any_of_the_still_missing_lectures.rb +130 -0
- data/lib/studium/exams/ask_question_from_grouped_themes.rb +141 -0
- data/lib/studium/exams/ask_question_from_last_topic.rb +91 -0
- data/lib/studium/exams/ask_random_question.rb +195 -0
- data/lib/studium/exams/autoinclude.rb +7 -0
- data/lib/studium/exams/average_grade/average_grade.rb +402 -0
- data/lib/studium/exams/csv/create_csv_passed_exams_file.rb +217 -0
- data/lib/studium/exams/cycle.rb +291 -0
- data/lib/studium/exams/dataset/dataset.rb +128 -0
- data/lib/studium/exams/designate_ten_random_exam_topics/designate_ten_random_exam_topics.rb +88 -0
- data/lib/studium/exams/exam/exam.rb +130 -0
- data/lib/studium/exams/exam_bubble/exam_bubble.rb +445 -0
- data/lib/studium/exams/exam_bubble/menu_for_the_main_loop.rb +111 -0
- data/lib/studium/exams/exam_question/README.md +3 -0
- data/lib/studium/exams/exam_question/exam_question.rb +427 -0
- data/lib/studium/exams/exam_registration_at/constants.rb +49 -0
- data/lib/studium/exams/exam_registration_at/exam_registration_at.rb +242 -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_and_show.rb +133 -0
- data/lib/studium/exams/exam_registration_at/reset.rb +54 -0
- data/lib/studium/exams/exam_statistics_from_this_file/exam_statistics_from_this_file.rb +119 -0
- data/lib/studium/exams/exam_topics.rb +194 -0
- data/lib/studium/exams/exams.rb +20 -0
- data/lib/studium/exams/exams_per_month/exams_per_month.rb +2429 -0
- data/lib/studium/exams/exams_this_week.rb +182 -0
- data/lib/studium/exams/fix_exam_dates.rb +121 -0
- data/lib/studium/exams/frozen.rb +36 -0
- data/lib/studium/exams/last_exams/last_exams.rb +398 -0
- data/lib/studium/exams/lectures_without_exam_entry.rb +137 -0
- data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1359 -0
- data/lib/studium/exams/move_all_unsolved_exam_questions_to_the_top_of_the_file.rb +173 -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 +111 -0
- data/lib/studium/exams/n_exams_in_these_topics.rb +477 -0
- data/lib/studium/exams/next_exam.rb +107 -0
- data/lib/studium/exams/next_exams.rb +378 -0
- data/lib/studium/exams/open_exam_associated_url/open_exam_associated_url.rb +154 -0
- data/lib/studium/exams/open_last_exam_question_asked_file/constants.rb +15 -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 +110 -0
- data/lib/studium/exams/push_solved_questions_on_top.rb +180 -0
- data/lib/studium/exams/questions_solved_from_day_to_day/questions_solved_from_day_to_day.rb +374 -0
- data/lib/studium/exams/remote_ftp_url.rb +52 -0
- data/lib/studium/exams/repeat_last_question.rb +78 -0
- data/lib/studium/exams/report_total_amount_of_questions_and_answers_for.rb +116 -0
- data/lib/studium/exams/show_all_passed_exams_of_this_university.rb +252 -0
- data/lib/studium/exams/show_backlog_of_exams/show_backlog_of_exams.rb +116 -0
- data/lib/studium/exams/show_next_exams_for.rb +133 -0
- data/lib/studium/exams/show_themes/constants.rb +28 -0
- data/lib/studium/exams/show_themes/menu.rb +61 -0
- data/lib/studium/exams/show_themes/misc.rb +537 -0
- data/lib/studium/exams/show_themes/reset.rb +62 -0
- data/lib/studium/exams/show_themes/show_themes.rb +27 -0
- data/lib/studium/exams/show_upcoming_exams/show_upcoming_exams.rb +1375 -0
- data/lib/studium/exams/solve_all_questions_from_this_topic.rb +114 -0
- data/lib/studium/exams/solved/constants.rb +32 -0
- data/lib/studium/exams/solved/help.rb +24 -0
- data/lib/studium/exams/solved/initialize.rb +55 -0
- data/lib/studium/exams/solved/menu.rb +41 -0
- data/lib/studium/exams/solved/reset.rb +28 -0
- data/lib/studium/exams/solved/solved.rb +326 -0
- data/lib/studium/exams/timetable/constants.rb +142 -0
- data/lib/studium/exams/timetable/timetable.rb +450 -0
- data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +163 -0
- data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +556 -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 +247 -0
- data/lib/studium/exams/upcoming_registered_exams/upcoming_registered_exams.rb +257 -0
- data/lib/studium/exams/upload_exam_topics.rb +360 -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/gtk3/README.md +1 -0
- data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.config +6 -0
- data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.rb +760 -0
- data/lib/studium/gui/gtk3/ask_exam_question/manifest.yml +12 -0
- data/lib/studium/gui/gtk3/control_panel/control_panel.rb +39 -0
- data/lib/studium/gui/gtk3/curriculum_viewer/curriculum_viewer.rb +513 -0
- data/lib/studium/gui/gtk3/ects_per_university/ects_per_university.rb +217 -0
- data/lib/studium/gui/gtk3/exam_question_widget/exam_question_widget.rb +1889 -0
- data/lib/studium/gui/gtk3/expand_time_range/expand_time_range.rb +34 -0
- data/lib/studium/gui/gtk3/information_about_a_lecture/information_about_a_lecture.rb +34 -0
- data/lib/studium/gui/gtk3/lecture_information/lecture_information.rb +200 -0
- data/lib/studium/gui/gtk3/show_upcoming_exams/show_upcoming_exams.rb +34 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion$1.class +0 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion.class +0 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion.java +215 -0
- data/lib/studium/gui/javafx/exam_question_widget/exam_question_widget.rb +58 -0
- data/lib/studium/gui/jruby/exam_question_widget/exam_question_widget.rb +317 -0
- data/lib/studium/gui/libui/ask_exam_question/ask_exam_question.rb +349 -0
- data/lib/studium/gui/shared_code/control_panel/control_panel_module.rb +314 -0
- data/lib/studium/gui/shared_code/exam_question_widget/exam_question_widget_module.rb +39 -0
- data/lib/studium/gui/shared_code/expand_time_range/expand_time_range.css +0 -0
- data/lib/studium/gui/shared_code/expand_time_range/expand_time_range_module.rb +190 -0
- data/lib/studium/gui/shared_code/information_about_a_lecture/information_about_a_lecture_module.rb +180 -0
- data/lib/studium/gui/shared_code/show_upcoming_exams/show_upcoming_exams_module.rb +206 -0
- data/lib/studium/images/libui_ask_exam_question.png +0 -0
- data/lib/studium/images/outdated.png +0 -0
- data/lib/studium/images/small_logos/DNA.png +0 -0
- data/lib/studium/images/small_logos/README.md +2 -0
- data/lib/studium/images/small_logos/solved.png +0 -0
- data/lib/studium/images/studies_favicon.png +0 -0
- data/lib/studium/java/README.md +5 -0
- data/lib/studium/java/studium/AskExamQuestion.java +461 -0
- data/lib/studium/java/studium/Base.java +123 -0
- data/lib/studium/java/studium/Constants.java +122 -0
- data/lib/studium/java/studium/EnsureThatTheLogDirectoryExists.java +57 -0
- data/lib/studium/java/studium/Mkdir.java +13 -0
- data/lib/studium/java/studium/OpenLastExamQuestionurlLinkViaTheBrowser.java +90 -0
- data/lib/studium/java/studium/ReturnNQuestionsSolvedInTotal.java +69 -0
- data/lib/studium/java/studium/Solved.java +112 -0
- data/lib/studium/java/studium/Test.java +60 -0
- data/lib/studium/java/studium/studium/AskExamQuestion.class +0 -0
- data/lib/studium/java/studium/studium/Base.class +0 -0
- data/lib/studium/java/studium/studium/Constants.class +0 -0
- data/lib/studium/java/studium/studium/EnsureThatTheLogDirectoryExists.class +0 -0
- data/lib/studium/java/studium/studium/Mkdir.class +0 -0
- data/lib/studium/java/studium/studium/OpenLastExamQuestionurlLinkViaTheBrowser.class +0 -0
- data/lib/studium/java/studium/studium/ReturnNQuestionsSolvedInTotal.class +0 -0
- data/lib/studium/java/studium/studium/Solved.class +0 -0
- data/lib/studium/java/studium/studium/Test.class +0 -0
- data/lib/studium/jobs/jobs.rb +80 -0
- data/lib/studium/logging/README.md +2 -0
- data/lib/studium/logging/ensure_that_the_log_directory_exists.rb +58 -0
- data/lib/studium/logging/html_log_directory.rb +42 -0
- data/lib/studium/logging/log_directory.rb +112 -0
- data/lib/studium/logging/store_last_question_asked_into_file.rb +137 -0
- data/lib/studium/parsers/README.md +2 -0
- data/lib/studium/parsers/custom_exam_results_parser.rb +209 -0
- data/lib/studium/parsers/parse_lva_dates.rb +233 -0
- data/lib/studium/parsers/parse_remote_lecture.rb +331 -0
- data/lib/studium/project/project.rb +88 -0
- data/lib/studium/requires/common_popular_requires.rb +37 -0
- data/lib/studium/requires/commonly_used_requires.rb +14 -0
- data/lib/studium/requires/require_class_exams_solved.rb +7 -0
- data/lib/studium/requires/require_ects_scripts.rb +27 -0
- data/lib/studium/requires/require_encoding.rb +7 -0
- data/lib/studium/requires/require_the_check_and_sanitize_files.rb +31 -0
- data/lib/studium/requires/require_the_curricula_files.rb +28 -0
- data/lib/studium/requires/require_the_exam_question_class.rb +7 -0
- data/lib/studium/requires/require_the_exams_files.rb +46 -0
- data/lib/studium/requires/require_the_logging_files.rb +23 -0
- data/lib/studium/requires/require_the_parsers.rb +28 -0
- data/lib/studium/requires/require_the_studium_constants.rb +10 -0
- data/lib/studium/requires/require_the_studium_project.rb +70 -0
- data/lib/studium/requires/require_the_toplevel_methods.rb +27 -0
- data/lib/studium/requires/require_the_utility_scripts.rb +34 -0
- data/lib/studium/requires/require_upcoming_exams.rb +7 -0
- data/lib/studium/requires/require_yaml.rb +7 -0
- data/lib/studium/requires/return_remote_homepage_of_this_lecture.rb +7 -0
- data/lib/studium/requires/with_GUI.rb +13 -0
- data/lib/studium/requires/www_mode.rb +17 -0
- data/lib/studium/statistics/README.md +4 -0
- data/lib/studium/statistics/best_exam_months.rb +92 -0
- data/lib/studium/statistics/curriculum_comparer/curriculum_comparer.rb +386 -0
- data/lib/studium/statistics/determine_exam_statistics_from_this_file.rb +142 -0
- data/lib/studium/statistics/exam_topics_that_are_about_to_be_completed.rb +119 -0
- data/lib/studium/statistics/max_stats.rb +170 -0
- data/lib/studium/statistics/new_questions_per_year.rb +147 -0
- data/lib/studium/statistics/report_how_many_ects_points_per_curriculum_were_completed.rb +167 -0
- data/lib/studium/statistics/report_how_many_exam_questions_were_answered.rb +474 -0
- data/lib/studium/statistics/show_exam_statistics.rb +66 -0
- data/lib/studium/statistics/show_which_courses_are_in_a_bachelor_or_master_curriculum_respectively.rb +104 -0
- data/lib/studium/statistics/top_stats.rb +127 -0
- data/lib/studium/toplevel_methods/all_passed_exams.rb +37 -0
- data/lib/studium/toplevel_methods/already_solved_this_lecture.rb +101 -0
- data/lib/studium/toplevel_methods/available_topics.rb +161 -0
- data/lib/studium/toplevel_methods/calculate_pr/303/274fungsimmanente_lectures_from_this_file.rb +55 -0
- data/lib/studium/toplevel_methods/copy_the_last_backup_of_file_lecture_information.rb +34 -0
- data/lib/studium/toplevel_methods/curriculum_related_code.rb +1038 -0
- data/lib/studium/toplevel_methods/does_this_course_require_mandatory_presence.rb +52 -0
- data/lib/studium/toplevel_methods/download.rb +161 -0
- data/lib/studium/toplevel_methods/e.rb +16 -0
- data/lib/studium/toplevel_methods/ects_from_lectures.rb +250 -0
- data/lib/studium/toplevel_methods/editor.rb +67 -0
- data/lib/studium/toplevel_methods/esystem.rb +29 -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 +3807 -0
- data/lib/studium/toplevel_methods/has_this_lecture_been_already_passed_but_the_id_was_changed_lateron.rb +42 -0
- data/lib/studium/toplevel_methods/has_this_module_been_completed.rb +208 -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 +27 -0
- data/lib/studium/toplevel_methods/is_this_exam_topic_included.rb +46 -0
- data/lib/studium/toplevel_methods/is_this_homepage_registered.rb +32 -0
- data/lib/studium/toplevel_methods/is_this_lecture_a_practical_course.rb +93 -0
- data/lib/studium/toplevel_methods/is_this_lecture_registered_in_upcoming_exams.rb +45 -0
- data/lib/studium/toplevel_methods/java.rb +32 -0
- data/lib/studium/toplevel_methods/lecture_information.rb +108 -0
- data/lib/studium/toplevel_methods/lva_numbers.rb +358 -0
- data/lib/studium/toplevel_methods/main_dataset.rb +73 -0
- data/lib/studium/toplevel_methods/map_input_to_this_curriculum_filename.rb +607 -0
- data/lib/studium/toplevel_methods/methods_related_to_files_and_directories.rb +481 -0
- data/lib/studium/toplevel_methods/misc.rb +580 -0
- data/lib/studium/toplevel_methods/n_questions_available.rb +141 -0
- data/lib/studium/toplevel_methods/n_topics_available.rb +63 -0
- data/lib/studium/toplevel_methods/names_of_all_solved_exams.rb +77 -0
- data/lib/studium/toplevel_methods/note_down_the_start_time_and_how_many_exams_have_been_already_solved.rb +69 -0
- data/lib/studium/toplevel_methods/opnn.rb +27 -0
- data/lib/studium/toplevel_methods/passed_this_exam_on.rb +105 -0
- data/lib/studium/toplevel_methods/read_delay_between_questions_from_file.rb +36 -0
- data/lib/studium/toplevel_methods/regexes.rb +90 -0
- data/lib/studium/toplevel_methods/registered_for_this_exam.rb +83 -0
- data/lib/studium/toplevel_methods/remove_comments.rb +27 -0
- data/lib/studium/toplevel_methods/remove_exam_topics_that_were_already_answered.rb +27 -0
- data/lib/studium/toplevel_methods/remove_tags.rb +35 -0
- data/lib/studium/toplevel_methods/report.rb +439 -0
- data/lib/studium/toplevel_methods/return_all_exams_on_this_day.rb +69 -0
- data/lib/studium/toplevel_methods/return_dataset_for_this_exam_topic.rb +45 -0
- data/lib/studium/toplevel_methods/return_ects_from_this_lecture_stored_in_the_file_lecture_information.rb +194 -0
- data/lib/studium/toplevel_methods/return_hash_of_already_solved_lectures.rb +46 -0
- data/lib/studium/toplevel_methods/return_last_exam_question.rb +34 -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 +90 -0
- data/lib/studium/toplevel_methods/return_n_questions_were_answered_for_this_topic.rb +62 -0
- data/lib/studium/toplevel_methods/return_proper_university_image.rb +86 -0
- data/lib/studium/toplevel_methods/return_question_answer_string_from_this_topic.rb +63 -0
- data/lib/studium/toplevel_methods/return_remote_homepage_of_this_lecture.rb +11311 -0
- data/lib/studium/toplevel_methods/return_remote_moodle_link_of_this_lecture.rb +2405 -0
- data/lib/studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb +110 -0
- data/lib/studium/toplevel_methods/return_theme_of_the_next_upcoming_exam.rb +40 -0
- data/lib/studium/toplevel_methods/runmode.rb +97 -0
- data/lib/studium/toplevel_methods/sanitized_dataset_from_file_passed_exams_per_month.rb +53 -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 +92 -0
- data/lib/studium/toplevel_methods/spacer.rb +18 -0
- data/lib/studium/toplevel_methods/time.rb +297 -0
- data/lib/studium/toplevel_methods/total_ects_points_passed.rb +73 -0
- data/lib/studium/toplevel_methods/try_to_guess_the_most_likely_lva_id.rb +58 -0
- data/lib/studium/toplevel_methods/try_to_return_the_expanded_name_of_this_lecture.rb +64 -0
- data/lib/studium/toplevel_methods/unfinished.rb +51 -0
- data/lib/studium/toplevel_methods/url.rb +106 -0
- data/lib/studium/toplevel_methods/verbose_truth.rb +36 -0
- data/lib/studium/toplevel_methods/when_was_this_lecture_passed.rb +54 -0
- data/lib/studium/toplevel_methods/word_wrap.rb +56 -0
- data/lib/studium/toplevel_methods/write_into_file_related_functionality.rb +197 -0
- data/lib/studium/toplevel_methods/yes_or_no_ja_oder_nein.rb +33 -0
- data/lib/studium/universities_in_austria/README.md +2 -0
- data/lib/studium/universities_in_austria/boku/README.md +4 -0
- data/lib/studium/universities_in_austria/boku/boku_/303/266ffnungszeiten.rb +28 -0
- data/lib/studium/universities_in_austria/boku/show_three_pillars_of_these_lectures.rb +110 -0
- data/lib/studium/universities_in_austria/boku/three_pillars.rb +237 -0
- data/lib/studium/universities_in_austria/tu_vienna/README.md +6 -0
- data/lib/studium/universities_in_austria/tu_vienna/tu_ferien.rb +42 -0
- data/lib/studium/universities_in_austria/tu_vienna/tu_/303/266ffnungszeiten.rb +34 -0
- data/lib/studium/university_course/university_course.rb +409 -0
- data/lib/studium/utility_scripts/attribute_lectures_to_university/attribute_lectures_to_university.rb +375 -0
- data/lib/studium/utility_scripts/audio_stats.rb +171 -0
- data/lib/studium/utility_scripts/auto_stud/auto_stud.rb +252 -0
- data/lib/studium/utility_scripts/auto_stud/constants.rb +18 -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 +93 -0
- data/lib/studium/utility_scripts/average_grade_of_this_curriculum.rb +155 -0
- data/lib/studium/utility_scripts/blocked_courses.rb +146 -0
- data/lib/studium/utility_scripts/calendar/README.md +2 -0
- data/lib/studium/utility_scripts/calendar/calendar.rb +251 -0
- data/lib/studium/utility_scripts/calendar/misc.rb +35 -0
- data/lib/studium/utility_scripts/check_description_of_these_lectures.rb +221 -0
- data/lib/studium/utility_scripts/course_registrations/course_registrations.rb +98 -0
- data/lib/studium/utility_scripts/courses/courses.rb +177 -0
- data/lib/studium/utility_scripts/create/README.md +2 -0
- data/lib/studium/utility_scripts/create/webpage_of_university.rb +129 -0
- data/lib/studium/utility_scripts/create/webpage_of_university_BOKU.rb +61 -0
- data/lib/studium/utility_scripts/create/webpage_of_university_TU.rb +60 -0
- data/lib/studium/utility_scripts/create/webpage_of_university_UniWien.rb +60 -0
- data/lib/studium/utility_scripts/create_database/create_database.rb +106 -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/currently_participating_in_these_lectures.rb +104 -0
- data/lib/studium/utility_scripts/display_lecture_url/display_lecture_url.rb +176 -0
- data/lib/studium/utility_scripts/expand_time_range/expand_time_range.rb +521 -0
- data/lib/studium/utility_scripts/finished_exams_at_this_university/finished_exams_at_this_university.rb +173 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/constants.rb +23 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/foreign_language_percentage.rb +149 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/help.rb +31 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/initialize.rb +25 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/menu.rb +158 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/report.rb +62 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/reset.rb +50 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/run.rb +19 -0
- data/lib/studium/utility_scripts/generate_spreadsheet/generate_spreadsheet.rb +354 -0
- data/lib/studium/utility_scripts/generate_spreadsheet/misc.rb +144 -0
- data/lib/studium/utility_scripts/holidays/holidays.rb +156 -0
- data/lib/studium/utility_scripts/homepage_of_these_courses/homepage_of_these_courses.rb +125 -0
- data/lib/studium/utility_scripts/lectures_attributed_to_universities/lectures_attributed_to_universities.rb +336 -0
- data/lib/studium/utility_scripts/lva_dates_of_the_important_courses.rb +111 -0
- data/lib/studium/utility_scripts/lva_nummer/lva_nummer.rb +431 -0
- data/lib/studium/utility_scripts/mandatory_lectures_in_this_month/mandatory_lectures_in_this_month.rb +316 -0
- data/lib/studium/utility_scripts/moodle/moodle.rb +213 -0
- data/lib/studium/utility_scripts/name_of_this_lva_id/name_of_this_lva_id.rb +110 -0
- data/lib/studium/utility_scripts/new_stud.rb +324 -0
- data/lib/studium/utility_scripts/next_week/next_week.rb +103 -0
- data/lib/studium/utility_scripts/not_yet_registered/not_yet_registered.rb +120 -0
- data/lib/studium/utility_scripts/open_last_exam_question_url_link_via_the_browser.rb +76 -0
- data/lib/studium/utility_scripts/passed_ects_per_year/passed_ects_per_year.rb +313 -0
- data/lib/studium/utility_scripts/passed_pr/303/274fungsimmanente_courses/passed_pr/303/274fungsimmanente_courses.rb +181 -0
- data/lib/studium/utility_scripts/pdf/README.md +2 -0
- data/lib/studium/utility_scripts/pdf/create_pdf_file_for_this_exam_topic.rb +355 -0
- data/lib/studium/utility_scripts/pdf/hexapdf_support.rb +50 -0
- data/lib/studium/utility_scripts/preparatory_meetings/preparatory_meetings.rb +317 -0
- data/lib/studium/utility_scripts/priority/priority.rb +164 -0
- data/lib/studium/utility_scripts/priority_points/priority_points.rb +263 -0
- data/lib/studium/utility_scripts/publish_my_exams/publish_my_exams.rb +174 -0
- data/lib/studium/utility_scripts/regexes/README.md +1 -0
- data/lib/studium/utility_scripts/regexes/generate_regex.rb +314 -0
- data/lib/studium/utility_scripts/regexes/generate_regexes_for_the_available_moodle_links.rb +55 -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/report_outdated_timetable_entries.rb +142 -0
- data/lib/studium/utility_scripts/report_whether_this_lecture_is_registered_in_the_file_lecture_information/report_whether_this_lecture_is_registered_in_the_file_lecture_information.rb +128 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/individual_resolve_practical_courses_date_conflicts.rb +254 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/resolve_practical_courses_date_conflicts.rb +265 -0
- data/lib/studium/utility_scripts/scrape_remote_university_url.rb +138 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_container.rb +144 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_schedule_creator.rb +374 -0
- data/lib/studium/utility_scripts/semesterplaner/semesterplaner.rb +311 -0
- data/lib/studium/utility_scripts/set_aliases_based_on_this_file.rb +97 -0
- data/lib/studium/utility_scripts/show_all_passed_master_lectures/show_all_passed_master_lectures.rb +126 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb +1385 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/constants.rb +23 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/menu.rb +63 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/reset.rb +33 -0
- data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/run.rb +50 -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 +147 -0
- data/lib/studium/utility_scripts/show_lectures/show_lectures.rb +910 -0
- data/lib/studium/utility_scripts/show_lectures_fitting_to_this_language/show_lectures_fitting_to_this_language.rb +121 -0
- data/lib/studium/utility_scripts/show_lectures_fitting_to_this_theme/show_lectures_fitting_to_this_theme.rb +105 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb +3167 -0
- data/lib/studium/utility_scripts/show_lectures_on_this_day/show_lectures_on_this_day.rb +150 -0
- data/lib/studium/utility_scripts/show_lva_dates_of_this_lecture/show_lva_dates_of_this_lecture.rb +182 -0
- data/lib/studium/utility_scripts/show_mixed_bachelor_master_courses/show_mixed_bachelor_master_courses.rb +92 -0
- data/lib/studium/utility_scripts/show_outdated_lva_dates/show_outdated_lva_dates.rb +214 -0
- data/lib/studium/utility_scripts/show_passed_exams_having_this_grade/show_passed_exams_having_this_grade.rb +91 -0
- data/lib/studium/utility_scripts/show_solved_english_lectures/show_solved_english_lectures.rb +139 -0
- data/lib/studium/utility_scripts/steop/README.md +4 -0
- data/lib/studium/utility_scripts/steop/show_all_steop_lectures.rb +93 -0
- data/lib/studium/utility_scripts/steop/steop_lectures_in_this_curriculum.rb +284 -0
- data/lib/studium/utility_scripts/steop/steop_lva_dates.rb +119 -0
- data/lib/studium/utility_scripts/studienkennzahl/studienkennzahl.rb +116 -0
- data/lib/studium/utility_scripts/studium_skeleton/studium_skeleton.rb +242 -0
- data/lib/studium/utility_scripts/stundenplan.rb +600 -0
- data/lib/studium/utility_scripts/sync_studium_relevant_entries_one_level_downwards.rb +217 -0
- data/lib/studium/utility_scripts/ufind/ufind.rb +106 -0
- data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/constants.rb +26 -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 +187 -0
- data/lib/studium/utility_scripts/video_lecture_downloader/video_lecture_downloader.rb +107 -0
- data/lib/studium/utility_scripts/week_parser/constants.rb +23 -0
- data/lib/studium/utility_scripts/week_parser/help.rb +32 -0
- data/lib/studium/utility_scripts/week_parser/menu.rb +59 -0
- data/lib/studium/utility_scripts/week_parser/misc.rb +373 -0
- data/lib/studium/utility_scripts/week_parser/reset.rb +65 -0
- data/lib/studium/utility_scripts/week_parser/run.rb +18 -0
- data/lib/studium/utility_scripts/week_parser/show.rb +236 -0
- data/lib/studium/utility_scripts/week_parser/week_parser.rb +49 -0
- data/lib/studium/utility_scripts/weekday_parser.rb +155 -0
- data/lib/studium/utility_scripts/weekly_schedule.rb +198 -0
- data/lib/studium/utility_scripts/wochenplanung/wochenplanung.rb +267 -0
- data/lib/studium/version/version.rb +46 -0
- data/lib/studium/www/exams/exams.cgi +54 -0
- data/lib/studium/www/fast_ask_exam_question/fast_ask_exam_question.cgi +156 -0
- data/lib/studium/www/handle_curricula/handle_curricula.cgi +154 -0
- data/lib/studium/www/next_generation_exam_question_trainer/next_generation_exam_question_trainer.cgi +112 -0
- data/lib/studium/www/next_generation_exam_question_trainer/solved.cgi +26 -0
- data/lib/studium/www/sinatra/app.rb +231 -0
- data/lib/studium/www/sinatra/curriculum_displayer/curriculum_displayer.rb +162 -0
- data/lib/studium/www/sinatra/misc.rb +115 -0
- data/lib/studium/www/statistics/statistics.cgi +82 -0
- data/lib/studium/www/upcoming_exams/upcoming_exams.cgi +36 -0
- data/lib/studium/yaml/ad_hoc_trainer/README.md +2 -0
- data/lib/studium/yaml/ad_hoc_trainer/exam_topics.md +22 -0
- data/lib/studium/yaml/allowed_themes_for_courses/allowed_themes_for_courses.yml +348 -0
- data/lib/studium/yaml/array_allowed_entries_for_the_file_lecture_information/array_allowed_entries_for_the_file_lecture_information.yml +71 -0
- data/lib/studium/yaml/available_exam_topics/available_exam_topics.yml +234 -0
- data/lib/studium/yaml/backlog_of_exams.yml +37 -0
- data/lib/studium/yaml/colours/custom_colours.yml +50 -0
- data/lib/studium/yaml/colours/use_colours.yml +1 -0
- data/lib/studium/yaml/current_exams.yml +30 -0
- data/lib/studium/yaml/curricula/README.md +39 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_agrarwissenschaften_033255.yml +147 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_basisblock_033630.yml +71 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_botanik_033630.yml +100 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_ecology_033630.yml +74 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_mikrobiologie_und_genetik_033630.yml +122 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_molekulare_biologie_033630.yml +106 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_zoologie_033630.yml +87 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_chemie_033662.yml +165 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_dummy_curriculum.yml +182 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_elektrotechnik_und_informationstechnik_033235.yml +13 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_forstwirtschaft_033225.yml +115 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_informatik_033521.yml +136 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_ktww_033231.yml +84 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_lmbt_033217.yml +121 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_medizinische_informatik_033533.yml +283 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_molekularbiologie_033665.yml +95 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_nutrition_science_033638.yml +119 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_pharmazie_033305.yml +170 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_technische_chemie_033290.yml +131 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_technische_informatik_033535.yml +23 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_ubrm_033227.yml +142 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_verfahrenstechnik_033273.yml +167 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_wirtschaftsinformatik_033526.yml +29 -0
- data/lib/studium/yaml/curricula/experimental/bachelor_informatik_in_den_lebenswissenschaften.yml +137 -0
- data/lib/studium/yaml/curricula/individual/bachelor_formale_logik.yml +88 -0
- data/lib/studium/yaml/curricula/individual/bachelor_informatik_und_molekulare_biologie.yml +1161 -0
- data/lib/studium/yaml/curricula/individual/bachelor_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +1157 -0
- data/lib/studium/yaml/curricula/individual/master_bioinformatics_and_nanobiotechnology_in_molecular_medicine.yml +306 -0
- data/lib/studium/yaml/curricula/individual/master_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +741 -0
- data/lib/studium/yaml/curricula/master/master_bioinformatik_066875.yml +75 -0
- data/lib/studium/yaml/curricula/master/master_biologie_molekulare_mikrobiologie_mikrobielle_oekologie_und_immunbiologie_066830.yml +78 -0
- data/lib/studium/yaml/curricula/master/master_biologische_chemie_066863.yml +66 -0
- data/lib/studium/yaml/curricula/master/master_dummy_curriculum.yml +197 -0
- data/lib/studium/yaml/curricula/master/master_genetik_und_entwicklungsbiologie_066877.yml +89 -0
- data/lib/studium/yaml/curricula/master/master_lmbt_066418.yml +112 -0
- data/lib/studium/yaml/curricula/master/master_molecular_biology_066865.yml +72 -0
- data/lib/studium/yaml/curricula/master/master_molekulare_biologie_066834.yml +151 -0
- data/lib/studium/yaml/curricula/master/master_pharmazie_066605.yml +176 -0
- data/lib/studium/yaml/curricula/master/master_technische_chemie_066490.yml +123 -0
- data/lib/studium/yaml/curricula/outdated/master_bioinformatics_and_molecular_biotechnology_including_aspects_from_molecular_medicine.yml +438 -0
- data/lib/studium/yaml/curricula/outdated/master_food_science_and_plant_biotechnology.yml +31 -0
- data/lib/studium/yaml/curricula.yml +562 -0
- data/lib/studium/yaml/daily_questions_solved/daily_questions_solved.yml +1849 -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/exams/next_exams_to_do.md +9 -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/grouped_themes.yml +258 -0
- data/lib/studium/yaml/holidays/holidays.yml +201 -0
- data/lib/studium/yaml/important_exams.yml +274 -0
- data/lib/studium/yaml/inscription_dates_of_universities.yml +60 -0
- data/lib/studium/yaml/lecture_aliases.yml +138 -0
- data/lib/studium/yaml/lecture_information/lecture_information.yml +63818 -0
- data/lib/studium/yaml/log_dir.yml +1 -0
- data/lib/studium/yaml/main_topic/main_topic.yml +11 -0
- data/lib/studium/yaml/max_stats.yml +256 -0
- data/lib/studium/yaml/meta_themes +1 -0
- data/lib/studium/yaml/mitbelegung/README.md +4 -0
- data/lib/studium/yaml/mitbelegung/mitbelegung.yml +21 -0
- data/lib/studium/yaml/mitteilungsbl/303/244tter/mitteilungsbl/303/244tter.yml +363 -0
- data/lib/studium/yaml/n_total_questions.yml +1 -0
- data/lib/studium/yaml/rename_konsole_tab.yml +1 -0
- data/lib/studium/yaml/semester_planner/README.md +4 -0
- data/lib/studium/yaml/semester_planner/semester_planner.yml +189 -0
- data/lib/studium/yaml/show_topic.yml +1 -0
- data/lib/studium/yaml/statistics/lecture_information.yml +1 -0
- data/lib/studium/yaml/statistics/max_stats.yml +239 -0
- data/lib/studium/yaml/statistics/statistics.yml +77 -0
- data/lib/studium/yaml/week/01_monday.yml +25 -0
- data/lib/studium/yaml/week/02_tuesday.yml +68 -0
- data/lib/studium/yaml/week/03_wednesday.yml +63 -0
- data/lib/studium/yaml/week/04_thursday.yml +20 -0
- data/lib/studium/yaml/week/05_friday.yml +31 -0
- data/lib/studium/yaml/week/06_saturday.yml +16 -0
- data/lib/studium/yaml/week/07_sunday.yml +0 -0
- data/lib/studium/yaml/week/README.md +10 -0
- data/lib/studium.rb +5 -0
- data/studium.gemspec +82 -0
- data/test/testing_colourized_question_and_answer.rb +18 -0
- data/test/testing_studium.rb +244 -0
- data/test/testing_studium_base_class.rb +31 -0
- data/test/testing_the_file_lecture_information.rb +18 -0
- data/test/testing_time_component.rb +29 -0
- metadata +1101 -0
@@ -0,0 +1,1375 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Studium::ShowUpcomingExams
|
6
|
+
#
|
7
|
+
# This class will show upcoming exams. How does it determine which exams
|
8
|
+
# are upcoming?
|
9
|
+
#
|
10
|
+
# This is solely determined by the file called 'lecture_information.yml'.
|
11
|
+
#
|
12
|
+
# Usage example:
|
13
|
+
#
|
14
|
+
# Studium::ShowUpcomingExams.new(ARGV)
|
15
|
+
#
|
16
|
+
# =========================================================================== #
|
17
|
+
# require 'studium/exams/show_upcoming_exams/show_upcoming_exams.rb'
|
18
|
+
# x = Studium.return_upcoming_exams_as_HTML
|
19
|
+
# Studium.return_all_registered_upcoming_exams
|
20
|
+
# Studium::ShowUpcomingExams.new
|
21
|
+
# =========================================================================== #
|
22
|
+
require 'studium/base/base.rb'
|
23
|
+
|
24
|
+
module Studium
|
25
|
+
|
26
|
+
class ShowUpcomingExams < Studium::Base # === Studium::ShowUpcomingExams
|
27
|
+
|
28
|
+
# ========================================================================= #
|
29
|
+
# Toplevel-methods of the studium gem come next.
|
30
|
+
# ========================================================================= #
|
31
|
+
require 'studium/toplevel_methods/curriculum_related_code.rb'
|
32
|
+
require 'studium/toplevel_methods/total_ects_points_passed.rb'
|
33
|
+
require 'studium/toplevel_methods/write_into_file_related_functionality.rb'
|
34
|
+
|
35
|
+
# ========================================================================= #
|
36
|
+
# === REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM
|
37
|
+
# ========================================================================= #
|
38
|
+
REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM = # See: http://rubular.com/r/6VxRmS5FKc
|
39
|
+
/(\d{1,2}\.\d{1,2}\.\d{4},?\s*\d{1,2}:\d{1,2}-\d{1,2}:\d{1,2})/
|
40
|
+
|
41
|
+
# ========================================================================= #
|
42
|
+
# === SHOW_LEADING_LVA_ID_NUMBER
|
43
|
+
#
|
44
|
+
# If the following constant is set to true, then we will also display
|
45
|
+
# the leading LVA-ID number.
|
46
|
+
#
|
47
|
+
# If it is false, that LVA-ID number will NOT be shown.
|
48
|
+
#
|
49
|
+
# The numbers make the display a bit uglier, but it may be more useful
|
50
|
+
# for the user if that user wants to use the LVA at hand via the
|
51
|
+
# browser.
|
52
|
+
# ========================================================================= #
|
53
|
+
SHOW_LEADING_LVA_ID_NUMBER = true
|
54
|
+
|
55
|
+
# ========================================================================= #
|
56
|
+
# === TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES
|
57
|
+
#
|
58
|
+
# The following constant will also attempt to show the priorities of
|
59
|
+
# a given lecture at hand.
|
60
|
+
#
|
61
|
+
# This depends on the priority value having been set in the file
|
62
|
+
# called "lecture_information.yml".
|
63
|
+
#
|
64
|
+
# If, however had, such a file exists, and the following constant is
|
65
|
+
# set to true, then this class will show the priority of the lecture.
|
66
|
+
# Lower number means higher priority, and the colours picked will reflect
|
67
|
+
# this priority loosely - the lower the priority, the brighter the
|
68
|
+
# colour.
|
69
|
+
#
|
70
|
+
# The reasoning behind this is that brighter colours should be easier to
|
71
|
+
# notice by the human eyes, and hence may signal a higher "importance".
|
72
|
+
#
|
73
|
+
# The whole idea behind this constant is to visualize more easily on
|
74
|
+
# the commandline which upcoming exams are more important than others.
|
75
|
+
# ========================================================================= #
|
76
|
+
TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES = true
|
77
|
+
|
78
|
+
# ========================================================================= #
|
79
|
+
# === USE_OPN
|
80
|
+
# ========================================================================= #
|
81
|
+
USE_OPN = true
|
82
|
+
|
83
|
+
# ========================================================================= #
|
84
|
+
# === DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH
|
85
|
+
#
|
86
|
+
# If this constant is set to true, then a horizontal bar will be shown
|
87
|
+
# when a new month begins.
|
88
|
+
# ========================================================================= #
|
89
|
+
DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH = true
|
90
|
+
|
91
|
+
# ========================================================================= #
|
92
|
+
# === SEPARATOR_TOKEN_TO_USE
|
93
|
+
#
|
94
|
+
# This is the vertical separator token that is used to "separate"
|
95
|
+
# the display. Since as of January 2021, a unicode token is used;
|
96
|
+
# the original ASCII token can be seen in the following comment
|
97
|
+
# still.
|
98
|
+
# ========================================================================= #
|
99
|
+
SEPARATOR_TOKEN_TO_USE = '▏' # '┃' # '|' #|' #'❚' # '|'
|
100
|
+
|
101
|
+
# ========================================================================= #
|
102
|
+
# === SHOW_TOTAL_ECTS_POINTS_PASSED
|
103
|
+
# ========================================================================= #
|
104
|
+
SHOW_TOTAL_ECTS_POINTS_PASSED = true
|
105
|
+
|
106
|
+
# ========================================================================= #
|
107
|
+
# === initialize
|
108
|
+
#
|
109
|
+
# The first argument will keep track of the commandline-input.
|
110
|
+
#
|
111
|
+
# The input to this method should also handle blocks given, such as:
|
112
|
+
#
|
113
|
+
# Studium::ShowUpcomingExams.new { :disable_colours }
|
114
|
+
#
|
115
|
+
# ========================================================================= #
|
116
|
+
def initialize(
|
117
|
+
i = nil,
|
118
|
+
run_already = true,
|
119
|
+
&block
|
120
|
+
)
|
121
|
+
reset
|
122
|
+
case i
|
123
|
+
# ======================================================================= #
|
124
|
+
# === :be_silent
|
125
|
+
# ======================================================================= #
|
126
|
+
when :be_silent,
|
127
|
+
:do_not_report_anything
|
128
|
+
be_silent
|
129
|
+
i = nil
|
130
|
+
@report_result = false
|
131
|
+
# ======================================================================= #
|
132
|
+
# === :do_not_report_anything_and_do_not_update_the_cd_aliases
|
133
|
+
# ======================================================================= #
|
134
|
+
when :do_not_report_anything_and_do_not_update_the_cd_aliases
|
135
|
+
be_silent
|
136
|
+
i = nil
|
137
|
+
@report_result = false
|
138
|
+
@internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries] = false
|
139
|
+
end
|
140
|
+
set_input(i)
|
141
|
+
# ======================================================================= #
|
142
|
+
# === Handle blocks next
|
143
|
+
#
|
144
|
+
# Next handle blocks given to the initializer:
|
145
|
+
# ======================================================================= #
|
146
|
+
if block_given?
|
147
|
+
yielded = yield
|
148
|
+
if yielded.is_a? Hash
|
149
|
+
# =================================================================== #
|
150
|
+
# === :show_n_upcoming_exams
|
151
|
+
# =================================================================== #
|
152
|
+
if yielded.has_key? :show_n_upcoming_exams
|
153
|
+
set_show_n_upcoming_exams(
|
154
|
+
yielded.delete(:show_n_upcoming_exams)
|
155
|
+
)
|
156
|
+
# =================================================================== #
|
157
|
+
# === :show_n_exams
|
158
|
+
# =================================================================== #
|
159
|
+
elsif yielded.has_key? :show_n_exams
|
160
|
+
set_show_n_upcoming_exams(
|
161
|
+
yielded.fetch(:show_n_exams)
|
162
|
+
)
|
163
|
+
end
|
164
|
+
# =================================================================== #
|
165
|
+
# === :array_of_symbols
|
166
|
+
# =================================================================== #
|
167
|
+
if yielded.has_key? :array_of_symbols
|
168
|
+
array_of_symbols.each {|this_symbol|
|
169
|
+
case this_symbol
|
170
|
+
# =============================================================== #
|
171
|
+
# === :do_not_exit
|
172
|
+
# =============================================================== #
|
173
|
+
when :do_not_exit
|
174
|
+
set_do_not_exit(false)
|
175
|
+
else
|
176
|
+
e 'Unhandled symbol: :'+this_symbol.to_s
|
177
|
+
end
|
178
|
+
}
|
179
|
+
end
|
180
|
+
else
|
181
|
+
case yielded # case tag
|
182
|
+
# === :do_not_exit
|
183
|
+
when :do_not_exit
|
184
|
+
set_do_not_exit(false)
|
185
|
+
when :disable_colours,
|
186
|
+
:no_colours
|
187
|
+
no_colours
|
188
|
+
end
|
189
|
+
end
|
190
|
+
end
|
191
|
+
if i.is_a? Symbol
|
192
|
+
case i
|
193
|
+
when :do_not_report_anything
|
194
|
+
do_not_report_anything
|
195
|
+
end
|
196
|
+
end
|
197
|
+
case run_already
|
198
|
+
when :dont_run_yet,
|
199
|
+
:do_not_run_yet
|
200
|
+
run_already = false
|
201
|
+
end
|
202
|
+
run if run_already
|
203
|
+
end
|
204
|
+
|
205
|
+
# ========================================================================= #
|
206
|
+
# === consider_autogenerating_exam_aliases
|
207
|
+
#
|
208
|
+
# This method will autogenerate the proper cd_aliases entries.
|
209
|
+
#
|
210
|
+
# It will only do so if these three conditions are met:
|
211
|
+
#
|
212
|
+
# (1) the target system is a "roebe-system"
|
213
|
+
# (2) a new entry has been added or removed in the file
|
214
|
+
# 'lecture_information.yml'
|
215
|
+
# (3) a file exists as specified by the constant
|
216
|
+
# FILE_ALL_REGISTERED_UPCOMING_EXAMS
|
217
|
+
#
|
218
|
+
# ========================================================================= #
|
219
|
+
def consider_autogenerating_exam_aliases(
|
220
|
+
use_this_file =
|
221
|
+
Studium.file_all_registered_upcoming_exams # Defaults to "/root/Studium/all_registered_upcoming_exams.yml".
|
222
|
+
)
|
223
|
+
if is_on_roebe? and commandline_mode? # Only do so on roebe-systems.
|
224
|
+
# ===================================================================== #
|
225
|
+
# Next we have to determine whether the file 'lecture_information.yml'
|
226
|
+
# has any different entry. If so, the cd_aliases entries will be
|
227
|
+
# autogenerated.
|
228
|
+
# ===================================================================== #
|
229
|
+
if File.exist? use_this_file
|
230
|
+
existing_dataset = YAML.load_file(use_this_file)
|
231
|
+
# =================================================================== #
|
232
|
+
# This may be in the wrong encoding, so we have to sanitize the
|
233
|
+
# Encoding still. Since as of April 2022 this is no longer in use.
|
234
|
+
# =================================================================== #
|
235
|
+
# existing_dataset = ensure_main_encoding(existing_dataset)
|
236
|
+
# =================================================================== #
|
237
|
+
# Next compare this to the dataset from the file
|
238
|
+
# 'lecture_information.yml'. We have to load up the
|
239
|
+
# original dataset again because the one available
|
240
|
+
# from the method reset(), may have been altered
|
241
|
+
# lateron.
|
242
|
+
# =================================================================== #
|
243
|
+
_ = ::Studium.return_sanitized_dataset_from_the_file_lecture_information.select {|a, b|
|
244
|
+
b.has_key?('registered') or
|
245
|
+
b.has_key?('not_yet_registered')
|
246
|
+
}
|
247
|
+
array = _.map {|name_of_the_lecture, inner_hash|
|
248
|
+
if inner_hash.has_key? 'registered'
|
249
|
+
entry = inner_hash['registered']
|
250
|
+
elsif inner_hash.has_key? 'not_yet_registered'
|
251
|
+
entry = inner_hash['not_yet_registered']
|
252
|
+
end
|
253
|
+
entry = entry.first
|
254
|
+
entry
|
255
|
+
}
|
256
|
+
# =================================================================== #
|
257
|
+
# Finally, compare the two Arrays, but sort them via Time:
|
258
|
+
# =================================================================== #
|
259
|
+
array = array.sort_by {|line|
|
260
|
+
line = line.split(',').first if line.include? ','
|
261
|
+
line = remove_weekdays(line)
|
262
|
+
Time.parse(line)
|
263
|
+
}
|
264
|
+
existing_dataset = existing_dataset.sort_by {|line|
|
265
|
+
line = line.split(',').first if line.include? ','
|
266
|
+
line = remove_weekdays(line)
|
267
|
+
Time.parse(line)
|
268
|
+
}
|
269
|
+
if (array == existing_dataset)
|
270
|
+
# ================================================================= #
|
271
|
+
# In this case, we pass through, as it is the very same dataset.
|
272
|
+
# ================================================================= #
|
273
|
+
else
|
274
|
+
# ================================================================= #
|
275
|
+
# Else we must update the cd-aliases.
|
276
|
+
# ================================================================= #
|
277
|
+
if @internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries]
|
278
|
+
update_the_cd_aliases_with_new_exam_entries
|
279
|
+
end
|
280
|
+
end
|
281
|
+
end
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
# ========================================================================= #
|
286
|
+
# === update_the_cd_aliases_with_new_exam_entries
|
287
|
+
#
|
288
|
+
# This will do a semi-silent update.
|
289
|
+
# ========================================================================= #
|
290
|
+
def update_the_cd_aliases_with_new_exam_entries
|
291
|
+
opne "Updating the #{gold('cd-aliases')} next - this "\
|
292
|
+
"may take a few seconds."
|
293
|
+
create_the_auto_stud_aliases(:do_not_exit, :be_quiet)
|
294
|
+
system 'history -c'
|
295
|
+
end
|
296
|
+
|
297
|
+
# ========================================================================= #
|
298
|
+
# === shall_we_exit?
|
299
|
+
# ========================================================================= #
|
300
|
+
def shall_we_exit?
|
301
|
+
@internal_hash[:shall_we_exit]
|
302
|
+
end
|
303
|
+
|
304
|
+
# ========================================================================= #
|
305
|
+
# === create_the_auto_stud_aliases
|
306
|
+
#
|
307
|
+
# To invoke this class, do:
|
308
|
+
#
|
309
|
+
# show_upcoming_exams --autostud
|
310
|
+
#
|
311
|
+
# ========================================================================= #
|
312
|
+
def create_the_auto_stud_aliases(
|
313
|
+
shall_we_exit = shall_we_exit?,
|
314
|
+
be_verbose = true
|
315
|
+
)
|
316
|
+
case be_verbose
|
317
|
+
when :be_quiet
|
318
|
+
be_verbose = false
|
319
|
+
end
|
320
|
+
case shall_we_exit
|
321
|
+
when :do_not_exit
|
322
|
+
shall_we_exit = false
|
323
|
+
end
|
324
|
+
base_dir = ROEBE_STUDIUM_DIR.dup
|
325
|
+
index = 0
|
326
|
+
@dataset.each {|name_of_the_lecture, inner_hash| index += 1
|
327
|
+
name_of_the_lecture = name_of_the_lecture.tr(' ','_')
|
328
|
+
# ===================================================================== #
|
329
|
+
# Sanitize the name of the lecture:
|
330
|
+
# ===================================================================== #
|
331
|
+
name_of_the_lecture.delete!(':/(),') # Get rid of ':','/','(',')', ','.
|
332
|
+
if name_of_the_lecture.end_with? '.'
|
333
|
+
name_of_the_lecture.chop!
|
334
|
+
end
|
335
|
+
if name_of_the_lecture.include? '_-_'
|
336
|
+
name_of_the_lecture.gsub!(/_-_/,'_')
|
337
|
+
end
|
338
|
+
if name_of_the_lecture.include? '_+_' # Replace '_+_' with '_'
|
339
|
+
name_of_the_lecture.gsub!(/_\+_/,'_')
|
340
|
+
end
|
341
|
+
if name_of_the_lecture.include? '__'
|
342
|
+
name_of_the_lecture.squeeze!('_')
|
343
|
+
end
|
344
|
+
university = inner_hash[:university].dup
|
345
|
+
# ===================================================================== #
|
346
|
+
# Note that the entries matched in the following variable will be
|
347
|
+
# upcased lateron anyway.
|
348
|
+
# ===================================================================== #
|
349
|
+
case university
|
350
|
+
when /^vetmed$/i
|
351
|
+
university = 'VETMED_UNI'
|
352
|
+
when 'tu_vienna','TU_VIENNA','TU Vienna'
|
353
|
+
university = 'TU_WIEN'
|
354
|
+
when 'meduni','MEDUNI','Meduni',
|
355
|
+
'boku','BOKU'
|
356
|
+
university << '_WIEN'
|
357
|
+
end
|
358
|
+
target_dir = base_dir+university.upcase.tr(' ','_')+'/'.dup
|
359
|
+
target_dir << name_of_the_lecture
|
360
|
+
pwdstud_name = "pwdstud#{index}:"
|
361
|
+
if be_verbose
|
362
|
+
opne 'Settting alias '+
|
363
|
+
simp(pwdstud_name.to_s.rjust(10))+
|
364
|
+
' pointing to the directory '+
|
365
|
+
sdir(target_dir)
|
366
|
+
end
|
367
|
+
# ===================================================================== #
|
368
|
+
# Delegate towards Studium.set_this_cd_alias_to() next,
|
369
|
+
# in the file "studium/toplevel_methods/set_this_cd_alias_to.rb".
|
370
|
+
# ===================================================================== #
|
371
|
+
set_this_cd_alias_to(
|
372
|
+
pwdstud_name,
|
373
|
+
target_dir,
|
374
|
+
:be_quiet # But be quiet there.
|
375
|
+
)
|
376
|
+
begin
|
377
|
+
if is_on_roebe?
|
378
|
+
opne 'Autogenerating the cd-aliases next.'
|
379
|
+
end
|
380
|
+
require 'rcfiles'
|
381
|
+
Rcfiles.generate_files(:cd_aliases) {{ be_verbose: be_verbose? }}
|
382
|
+
rescue LoadError; end
|
383
|
+
}
|
384
|
+
exit if shall_we_exit
|
385
|
+
end
|
386
|
+
|
387
|
+
# ========================================================================= #
|
388
|
+
# === show_help (help tag)
|
389
|
+
#
|
390
|
+
# Invoke this method via:
|
391
|
+
#
|
392
|
+
# show_upcoming_exams --help
|
393
|
+
#
|
394
|
+
# ========================================================================= #
|
395
|
+
def show_help
|
396
|
+
help_string = <<-EOF
|
397
|
+
|
398
|
+
Input a number n, which means to show n upcoming exams.
|
399
|
+
|
400
|
+
Other documented help options are:
|
401
|
+
|
402
|
+
--autostud # automatically set the proper
|
403
|
+
# cd-alias for all upcoming exams
|
404
|
+
|
405
|
+
EOF
|
406
|
+
e help_string
|
407
|
+
end
|
408
|
+
|
409
|
+
# ========================================================================= #
|
410
|
+
# === menu (menu tag)
|
411
|
+
# ========================================================================= #
|
412
|
+
def menu(
|
413
|
+
i = @input
|
414
|
+
)
|
415
|
+
if i.is_a? Array
|
416
|
+
i.each {|entry| menu(entry) }
|
417
|
+
else
|
418
|
+
case i # case tag
|
419
|
+
# ===================================================================== #
|
420
|
+
# === show_upcoming_exams --only-registered
|
421
|
+
#
|
422
|
+
# Show only exams for which we are factually registered.
|
423
|
+
# ===================================================================== #
|
424
|
+
when /^-?-?only(-|_)?registered$/
|
425
|
+
do_show_only_exams_for_which_we_are_registered
|
426
|
+
# ===================================================================== #
|
427
|
+
# === show_upcoming_exams --auto-stud
|
428
|
+
# ===================================================================== #
|
429
|
+
when /^-?-?auto(-|_)?stud$/
|
430
|
+
create_the_auto_stud_aliases
|
431
|
+
# ===================================================================== #
|
432
|
+
# === show_upcoming_exams --be_silent
|
433
|
+
# ===================================================================== #
|
434
|
+
when /^-?-?be(_|-)?silent$/i
|
435
|
+
do_not_report_anything
|
436
|
+
# ===================================================================== #
|
437
|
+
# === show_upcoming_exams --disable-colours
|
438
|
+
# ===================================================================== #
|
439
|
+
when /^-?-?disable(_|-)?colours$/,
|
440
|
+
/^-?-?no(_|-)?colours$/
|
441
|
+
@use_colours = false
|
442
|
+
# ===================================================================== #
|
443
|
+
# === show_upcoming_exams --help
|
444
|
+
# ===================================================================== #
|
445
|
+
when /^-?-?help$/
|
446
|
+
show_help
|
447
|
+
exit
|
448
|
+
else
|
449
|
+
if i.to_s =~ /^(\d+)$/ # Is it a number?
|
450
|
+
set_show_n_upcoming_exams($1.to_s.dup) # If so, feed into this method here.
|
451
|
+
end
|
452
|
+
end
|
453
|
+
end
|
454
|
+
end; alias check_against_menu menu # === check_against_menu
|
455
|
+
|
456
|
+
# ========================================================================= #
|
457
|
+
# === report (report tag)
|
458
|
+
# ========================================================================= #
|
459
|
+
def report
|
460
|
+
_ = @dataset
|
461
|
+
if _.empty?
|
462
|
+
opne 'You have not registered for any upcoming exams.'
|
463
|
+
else
|
464
|
+
left_pad = left_pad?
|
465
|
+
if show_only_exams_for_which_we_are_registered?
|
466
|
+
_.select! {|name_of_the_course, inner_hash|
|
467
|
+
inner_hash.has_key?('registered')
|
468
|
+
}
|
469
|
+
end
|
470
|
+
current_month = month?
|
471
|
+
# ===================================================================== #
|
472
|
+
# At this point, we assume (usually correctly so) that the main
|
473
|
+
# dataset was already sorted.
|
474
|
+
# ===================================================================== #
|
475
|
+
index = 0
|
476
|
+
case show_n_upcoming_exams?
|
477
|
+
when :all_of_them
|
478
|
+
# In this case, we show all of them.
|
479
|
+
else
|
480
|
+
if show_n_upcoming_exams?.to_s =~ /^(\d+)$/
|
481
|
+
n_exams_to_show = $1.to_s.dup.to_i
|
482
|
+
_ = _[0 .. (n_exams_to_show - 1)]
|
483
|
+
end
|
484
|
+
end
|
485
|
+
e
|
486
|
+
report_today(_.size)
|
487
|
+
n_ects_in_this_month = 0
|
488
|
+
_.each {|name_of_the_lecture, inner_hash| index += 1
|
489
|
+
if inner_hash.has_key? 'registered'
|
490
|
+
the_exam_will_happen_when = inner_hash['registered'].first
|
491
|
+
else
|
492
|
+
the_exam_will_happen_when = inner_hash['not_yet_registered'].first
|
493
|
+
end
|
494
|
+
colourized_and_padded_index = (' ' * (2 - index.to_s.size ))
|
495
|
+
colourized_and_padded_index << orange('(')+
|
496
|
+
goldenrod(index.to_s)+
|
497
|
+
orange(') ')
|
498
|
+
priority_of_the_lecture = inner_hash[:priority]
|
499
|
+
n_ects_points = inner_hash[:ects] # How many ECTS this lecture has.
|
500
|
+
startzeit = return_startzeit_from(the_exam_will_happen_when)
|
501
|
+
colourized_startzeit = royalblue(' Startzeit: ')+
|
502
|
+
slateblue(startzeit)
|
503
|
+
# =================================================================== #
|
504
|
+
# === Consider showing the lva-id number next:
|
505
|
+
# =================================================================== #
|
506
|
+
unless SHOW_LEADING_LVA_ID_NUMBER
|
507
|
+
splitted = name_of_the_lecture.split(' ')
|
508
|
+
name_of_the_lecture = splitted[1 .. -1].join(' ').strip
|
509
|
+
end
|
510
|
+
# =================================================================== #
|
511
|
+
# === Add the date of the exam.
|
512
|
+
# =================================================================== #
|
513
|
+
date_of_the_exam = return_date_of_the_exam(the_exam_will_happen_when)
|
514
|
+
colourized_date_of_the_exam = return_red_vertical_bar+
|
515
|
+
yellowgreen(
|
516
|
+
date_of_the_exam+', '
|
517
|
+
)
|
518
|
+
german_weekday = german_weekday?(date_of_the_exam).ljust(11) # "Donnerstag" is the longest name.
|
519
|
+
colourized_german_weekday = mediumpurple(german_weekday)
|
520
|
+
# =================================================================== #
|
521
|
+
# Justify the name of the lecture a bit.
|
522
|
+
# =================================================================== #
|
523
|
+
if inner_hash.has_key? 'not_yet_registered'
|
524
|
+
name_of_the_lecture = name_of_the_lecture.dup if name_of_the_lecture.frozen?
|
525
|
+
unless name_of_the_lecture.size + 34 >= left_pad # See the next line for an explanation of the number here; +1
|
526
|
+
name_of_the_lecture << ' ← [TODO: register for this exam]' # 33 chars
|
527
|
+
end
|
528
|
+
end
|
529
|
+
padded_name_of_the_lecture = name_of_the_lecture.ljust(
|
530
|
+
left_pad - 2
|
531
|
+
)
|
532
|
+
if (padded_name_of_the_lecture.size+1) > left_pad
|
533
|
+
padded_name_of_the_lecture = padded_name_of_the_lecture[
|
534
|
+
0 .. (left_pad - 8) # Must calculate the offset due to [...]
|
535
|
+
]+'[...]'
|
536
|
+
end
|
537
|
+
if inner_hash.has_key? 'not_yet_registered'
|
538
|
+
# ================================================================= #
|
539
|
+
# If we aren't yet registered for an exam, then we will
|
540
|
+
# always colourize this in crimson().
|
541
|
+
# ================================================================= #
|
542
|
+
colourized_and_padded_name_of_the_lecture =
|
543
|
+
crimson(padded_name_of_the_lecture)
|
544
|
+
else
|
545
|
+
# ================================================================= #
|
546
|
+
# === Colourize the lecture based on the priority
|
547
|
+
#
|
548
|
+
# Next, colourize the name of the lecture according to the
|
549
|
+
# priority. Lectures that are part of the vector-curriculum
|
550
|
+
# will always be re-assigned priority one.
|
551
|
+
# ================================================================= #
|
552
|
+
if is_part_of_the_vector_curriculum?(name_of_the_lecture)
|
553
|
+
colourized_and_padded_name_of_the_lecture =
|
554
|
+
mediumturquoise(padded_name_of_the_lecture)
|
555
|
+
else
|
556
|
+
case priority_of_the_lecture
|
557
|
+
when 1
|
558
|
+
colourized_and_padded_name_of_the_lecture =
|
559
|
+
lightsteelblue(padded_name_of_the_lecture)
|
560
|
+
else
|
561
|
+
colourized_and_padded_name_of_the_lecture =
|
562
|
+
lightslategray(padded_name_of_the_lecture)
|
563
|
+
end
|
564
|
+
end
|
565
|
+
end
|
566
|
+
# =================================================================== #
|
567
|
+
# Add the "Ort" of the exam.
|
568
|
+
# =================================================================== #
|
569
|
+
the_location = return_location( # This variable will contain only the location, aka 'Ort'.
|
570
|
+
the_exam_will_happen_when.delete("\t")
|
571
|
+
).lstrip
|
572
|
+
colourized_location = paleturquoise( # Same as above but with colours.
|
573
|
+
the_location
|
574
|
+
).sub(/:/, swarn(" #{RIGHT_ARROW}")+paleturquoise) # Return the "Ort" here.
|
575
|
+
# =================================================================== #
|
576
|
+
# Next, find out in how many days the exam will happen:
|
577
|
+
# =================================================================== #
|
578
|
+
the_exam_will_happen_in_n_days = in_n_days(date_of_the_exam+' '+startzeit.to_s)
|
579
|
+
if the_exam_will_happen_in_n_days < 0.5
|
580
|
+
colourized_in_n_days = crimson('[ HEUTE ]')
|
581
|
+
else
|
582
|
+
colourized_in_n_days = skyblue('[+ ')+
|
583
|
+
orangered(
|
584
|
+
the_exam_will_happen_in_n_days.to_s.rjust(4)
|
585
|
+
)+
|
586
|
+
skyblue(' days]')
|
587
|
+
end
|
588
|
+
# =================================================================== #
|
589
|
+
# Display a horizontal bar if we are at a new month.
|
590
|
+
# =================================================================== #
|
591
|
+
if DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH and @report_result
|
592
|
+
# ================================================================= #
|
593
|
+
# Must first check whether it is a new month.
|
594
|
+
# ================================================================= #
|
595
|
+
actual_month = date_of_the_exam.scan(/\d{1,2}\.(\d{1,2})\.\d{4}/).flatten
|
596
|
+
if actual_month == current_month
|
597
|
+
else
|
598
|
+
# =============================================================== #
|
599
|
+
# Ok, this means we have a new month then.
|
600
|
+
# =============================================================== #
|
601
|
+
current_month = actual_month.dup
|
602
|
+
show_horizontal_bar(current_month) {{ n_ects_points_in_this_month: n_ects_in_this_month }}
|
603
|
+
if n_ects_in_this_month > 0
|
604
|
+
n_ects_in_this_month = 0
|
605
|
+
end
|
606
|
+
end
|
607
|
+
end
|
608
|
+
n_ects_in_this_month += n_ects_points
|
609
|
+
# =================================================================== #
|
610
|
+
# Next, output the colourized variants - the big display part:
|
611
|
+
# =================================================================== #
|
612
|
+
if @report_result
|
613
|
+
result = ' '+
|
614
|
+
colourized_and_padded_index+ # First, we will show the index.
|
615
|
+
colourized_and_padded_name_of_the_lecture+' '+ # Now we will show the name of the lecture.
|
616
|
+
colourized_date_of_the_exam+ # THe date when the exam happens
|
617
|
+
colourized_german_weekday+ # The weekday in german.
|
618
|
+
colourized_in_n_days+
|
619
|
+
colourized_startzeit
|
620
|
+
e result
|
621
|
+
end
|
622
|
+
# =================================================================== #
|
623
|
+
# Also show the location of the exam at hand.
|
624
|
+
# =================================================================== #
|
625
|
+
location_of_the_exam = (' ' * (left_pad+6))+
|
626
|
+
return_red_vertical_bar.rstrip+
|
627
|
+
(' ' * 13)+colourized_location # Add the Ort too.
|
628
|
+
if TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES
|
629
|
+
# ================================================================= #
|
630
|
+
# And append the priority as well.
|
631
|
+
# ================================================================= #
|
632
|
+
colourized_priority = springgreen(
|
633
|
+
' Priorität: '+priority_of_the_lecture.to_s
|
634
|
+
)
|
635
|
+
location_of_the_exam << colourized_priority
|
636
|
+
end
|
637
|
+
# =================================================================== #
|
638
|
+
# Next append how many ECTS points this exam has.
|
639
|
+
# =================================================================== #
|
640
|
+
location_of_the_exam << limegreen(
|
641
|
+
' ('+n_ects_points.to_s+' ECTS)'
|
642
|
+
)
|
643
|
+
e location_of_the_exam if @report_result
|
644
|
+
}
|
645
|
+
if @report_result
|
646
|
+
display_total_ects
|
647
|
+
e
|
648
|
+
end
|
649
|
+
end
|
650
|
+
end
|
651
|
+
|
652
|
+
# ========================================================================= #
|
653
|
+
# === reset (reset tag)
|
654
|
+
# ========================================================================= #
|
655
|
+
def reset
|
656
|
+
super()
|
657
|
+
infer_the_namespace
|
658
|
+
# ======================================================================= #
|
659
|
+
# === :shall_we_exit
|
660
|
+
# ======================================================================= #
|
661
|
+
@internal_hash[:shall_we_exit] = true
|
662
|
+
# ======================================================================= #
|
663
|
+
# === @report_result
|
664
|
+
# ======================================================================= #
|
665
|
+
@report_result = true
|
666
|
+
# ======================================================================= #
|
667
|
+
# === @show_n_upcoming_exams
|
668
|
+
#
|
669
|
+
# By default all upcoming exams will be shown.
|
670
|
+
# ======================================================================= #
|
671
|
+
@show_n_upcoming_exams = :all_of_them
|
672
|
+
# ======================================================================= #
|
673
|
+
# === @dataset_from_file_lecture_information
|
674
|
+
# ======================================================================= #
|
675
|
+
@dataset_from_file_lecture_information =
|
676
|
+
return_dataset_from_file_lecture_information
|
677
|
+
# ======================================================================= #
|
678
|
+
# === :show_only_exams_for_which_we_are_registered
|
679
|
+
# ======================================================================= #
|
680
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered] = false
|
681
|
+
# ======================================================================= #
|
682
|
+
# === :n_ljust_to_the_left
|
683
|
+
# ======================================================================= #
|
684
|
+
@internal_hash[:n_ljust_to_the_left] = 66
|
685
|
+
# ======================================================================= #
|
686
|
+
# === :shall_we_update_the_cd_aliases_with_new_exam_entries
|
687
|
+
# ======================================================================= #
|
688
|
+
@internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries] = true
|
689
|
+
sanitize_dataset
|
690
|
+
end
|
691
|
+
|
692
|
+
# ========================================================================= #
|
693
|
+
# === do_show_only_exams_for_which_we_are_registered
|
694
|
+
# ========================================================================= #
|
695
|
+
def do_show_only_exams_for_which_we_are_registered
|
696
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered] = true
|
697
|
+
end
|
698
|
+
|
699
|
+
# ========================================================================= #
|
700
|
+
# === show_only_exams_for_which_we_are_registered?
|
701
|
+
# ========================================================================= #
|
702
|
+
def show_only_exams_for_which_we_are_registered?
|
703
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered]
|
704
|
+
end
|
705
|
+
|
706
|
+
# ========================================================================= #
|
707
|
+
# === set_input
|
708
|
+
# ========================================================================= #
|
709
|
+
def set_input(i = '')
|
710
|
+
i = i.first if i.is_a? Array
|
711
|
+
i = i.to_s.dup
|
712
|
+
@input = i
|
713
|
+
end
|
714
|
+
|
715
|
+
# ========================================================================= #
|
716
|
+
# === set_do_not_exit
|
717
|
+
# ========================================================================= #
|
718
|
+
def set_do_not_exit(i = true)
|
719
|
+
@internal_hash[:shall_we_exit] = i
|
720
|
+
end
|
721
|
+
|
722
|
+
# ========================================================================= #
|
723
|
+
# === input?
|
724
|
+
# ========================================================================= #
|
725
|
+
def input?
|
726
|
+
@input
|
727
|
+
end
|
728
|
+
|
729
|
+
# ========================================================================= #
|
730
|
+
# === set_show_n_upcoming_exams
|
731
|
+
# ========================================================================= #
|
732
|
+
def set_show_n_upcoming_exams(
|
733
|
+
i = :all_of_them
|
734
|
+
)
|
735
|
+
i = i.to_i if i.is_a? String
|
736
|
+
@show_n_upcoming_exams = i
|
737
|
+
end
|
738
|
+
|
739
|
+
# ========================================================================= #
|
740
|
+
# === do_not_report_anything
|
741
|
+
# ========================================================================= #
|
742
|
+
def do_not_report_anything
|
743
|
+
@report_result = false
|
744
|
+
end
|
745
|
+
|
746
|
+
# ========================================================================= #
|
747
|
+
# === sort_dataset_by_time
|
748
|
+
# ========================================================================= #
|
749
|
+
def sort_dataset_by_time
|
750
|
+
@dataset = @dataset.sort_by {|name_of_the_lecture, inner_hash|
|
751
|
+
# ===================================================================== #
|
752
|
+
# We will next select lectures that have the entry called
|
753
|
+
# registered.
|
754
|
+
# However had, not all lectures may have this entry - for example,
|
755
|
+
# some lectures have exam entries for which we have not yet
|
756
|
+
# registered. So the following code has to keep this in "mind".
|
757
|
+
# ===================================================================== #
|
758
|
+
if inner_hash.has_key? 'registered'
|
759
|
+
if inner_hash['registered'].respond_to? :first
|
760
|
+
the_exam_will_happen_when = inner_hash['registered'].first
|
761
|
+
else
|
762
|
+
opne crimson(name_of_the_lecture)+' has no key called `'+
|
763
|
+
sfancy('registered')+'`.'
|
764
|
+
opne swarn('Please fix this error before we can continue.')
|
765
|
+
exit
|
766
|
+
end
|
767
|
+
else
|
768
|
+
the_exam_will_happen_when = inner_hash['not_yet_registered']
|
769
|
+
if the_exam_will_happen_when
|
770
|
+
the_exam_will_happen_when = the_exam_will_happen_when.first
|
771
|
+
else
|
772
|
+
opnn; ewarn 'No dataset found for the key '+
|
773
|
+
slateblue('not_yet_registered')
|
774
|
+
opnn; ewarn 'This may be because you forgot to add '\
|
775
|
+
'a " -" entry for this key.'
|
776
|
+
opnn; ewarn 'Please correct this error. '\
|
777
|
+
'Exiting now until this error has been resolved.'
|
778
|
+
exit
|
779
|
+
end
|
780
|
+
end
|
781
|
+
parse_time_entry_from_this_string(the_exam_will_happen_when)
|
782
|
+
}
|
783
|
+
end
|
784
|
+
|
785
|
+
# ========================================================================= #
|
786
|
+
# === return_startzeit_from
|
787
|
+
# ========================================================================= #
|
788
|
+
def return_startzeit_from(i)
|
789
|
+
return i.scan(
|
790
|
+
/\d{1,2}:\d{1,2}-\d{1,2}:\d{1,2}/ # This is the regex we are currently using.
|
791
|
+
).flatten.first
|
792
|
+
end
|
793
|
+
|
794
|
+
# ========================================================================= #
|
795
|
+
# === display_total_ects
|
796
|
+
# ========================================================================= #
|
797
|
+
def display_total_ects
|
798
|
+
if SHOW_TOTAL_ECTS_POINTS_PASSED
|
799
|
+
total_n_ects = @dataset.select {|a, b|
|
800
|
+
b[:ects]
|
801
|
+
}.map {|a,b|
|
802
|
+
b[:ects]
|
803
|
+
}.sum.to_s
|
804
|
+
plus = "+#{total_n_ects}"
|
805
|
+
e
|
806
|
+
e (' ' * 60)+
|
807
|
+
limegreen('Total ECTS passed so far: ').to_s+
|
808
|
+
colourize_ects_points(::Studium.n_ects_passed_so_far).to_s
|
809
|
+
e (' ' * 60).to_s+
|
810
|
+
limegreen('ECTS of the above exams: ')+
|
811
|
+
colourize_ects_points(plus)
|
812
|
+
end
|
813
|
+
end
|
814
|
+
|
815
|
+
# ========================================================================= #
|
816
|
+
# === n_exams?
|
817
|
+
# ========================================================================= #
|
818
|
+
def n_exams?
|
819
|
+
@dataset.size
|
820
|
+
end
|
821
|
+
|
822
|
+
# ========================================================================= #
|
823
|
+
# === return_date_of_the_exam
|
824
|
+
#
|
825
|
+
# This method will extract dd.mm.yyyy.
|
826
|
+
# ========================================================================= #
|
827
|
+
def return_date_of_the_exam(i)
|
828
|
+
i.scan(
|
829
|
+
/(\d{1,2}\.\d{1,2}\.\d{4})/
|
830
|
+
).flatten.first
|
831
|
+
end
|
832
|
+
|
833
|
+
# ========================================================================= #
|
834
|
+
# === in_n_days
|
835
|
+
# ========================================================================= #
|
836
|
+
def in_n_days(i)
|
837
|
+
if i.include? '-'
|
838
|
+
i = i.split('-').first
|
839
|
+
end
|
840
|
+
future_time = Time.parse(i).to_i - Time.now.to_i
|
841
|
+
result = future_time.to_f / ONE_DAY.to_f
|
842
|
+
result.ceil(1)
|
843
|
+
end
|
844
|
+
|
845
|
+
# ========================================================================= #
|
846
|
+
# === return_red_vertical_bar
|
847
|
+
#
|
848
|
+
# Note that this will have the proper colour already.
|
849
|
+
# ========================================================================= #
|
850
|
+
def return_red_vertical_bar
|
851
|
+
"#{short_vertical_bar} "
|
852
|
+
end; alias return_vertical_bar return_red_vertical_bar # === return_red_vertical_bar
|
853
|
+
|
854
|
+
# ========================================================================= #
|
855
|
+
# === short_vertical_bar
|
856
|
+
# ========================================================================= #
|
857
|
+
def short_vertical_bar
|
858
|
+
swarn(SEPARATOR_TOKEN_TO_USE)
|
859
|
+
end
|
860
|
+
|
861
|
+
# ========================================================================= #
|
862
|
+
# === show_n_upcoming_exams?
|
863
|
+
# ========================================================================= #
|
864
|
+
def show_n_upcoming_exams?
|
865
|
+
@show_n_upcoming_exams
|
866
|
+
end; alias show_n_exams? show_n_upcoming_exams? # === show_n_exams?
|
867
|
+
|
868
|
+
# ========================================================================= #
|
869
|
+
# === report_result?
|
870
|
+
# ========================================================================= #
|
871
|
+
def report_result?
|
872
|
+
@report_result
|
873
|
+
end
|
874
|
+
|
875
|
+
# ========================================================================= #
|
876
|
+
# === colourize_ects_points
|
877
|
+
# ========================================================================= #
|
878
|
+
def colourize_ects_points(i)
|
879
|
+
lightgreen(i)
|
880
|
+
end
|
881
|
+
|
882
|
+
# ========================================================================= #
|
883
|
+
# === return_location (ort tag)
|
884
|
+
#
|
885
|
+
# This method will return a String, depending on whether the substring
|
886
|
+
# 'Ort' is part of the given input or whether it is not.
|
887
|
+
# ========================================================================= #
|
888
|
+
def return_location(i)
|
889
|
+
if i.include? 'Ort'
|
890
|
+
scan_result = i.scan(/(Ort: .+)$/).flatten
|
891
|
+
scan_result = scan_result.first if scan_result.respond_to?(:first)
|
892
|
+
" #{scan_result}"
|
893
|
+
else
|
894
|
+
'(No specific Ort has been found - or is known)'
|
895
|
+
end
|
896
|
+
end
|
897
|
+
|
898
|
+
# ========================================================================= #
|
899
|
+
# === is_part_of_the_vector_curriculum?
|
900
|
+
#
|
901
|
+
# This checks whether the lecture at hand is part of the individual
|
902
|
+
# Vector-Curriculum.
|
903
|
+
# ========================================================================= #
|
904
|
+
def is_part_of_the_vector_curriculum?(i = '')
|
905
|
+
::Studium.is_this_lecture_part_of_the_vector_curriculum( # <- In the file studium/toplevel_methods/is_this_lecture_part_of_the_vector_curriculum.rb
|
906
|
+
i, :be_lenient
|
907
|
+
)
|
908
|
+
end
|
909
|
+
|
910
|
+
# ========================================================================= #
|
911
|
+
# === consider_renaming_the_konsole_tab
|
912
|
+
#
|
913
|
+
# We should actually check whether we are using Kde Konsole or not.
|
914
|
+
#
|
915
|
+
# We will then run system 'clear', but only if we have enabled
|
916
|
+
# reporting.
|
917
|
+
# ========================================================================= #
|
918
|
+
def consider_renaming_the_konsole_tab(
|
919
|
+
use_this_namespace = :Roebe
|
920
|
+
)
|
921
|
+
if report_result? and
|
922
|
+
konsole_support?
|
923
|
+
begin
|
924
|
+
require 'roebe/classes/kde/kde_konsole/kde_konsole.rb'
|
925
|
+
rescue LoadError; end
|
926
|
+
if Object.const_defined? use_this_namespace
|
927
|
+
# =================================================================== #
|
928
|
+
# We will also use a small icon for the KDE-renaming action.
|
929
|
+
# =================================================================== #
|
930
|
+
e Roebe.return_important_notification("Next #{n_exams?} exams")
|
931
|
+
system 'clear' # Required to get rid of the annoying KDebug output from KDE Konsole.
|
932
|
+
end
|
933
|
+
end
|
934
|
+
end
|
935
|
+
|
936
|
+
# ========================================================================= #
|
937
|
+
# === parse_time_entry_from_this_string
|
938
|
+
# ========================================================================= #
|
939
|
+
def parse_time_entry_from_this_string(
|
940
|
+
the_exam_will_happen_when
|
941
|
+
)
|
942
|
+
the_exam_will_happen_when = remove_german_weekdays(the_exam_will_happen_when).strip
|
943
|
+
the_exam_will_happen_when =~ REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM
|
944
|
+
this_time = $1.to_s.dup
|
945
|
+
begin
|
946
|
+
Time.parse(this_time) # This method will return a time-parsed entry.
|
947
|
+
rescue Exception => error
|
948
|
+
e 'Input to this method was:'
|
949
|
+
e
|
950
|
+
e " #{sfancy(the_exam_will_happen_when)}"
|
951
|
+
e
|
952
|
+
pp error
|
953
|
+
exit
|
954
|
+
end
|
955
|
+
end
|
956
|
+
|
957
|
+
# ========================================================================= #
|
958
|
+
# === dataset?
|
959
|
+
# ========================================================================= #
|
960
|
+
def dataset?
|
961
|
+
@dataset
|
962
|
+
end; alias result? dataset? # === result?
|
963
|
+
|
964
|
+
# ========================================================================= #
|
965
|
+
# === n_ljust_to_the_left?
|
966
|
+
# ========================================================================= #
|
967
|
+
def n_ljust_to_the_left?
|
968
|
+
@internal_hash[:n_ljust_to_the_left]
|
969
|
+
end; alias left_pad? n_ljust_to_the_left? # === left_pad?
|
970
|
+
|
971
|
+
# ========================================================================= #
|
972
|
+
# === report_today
|
973
|
+
# ========================================================================= #
|
974
|
+
def report_today(
|
975
|
+
show_n_exams = show_n_exams?
|
976
|
+
)
|
977
|
+
if @report_result
|
978
|
+
opne yellowgreen('Heute ist der ')+
|
979
|
+
sfancy(dd_mm_yyyy)+' '+
|
980
|
+
yellowgreen('(')+
|
981
|
+
lightgreen(
|
982
|
+
# translate_dd_mm_yyy_to_weekday(dd_mm_yyyy)
|
983
|
+
german_weekday?(dd_mm_yyyy)
|
984
|
+
)+
|
985
|
+
yellowgreen('). Die nächsten ')+
|
986
|
+
lightslategray(show_n_exams.to_s)+
|
987
|
+
yellowgreen(' Prüfungen sind: ')
|
988
|
+
e
|
989
|
+
end
|
990
|
+
end
|
991
|
+
|
992
|
+
# ========================================================================= #
|
993
|
+
# === colourize_and_return_the_beginning_of_the_month
|
994
|
+
#
|
995
|
+
# This method must colourize a String such as:
|
996
|
+
#
|
997
|
+
# "[Beginn Oktober 2023] ☻ ----------------------------------------------------"
|
998
|
+
#
|
999
|
+
# ========================================================================= #
|
1000
|
+
def colourize_and_return_the_beginning_of_the_month(i)
|
1001
|
+
i = i.dup
|
1002
|
+
i.gsub!(/-/, tomato('-'))
|
1003
|
+
if i.include?('☻')
|
1004
|
+
i.sub!(/☻/, gold('☻'))
|
1005
|
+
end
|
1006
|
+
i.gsub!(/(\d{4})/, darkgoldenrod('\1'))
|
1007
|
+
i.sub!(/(\[Beginn (.+))/, saddlebrown('\1'))
|
1008
|
+
i.sub!(/\]/, saddlebrown(']'))
|
1009
|
+
if i.include? 'ECTS' # Colourize e. g. [^^^ 22.0 ECTS].
|
1010
|
+
i.sub!(
|
1011
|
+
/(\[\^\^\^ \d{1,3}\.\d{1} ECTS\])/,
|
1012
|
+
colourize_ects_points('\1')
|
1013
|
+
)
|
1014
|
+
end
|
1015
|
+
return i
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
# ========================================================================= #
|
1019
|
+
# === show_horizontal_bar
|
1020
|
+
#
|
1021
|
+
# This will show a red, horizontal bar - or, alternatively, also the
|
1022
|
+
# name of the month at hand.
|
1023
|
+
# ========================================================================= #
|
1024
|
+
def show_horizontal_bar(
|
1025
|
+
optional_this_month = nil,
|
1026
|
+
current_year = current_year?
|
1027
|
+
)
|
1028
|
+
if optional_this_month
|
1029
|
+
if optional_this_month.is_a? Array
|
1030
|
+
optional_this_month = optional_this_month.first
|
1031
|
+
end
|
1032
|
+
optional_this_month = number_to_month(optional_this_month)
|
1033
|
+
end
|
1034
|
+
# The next string is the one that will be shown to the left side.
|
1035
|
+
if optional_this_month
|
1036
|
+
the_left_string = ''.dup
|
1037
|
+
the_left_string << '[Beginn '+
|
1038
|
+
"#{to_german_month(optional_this_month)} #{current_year}"+
|
1039
|
+
']'
|
1040
|
+
if use_unicode_symbols?
|
1041
|
+
# ===================================================================== #
|
1042
|
+
# Display a little smiley-face next, if we make use of unicode
|
1043
|
+
# symbols.
|
1044
|
+
# ===================================================================== #
|
1045
|
+
the_left_string << " #{return_smiley_face}"
|
1046
|
+
end
|
1047
|
+
# ======================================================================= #
|
1048
|
+
# The user may pass a special Hash to this method, in which case we
|
1049
|
+
# may display some more - in particular n ECTS points registered so
|
1050
|
+
# far for the given month.
|
1051
|
+
# ======================================================================= #
|
1052
|
+
if block_given?
|
1053
|
+
yielded = yield
|
1054
|
+
if yielded.is_a? Hash
|
1055
|
+
# =================================================================== #
|
1056
|
+
# === :n_ects_points_in_this_month
|
1057
|
+
# =================================================================== #
|
1058
|
+
if yielded.has_key? :n_ects_points_in_this_month
|
1059
|
+
n_ects_points = yielded[:n_ects_points_in_this_month]
|
1060
|
+
if n_ects_points > 0
|
1061
|
+
n_ects_points_string = " [^^^ #{n_ects_points} ECTS] "
|
1062
|
+
the_left_string << n_ects_points_string
|
1063
|
+
end
|
1064
|
+
end
|
1065
|
+
end
|
1066
|
+
end
|
1067
|
+
the_left_string = the_left_string.ljust(
|
1068
|
+
@internal_hash[:n_ljust_to_the_left]+5, '-'
|
1069
|
+
)
|
1070
|
+
the_left_string = colourize_and_return_the_beginning_of_the_month(the_left_string)
|
1071
|
+
# ======================================================================= #
|
1072
|
+
# Past this point we have the right side - this one can
|
1073
|
+
# simply be appended, as-is.
|
1074
|
+
# ======================================================================= #
|
1075
|
+
the_left_string << short_vertical_bar+
|
1076
|
+
palegreen(' [Datum] ')+
|
1077
|
+
swarn('-'*1)+
|
1078
|
+
tomato(' ⌛')+
|
1079
|
+
swarn('-'*48)+
|
1080
|
+
"\n"
|
1081
|
+
e tomato('-')+the_left_string
|
1082
|
+
end
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# ========================================================================= #
|
1086
|
+
# === return_smiley_face
|
1087
|
+
# ========================================================================= #
|
1088
|
+
def return_smiley_face
|
1089
|
+
Roebe.black_smiling_face
|
1090
|
+
end
|
1091
|
+
|
1092
|
+
# ========================================================================= #
|
1093
|
+
# === sanitize_dataset
|
1094
|
+
# ========================================================================= #
|
1095
|
+
def sanitize_dataset
|
1096
|
+
# ======================================================================= #
|
1097
|
+
# Select all lectures for which we are either registered, or
|
1098
|
+
# not_yet_registered_for_an_upcoming_exam_at - the latter applies
|
1099
|
+
# to lectures where we will still have to register for.
|
1100
|
+
# ======================================================================= #
|
1101
|
+
@dataset = @dataset_from_file_lecture_information.select {|name, inner_hash|
|
1102
|
+
if inner_hash.nil?
|
1103
|
+
e rev+'Some erroneous entry for `'+tomato(name)+rev+'`.'
|
1104
|
+
end
|
1105
|
+
# ===================================================================== #
|
1106
|
+
# Next we must select all entries that are relevant. This will be
|
1107
|
+
# done by querying the Hash stored in the inner_hash variable.
|
1108
|
+
# ===================================================================== #
|
1109
|
+
inner_hash.has_key?('registered') or
|
1110
|
+
inner_hash.has_key?('not_yet_registered')
|
1111
|
+
}
|
1112
|
+
sort_dataset_by_time
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
# ========================================================================= #
|
1116
|
+
# === Studium::ShowUpcomingExams.next_exam?
|
1117
|
+
#
|
1118
|
+
# This class-method will always tell us which exam will come next.
|
1119
|
+
#
|
1120
|
+
# This method will return an Array, such as:
|
1121
|
+
#
|
1122
|
+
# ["500157 Populationsgenetik", {:ects=>1.5, :sws=>1.5,
|
1123
|
+
#
|
1124
|
+
# The first entry is the LVA-id and the name of the course; then comes
|
1125
|
+
# the Hash with the data, exactly as it is stored in the file called
|
1126
|
+
# 'lecture_information.yml'.
|
1127
|
+
# ========================================================================= #
|
1128
|
+
def self.next_exam?
|
1129
|
+
new(:be_silent).result?.first
|
1130
|
+
end
|
1131
|
+
|
1132
|
+
# ========================================================================= #
|
1133
|
+
# === store_old_upcoming_exams
|
1134
|
+
#
|
1135
|
+
# This method will store the old upcoming exams. It will always trigger
|
1136
|
+
# the storing-routine, so if you need to make additional checks, do so
|
1137
|
+
# before calling that method.
|
1138
|
+
# ========================================================================= #
|
1139
|
+
def store_old_upcoming_exams
|
1140
|
+
Studium.save_all_registered_upcoming_exams # ← Save the upcoming exams here.
|
1141
|
+
end
|
1142
|
+
|
1143
|
+
# ========================================================================= #
|
1144
|
+
# === run (run tag)
|
1145
|
+
# ========================================================================= #
|
1146
|
+
def run
|
1147
|
+
menu
|
1148
|
+
consider_renaming_the_konsole_tab
|
1149
|
+
consider_autogenerating_exam_aliases
|
1150
|
+
report
|
1151
|
+
store_old_upcoming_exams # ← Store the upcoming-exams into a file as well.
|
1152
|
+
end
|
1153
|
+
|
1154
|
+
# ========================================================================= #
|
1155
|
+
# === Studium::ShowUpcomingExams.return_all_registered_upcoming_exams
|
1156
|
+
#
|
1157
|
+
# Return all upcoming exams, without limitation, as an Array. This Array
|
1158
|
+
# can then be used, for example, in a GUI where it is displayed to the
|
1159
|
+
# user.
|
1160
|
+
#
|
1161
|
+
# Usage example:
|
1162
|
+
#
|
1163
|
+
# dataset = Studium::ShowUpcomingExams.return_all_registered_upcoming_exams
|
1164
|
+
#
|
1165
|
+
# ========================================================================= #
|
1166
|
+
def self.return_all_registered_upcoming_exams(&block)
|
1167
|
+
result = Studium::ShowUpcomingExams.new(
|
1168
|
+
:do_not_report_anything_and_do_not_update_the_cd_aliases
|
1169
|
+
).result?
|
1170
|
+
# ======================================================================= #
|
1171
|
+
# === Handle blocks next
|
1172
|
+
# ======================================================================= #
|
1173
|
+
if block_given?
|
1174
|
+
yielded = yield
|
1175
|
+
case yielded
|
1176
|
+
# ===================================================================== #
|
1177
|
+
# === :only_for_registered_exams
|
1178
|
+
# ===================================================================== #
|
1179
|
+
when :only_for_registered_exams
|
1180
|
+
result = result.select {|a, b|
|
1181
|
+
b.has_key?('registered')
|
1182
|
+
}
|
1183
|
+
end
|
1184
|
+
end
|
1185
|
+
return result
|
1186
|
+
end; self.instance_eval { alias upcoming_exams? return_all_registered_upcoming_exams } # === Studium::ShowUpcomingExams.upcoming_exams?
|
1187
|
+
|
1188
|
+
# ========================================================================= #
|
1189
|
+
# === Studium::ShowUpcomingExams[]
|
1190
|
+
# ========================================================================= #
|
1191
|
+
def self.[](i = ARGV, &block)
|
1192
|
+
new(i, &block)
|
1193
|
+
end
|
1194
|
+
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# =========================================================================== #
|
1198
|
+
# === Studium.return_all_registered_upcoming_exams
|
1199
|
+
#
|
1200
|
+
# This method is recommended to be used if you need to return all
|
1201
|
+
# upcoming exams.
|
1202
|
+
# =========================================================================== #
|
1203
|
+
def self.return_all_registered_upcoming_exams(&block)
|
1204
|
+
Studium::ShowUpcomingExams.return_all_registered_upcoming_exams(&block)
|
1205
|
+
end; self.instance_eval { alias upcoming_exams? return_all_registered_upcoming_exams } # === Studium.upcoming_exams?
|
1206
|
+
|
1207
|
+
# =========================================================================== #
|
1208
|
+
# === Studium.show_upcoming_exams
|
1209
|
+
# =========================================================================== #
|
1210
|
+
def self.show_upcoming_exams(
|
1211
|
+
show_n_exams = :all_of_them,
|
1212
|
+
pass_this_array_onto_the_menu = nil,
|
1213
|
+
&block
|
1214
|
+
)
|
1215
|
+
if block_given?
|
1216
|
+
yielded = yield
|
1217
|
+
if yielded.is_a? Hash
|
1218
|
+
yielded.merge!(
|
1219
|
+
show_n_upcoming_exams: show_n_exams
|
1220
|
+
)
|
1221
|
+
elsif yielded.is_a? Symbol
|
1222
|
+
hash = { show_n_upcoming_exams: show_n_exams }
|
1223
|
+
hash.merge!(
|
1224
|
+
array_of_symbols: [yielded]
|
1225
|
+
)
|
1226
|
+
end
|
1227
|
+
end
|
1228
|
+
_ = Studium::ShowUpcomingExams.new(show_n_exams, :do_not_run_yet) { yielded }
|
1229
|
+
if pass_this_array_onto_the_menu and
|
1230
|
+
!pass_this_array_onto_the_menu.empty?
|
1231
|
+
_.menu(pass_this_array_onto_the_menu)
|
1232
|
+
end
|
1233
|
+
if block_given?
|
1234
|
+
yielded = yield
|
1235
|
+
case yielded
|
1236
|
+
when :do_not_use_opn
|
1237
|
+
_.do_not_use_opn
|
1238
|
+
end
|
1239
|
+
end
|
1240
|
+
_.run
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
# =========================================================================== #
|
1244
|
+
# === Studium.d100
|
1245
|
+
# =========================================================================== #
|
1246
|
+
def self.d100
|
1247
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1248
|
+
Studium.show_upcoming_exams(100)
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# =========================================================================== #
|
1252
|
+
# === Studium.d25
|
1253
|
+
# =========================================================================== #
|
1254
|
+
def self.d25
|
1255
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1256
|
+
Studium.show_upcoming_exams(25)
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
# =========================================================================== #
|
1260
|
+
# === Studium.d20
|
1261
|
+
# =========================================================================== #
|
1262
|
+
def self.d20
|
1263
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1264
|
+
Studium.show_upcoming_exams(20)
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# =========================================================================== #
|
1268
|
+
# === Studium.d15
|
1269
|
+
# =========================================================================== #
|
1270
|
+
def self.d15
|
1271
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1272
|
+
Studium.show_upcoming_exams(15)
|
1273
|
+
end
|
1274
|
+
|
1275
|
+
# =========================================================================== #
|
1276
|
+
# === Studium.d10
|
1277
|
+
# =========================================================================== #
|
1278
|
+
def self.d10
|
1279
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1280
|
+
Studium.show_upcoming_exams(10)
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# =========================================================================== #
|
1284
|
+
# === Studium.d5
|
1285
|
+
# =========================================================================== #
|
1286
|
+
def self.d5
|
1287
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1288
|
+
Studium.show_upcoming_exams(5)
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
# =========================================================================== #
|
1292
|
+
# === Studium.d3
|
1293
|
+
# =========================================================================== #
|
1294
|
+
def self.d3
|
1295
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1296
|
+
Studium.show_upcoming_exams(3)
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
# =========================================================================== #
|
1300
|
+
# === Studium.next_exam?
|
1301
|
+
#
|
1302
|
+
# This method will return an Array.
|
1303
|
+
#
|
1304
|
+
# Result may be like this:
|
1305
|
+
#
|
1306
|
+
# ["300178 Mikrob. Lebensgemeinschaften", {:ects=>3.0, etc..]
|
1307
|
+
#
|
1308
|
+
# =========================================================================== #
|
1309
|
+
def self.next_exam?
|
1310
|
+
::Studium::ShowUpcomingExams.next_exam?
|
1311
|
+
end
|
1312
|
+
|
1313
|
+
# =========================================================================== #
|
1314
|
+
# === Studium.return_upcoming_exams_as_HTML
|
1315
|
+
# =========================================================================== #
|
1316
|
+
def self.return_upcoming_exams_as_HTML(
|
1317
|
+
hash = {}
|
1318
|
+
)
|
1319
|
+
_ = '<div'.dup
|
1320
|
+
if hash and hash.is_a?(Hash)
|
1321
|
+
# ======================================================================= #
|
1322
|
+
# === :css_style
|
1323
|
+
# ======================================================================= #
|
1324
|
+
if hash.has_key? :css_style
|
1325
|
+
_ << ' style="'+
|
1326
|
+
hash.delete(:css_style).to_s+
|
1327
|
+
'"'
|
1328
|
+
end
|
1329
|
+
end
|
1330
|
+
_ << ">\n"
|
1331
|
+
Studium.enable_www_mode
|
1332
|
+
time_now = ::Time.now
|
1333
|
+
dataset = Studium.upcoming_exams? { :only_for_registered_exams }
|
1334
|
+
dataset.each {|a, inner_hash|
|
1335
|
+
homepage = inner_hash[:homepage]
|
1336
|
+
homepage = homepage.first if homepage.is_a? Array
|
1337
|
+
homepage = homepage.to_s
|
1338
|
+
n_ECTS = inner_hash[:ects]
|
1339
|
+
registered_for_the_exam_on_this_day = inner_hash['registered']
|
1340
|
+
if registered_for_the_exam_on_this_day.is_a? Array
|
1341
|
+
registered_for_the_exam_on_this_day = registered_for_the_exam_on_this_day.first
|
1342
|
+
end
|
1343
|
+
only_the_exam_day = registered_for_the_exam_on_this_day.scan(
|
1344
|
+
/\d{2}\.\d{2}\.\d{4}/
|
1345
|
+
).flatten.first
|
1346
|
+
future_time = ::Time.parse(only_the_exam_day)
|
1347
|
+
time_difference = future_time - time_now
|
1348
|
+
_ << '<p class="default">'+"\n"
|
1349
|
+
# ======================================================================= #
|
1350
|
+
# The header. Note that the CSS class specific_exam_date can be
|
1351
|
+
# used to style the specific exam date.
|
1352
|
+
# ======================================================================= #
|
1353
|
+
_ << Cyberweb.boldbr(
|
1354
|
+
HtmlTags.a(homepage, content: a)+
|
1355
|
+
' <b class="indigo">['+n_ECTS.to_s+' ECTS]</b>'
|
1356
|
+
)+'<br>'+
|
1357
|
+
'<span class="marl1em">Exam on:</span> '+
|
1358
|
+
'<span class="BOLD specific_exam_date">'+
|
1359
|
+
registered_for_the_exam_on_this_day.to_s+
|
1360
|
+
'</span> '+ # This has the special CSS class.
|
1361
|
+
'(in <b class="darkgreen">'+(
|
1362
|
+
(time_difference / 60 / 60) / 24
|
1363
|
+
).round(1).to_s+' days</b>)'
|
1364
|
+
_ << "</p>\n"
|
1365
|
+
_ << Cyberweb.fancy_spacer
|
1366
|
+
}
|
1367
|
+
_ << "</div>\n"
|
1368
|
+
return _
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
if __FILE__ == $PROGRAM_NAME
|
1374
|
+
Studium::ShowUpcomingExams.new(ARGV)
|
1375
|
+
end # showupcomingexams
|