studium 0.18.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +3310 -0
- data/bin/all_passed_exams +14 -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/d150 +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 +15 -0
- data/bin/names_of_all_solved_exams +7 -0
- data/bin/not_completed_exams +7 -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/passed_this_exam_on +10 -0
- data/bin/pdf_for +7 -0
- data/bin/question_answer +7 -0
- data/bin/random_exam_topic +7 -0
- data/bin/registered_for_this_exam +15 -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_actions +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 +85 -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 +3263 -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/actions/actions.rb +134 -0
- data/lib/studium/autoinclude.rb +7 -0
- data/lib/studium/base/base.rb +3554 -0
- data/lib/studium/base/commandline_arguments_module/commandline_arguments_module.rb +115 -0
- data/lib/studium/base/html_colours_module.rb +632 -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 +138 -0
- data/lib/studium/check_and_sanitize/check_the_lecture_information_file.rb +166 -0
- data/lib/studium/check_and_sanitize/correct_all_dates_in_the_file_lecture_information.rb +115 -0
- data/lib/studium/check_and_sanitize/date_sanitizer.rb +350 -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 +434 -0
- data/lib/studium/colours/colours.rb +1711 -0
- data/lib/studium/commandline/commandline.rb +1848 -0
- data/lib/studium/constants/constants.rb +2063 -0
- data/lib/studium/css/project.css +273 -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 +141 -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 +99 -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 +74 -0
- data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +73 -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 +47 -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/search_for_n_ects.rb +719 -0
- data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +245 -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 +50 -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 +116 -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 +937 -0
- data/lib/studium/exam_topics/advanced_biotechnology +234 -0
- data/lib/studium/exam_topics/advanced_cellbiology +251 -0
- data/lib/studium/exam_topics/advanced_chemistry +547 -0
- data/lib/studium/exam_topics/advanced_immunology +225 -0
- data/lib/studium/exam_topics/advanced_microbiology +49 -0
- data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +117 -0
- data/lib/studium/exam_topics/advanced_virology +273 -0
- data/lib/studium/exam_topics/ageing +154 -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 +30 -0
- data/lib/studium/exam_topics/algorithms +104 -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 +1012 -0
- data/lib/studium/exam_topics/aminoacids +469 -0
- data/lib/studium/exam_topics/analytische_chemie_1 +134 -0
- data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
- data/lib/studium/exam_topics/anatomie +378 -0
- data/lib/studium/exam_topics/anorganische_chemie +357 -0
- data/lib/studium/exam_topics/anthropologie +239 -0
- data/lib/studium/exam_topics/antibodies_and_antigens +790 -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/archaeology +5 -0
- data/lib/studium/exam_topics/architecture +8 -0
- data/lib/studium/exam_topics/artificial_intelligence +90 -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 +1008 -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 +451 -0
- data/lib/studium/exam_topics/biochips +80 -0
- data/lib/studium/exam_topics/bioelektrochemie +57 -0
- data/lib/studium/exam_topics/biofilms +58 -0
- data/lib/studium/exam_topics/bioinformatics +523 -0
- data/lib/studium/exam_topics/biological_therapeutics +156 -0
- data/lib/studium/exam_topics/biologie +152 -0
- data/lib/studium/exam_topics/biomarkers +137 -0
- data/lib/studium/exam_topics/biomaterials +90 -0
- data/lib/studium/exam_topics/biomedical_studies +16 -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 +488 -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 +210 -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 +520 -0
- data/lib/studium/exam_topics/computer_science +309 -0
- data/lib/studium/exam_topics/computer_vision_and_computer_graphics +15 -0
- data/lib/studium/exam_topics/crispr +51 -0
- data/lib/studium/exam_topics/cyanobacteria +45 -0
- data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +598 -0
- data/lib/studium/exam_topics/databases_and_sql +126 -0
- data/lib/studium/exam_topics/dna_mutation_and_dna_repair +186 -0
- data/lib/studium/exam_topics/dna_replication +80 -0
- data/lib/studium/exam_topics/ecogenetics +26 -0
- data/lib/studium/exam_topics/ecological_agriculture +12 -0
- data/lib/studium/exam_topics/ecology +332 -0
- data/lib/studium/exam_topics/economy +226 -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 +657 -0
- data/lib/studium/exam_topics/endospores_and_spores +104 -0
- data/lib/studium/exam_topics/enzymes_and_cofactors +395 -0
- data/lib/studium/exam_topics/epigenetik +188 -0
- data/lib/studium/exam_topics/erste_hilfe +414 -0
- data/lib/studium/exam_topics/ethik +143 -0
- data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +372 -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 +65 -0
- data/lib/studium/exam_topics/forstwirtschaft +53 -0
- data/lib/studium/exam_topics/fortgeschrittene_genetik +692 -0
- data/lib/studium/exam_topics/fortgeschrittene_gentechnik +221 -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 +209 -0
- data/lib/studium/exam_topics/genexpression +1008 -0
- data/lib/studium/exam_topics/genomics_and_metagenomics +290 -0
- data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +961 -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 +131 -0
- data/lib/studium/exam_topics/glyoxylatzyklus +31 -0
- data/lib/studium/exam_topics/grassland_cultivation +32 -0
- data/lib/studium/exam_topics/hormone +152 -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 +270 -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 +52 -0
- data/lib/studium/exam_topics/insekten +66 -0
- data/lib/studium/exam_topics/insulin_and_diabetes +57 -0
- data/lib/studium/exam_topics/java +624 -0
- data/lib/studium/exam_topics/javascript +29 -0
- data/lib/studium/exam_topics/klima +6 -0
- data/lib/studium/exam_topics/kryptographie +10 -0
- data/lib/studium/exam_topics/landtechnik +26 -0
- data/lib/studium/exam_topics/lebensmittel_und_getr/303/244nke +224 -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 +145 -0
- data/lib/studium/exam_topics/macroeconomics +39 -0
- data/lib/studium/exam_topics/marketing +53 -0
- data/lib/studium/exam_topics/mathematics +311 -0
- data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +254 -0
- data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +441 -0
- data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
- data/lib/studium/exam_topics/metabolismus +482 -0
- data/lib/studium/exam_topics/meteorologie_und_atmosph/303/244re +120 -0
- data/lib/studium/exam_topics/microbial_ecology +37 -0
- data/lib/studium/exam_topics/microcontrollers +11 -0
- data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +58 -0
- data/lib/studium/exam_topics/mikrobielle_physiologie +313 -0
- data/lib/studium/exam_topics/mitochondria +57 -0
- data/lib/studium/exam_topics/mixed +287 -0
- data/lib/studium/exam_topics/molecular_biology_of_plants +281 -0
- data/lib/studium/exam_topics/molekulare_medizin +133 -0
- data/lib/studium/exam_topics/nanotechnologie +456 -0
- data/lib/studium/exam_topics/nature_conservation_and_biodiversity +247 -0
- data/lib/studium/exam_topics/naturstoffe +9 -0
- data/lib/studium/exam_topics/netzwerke +63 -0
- data/lib/studium/exam_topics/neuroanatomie +25 -0
- data/lib/studium/exam_topics/neurobiology +356 -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 +15 -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 +137 -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 +761 -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 +262 -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 +252 -0
- data/lib/studium/exam_topics/physik +449 -1
- data/lib/studium/exam_topics/physikalische_chemie +79 -0
- data/lib/studium/exam_topics/physiology_and_histology +592 -0
- data/lib/studium/exam_topics/phytochemie +33 -0
- data/lib/studium/exam_topics/plant_biotechnology +132 -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 +143 -0
- data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +198 -0
- data/lib/studium/exam_topics/programming +41 -0
- data/lib/studium/exam_topics/projektmanagement +226 -0
- data/lib/studium/exam_topics/prokaryote_genetics +587 -0
- data/lib/studium/exam_topics/protein_engineering +35 -0
- data/lib/studium/exam_topics/proteolyse +39 -0
- data/lib/studium/exam_topics/proteomik +42 -0
- data/lib/studium/exam_topics/protozoans +24 -0
- data/lib/studium/exam_topics/prozesstechnik +95 -0
- data/lib/studium/exam_topics/psychologie +21 -0
- data/lib/studium/exam_topics/python +391 -0
- data/lib/studium/exam_topics/quality_management +266 -0
- data/lib/studium/exam_topics/rechtsgrundlagen +126 -0
- data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
- data/lib/studium/exam_topics/rna_and_dna +535 -0
- data/lib/studium/exam_topics/rna_seq +13 -0
- data/lib/studium/exam_topics/robotics +12 -0
- data/lib/studium/exam_topics/ruby +240 -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 +327 -0
- data/lib/studium/exam_topics/signal_transduction_and_laser_systems +215 -0
- data/lib/studium/exam_topics/sozialbiologie +17 -0
- data/lib/studium/exam_topics/soziologie +5 -0
- data/lib/studium/exam_topics/splicing_exons_and_introns +67 -0
- data/lib/studium/exam_topics/sport_und_sportverletzungen +6 -0
- data/lib/studium/exam_topics/statistik +306 -0
- data/lib/studium/exam_topics/stemcells +182 -0
- data/lib/studium/exam_topics/stickstofffixierung +91 -0
- data/lib/studium/exam_topics/structural_bioinformatics +54 -0
- data/lib/studium/exam_topics/strukturbiologie +445 -0
- data/lib/studium/exam_topics/system_biology_and_synthetic_biology +108 -0
- data/lib/studium/exam_topics/systematische_zoologie +446 -0
- data/lib/studium/exam_topics/technical_ecology +144 -0
- data/lib/studium/exam_topics/technik +5 -0
- data/lib/studium/exam_topics/technische_chemie +208 -0
- data/lib/studium/exam_topics/technische_grundlagen_der_informatik +43 -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 +102 -0
- data/lib/studium/exam_topics/the_european_union +121 -0
- data/lib/studium/exam_topics/the_interferon_system +40 -0
- data/lib/studium/exam_topics/the_microbiome +164 -0
- data/lib/studium/exam_topics/the_universe +32 -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 +508 -0
- data/lib/studium/exam_topics/transcription +188 -0
- data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +155 -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 +253 -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 +79 -0
- data/lib/studium/exam_topics/veterinary_medicine +10 -0
- data/lib/studium/exam_topics/vitamine +32 -0
- data/lib/studium/exam_topics/wasserkunde +144 -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 +338 -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_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 +404 -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 +126 -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 +444 -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 +434 -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 +2442 -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 +479 -0
- data/lib/studium/exams/lectures_without_exam_entry.rb +137 -0
- data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1358 -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 +106 -0
- data/lib/studium/exams/next_exams.rb +378 -0
- data/lib/studium/exams/not_completed/README.md +5 -0
- data/lib/studium/exams/not_completed/not_completed.rb +143 -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/question_answer/question_answer.rb +2936 -0
- data/lib/studium/exams/questions_solved_from_day_to_day/questions_solved_from_day_to_day.rb +379 -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 +114 -0
- data/lib/studium/exams/show_exams_for/show_exams_for.rb +172 -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 +538 -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 +1537 -0
- data/lib/studium/exams/solve_all_questions_from_this_topic.rb +114 -0
- data/lib/studium/exams/solved/solved.rb +434 -0
- data/lib/studium/exams/timetable/constants.rb +142 -0
- data/lib/studium/exams/timetable/timetable.rb +448 -0
- data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +163 -0
- data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +555 -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/control_panel/control_panel.rb +40 -0
- data/lib/studium/gui/gtk3/lecture_information/lecture_information.rb +191 -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_trainer/exam_trainer.rb +637 -0
- data/lib/studium/gui/jruby/show_upcoming_exams/show_upcoming_exams.rb +85 -0
- data/lib/studium/gui/libui/ask_exam_question/ask_exam_question.rb +347 -0
- data/lib/studium/gui/shared_code/control_panel/control_panel_module.rb +305 -0
- data/lib/studium/gui/shared_code/exam_trainer/exam_trainer_widget_module.rb +0 -0
- data/lib/studium/gui/shared_code/information_about_a_lecture/information_about_a_lecture_module.rb +0 -0
- data/lib/studium/gui/shared_code/show_upcoming_exams/show_upcoming_exams_module.rb +129 -0
- data/lib/studium/gui/universal_widgets/curriculum_viewer/curriculum_viewer.rb +549 -0
- data/lib/studium/gui/universal_widgets/ects_per_university/ects_per_university.rb +302 -0
- data/lib/studium/gui/universal_widgets/exam_trainer/exam_trainer.config +6 -0
- data/lib/studium/gui/universal_widgets/exam_trainer/exam_trainer.rb +3266 -0
- data/lib/studium/gui/universal_widgets/exam_trainer/manifest.yml +12 -0
- data/lib/studium/gui/universal_widgets/expand_time_range/expand_time_range.rb +309 -0
- data/lib/studium/gui/universal_widgets/information_about_a_lecture/information_about_a_lecture.rb +242 -0
- data/lib/studium/gui/universal_widgets/show_upcoming_exams/show_upcoming_exams.rb +252 -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 +138 -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_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 +7 -0
- data/lib/studium/requires/require_the_studium_project.rb +72 -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 +423 -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 +117 -0
- data/lib/studium/statistics/max_stats.rb +169 -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 +473 -0
- data/lib/studium/statistics/show_exam_statistics.rb +75 -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 +126 -0
- data/lib/studium/toplevel_methods/e_and_esystem.rb +34 -0
- data/lib/studium/toplevel_methods/find_exam_topic_and_exam_title.rb +3986 -0
- data/lib/studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb +31 -0
- data/lib/studium/toplevel_methods/return_remote_homepage_of_this_lecture.rb +11611 -0
- data/lib/studium/toplevel_methods/return_remote_moodle_link_of_this_lecture.rb +2405 -0
- data/lib/studium/toplevel_methods/roebe.rb +16 -0
- data/lib/studium/toplevel_methods/runmode.rb +45 -0
- data/lib/studium/toplevel_methods/toplevel_methods.rb +7295 -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/autogeneration/autogeneration.rb +158 -0
- data/lib/studium/utility_scripts/autopurge_this_lecture_date.rb +100 -0
- data/lib/studium/utility_scripts/average_grade_of_this_curriculum.rb +153 -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 +126 -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 +171 -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 +353 -0
- data/lib/studium/utility_scripts/generate_spreadsheet/misc.rb +144 -0
- data/lib/studium/utility_scripts/holidays/holidays.rb +154 -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 +427 -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 +214 -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 +352 -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 +261 -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 +129 -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 +373 -0
- data/lib/studium/utility_scripts/semesterplaner/semesterplaner.rb +311 -0
- data/lib/studium/utility_scripts/set_aliases_based_on_this_file.rb +96 -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 +906 -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 +3160 -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 +241 -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 +134 -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 +2019 -0
- data/lib/studium/yaml/daily_questions_solved/daily_questions_solved.yml~ +1983 -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 +264 -0
- data/lib/studium/yaml/holidays/holidays.yml +201 -0
- data/lib/studium/yaml/important_exams.yml +286 -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 +66145 -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/max_stats.yml +262 -0
- data/lib/studium/yaml/max_stats.yml +263 -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/roebe/ad_hoc_exam_topics.md +19 -0
- data/lib/studium/yaml/roebe/sommersemester_2024_opportunities.md +441 -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 +1042 -0
@@ -0,0 +1,1537 @@
|
|
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
|
+
# Studium.show_upcoming_exams(ARGV)
|
22
|
+
# =========================================================================== #
|
23
|
+
require 'studium/base/base.rb'
|
24
|
+
|
25
|
+
module Studium
|
26
|
+
|
27
|
+
class ShowUpcomingExams < Studium::Base # === Studium::ShowUpcomingExams
|
28
|
+
|
29
|
+
begin
|
30
|
+
require 'emoji_paradise' # Make the constant EmojiParadise known here, if possible.
|
31
|
+
rescue LoadError; end
|
32
|
+
|
33
|
+
# ========================================================================= #
|
34
|
+
# Toplevel-methods of the studium gem come next.
|
35
|
+
# ========================================================================= #
|
36
|
+
require 'studium/toplevel_methods/toplevel_methods.rb'
|
37
|
+
|
38
|
+
# ========================================================================= #
|
39
|
+
# === REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM
|
40
|
+
# ========================================================================= #
|
41
|
+
REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM = # See: http://rubular.com/r/6VxRmS5FKc
|
42
|
+
/(\d{1,2}\.\d{1,2}\.\d{4},?\s*\d{1,2}:\d{1,2}-\d{1,2}:\d{1,2})/
|
43
|
+
|
44
|
+
# ========================================================================= #
|
45
|
+
# === SHOW_LEADING_LVA_ID_NUMBER
|
46
|
+
#
|
47
|
+
# If the following constant is set to true, then we will also display
|
48
|
+
# the leading LVA-ID number.
|
49
|
+
#
|
50
|
+
# If it is false, that LVA-ID number will NOT be shown.
|
51
|
+
#
|
52
|
+
# The numbers make the display a bit uglier, but it may be more useful
|
53
|
+
# for the user if that user wants to use the LVA at hand via the
|
54
|
+
# browser. For instance I need to know the LVA-ID number, because that
|
55
|
+
# way I can quickly copy/paste the full name, and have the remote
|
56
|
+
# lecture course opened in my browser of choice. This is very convenient.
|
57
|
+
# ========================================================================= #
|
58
|
+
SHOW_LEADING_LVA_ID_NUMBER = true
|
59
|
+
|
60
|
+
# ========================================================================= #
|
61
|
+
# === TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES
|
62
|
+
#
|
63
|
+
# The following constant will also attempt to show the priorities of
|
64
|
+
# a given lecture at hand.
|
65
|
+
#
|
66
|
+
# This depends on the priority value having been set in the file
|
67
|
+
# called "lecture_information.yml".
|
68
|
+
#
|
69
|
+
# If, however had, such a file exists, and the following constant is
|
70
|
+
# set to true, then this class will show the priority of the lecture.
|
71
|
+
# Lower number means higher priority, and the colours picked will reflect
|
72
|
+
# this priority loosely - the lower the priority, the brighter the
|
73
|
+
# colour.
|
74
|
+
#
|
75
|
+
# The reasoning behind this is that brighter colours should be easier to
|
76
|
+
# notice by the human eyes, and hence may signal a higher "importance".
|
77
|
+
#
|
78
|
+
# The whole idea behind this constant is to visualize more easily on
|
79
|
+
# the commandline which upcoming exams are more important than others.
|
80
|
+
# ========================================================================= #
|
81
|
+
TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES = true
|
82
|
+
|
83
|
+
# ========================================================================= #
|
84
|
+
# === USE_OPN
|
85
|
+
# ========================================================================= #
|
86
|
+
USE_OPN = true
|
87
|
+
|
88
|
+
# ========================================================================= #
|
89
|
+
# === DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH
|
90
|
+
#
|
91
|
+
# If this constant is set to true, then a horizontal bar will be shown
|
92
|
+
# when a new month begins.
|
93
|
+
# ========================================================================= #
|
94
|
+
DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH = true
|
95
|
+
|
96
|
+
# ========================================================================= #
|
97
|
+
# === SEPARATOR_TOKEN_TO_USE
|
98
|
+
#
|
99
|
+
# This is the vertical separator token that is used to "separate"
|
100
|
+
# the display. Since as of January 2021, a unicode token is used;
|
101
|
+
# the original ASCII token can be seen in the following comment
|
102
|
+
# still.
|
103
|
+
# ========================================================================= #
|
104
|
+
SEPARATOR_TOKEN_TO_USE = '▏' # '┃' # '|' #|' #'❚' # '|'
|
105
|
+
|
106
|
+
# ========================================================================= #
|
107
|
+
# === SHOW_TOTAL_ECTS_POINTS_PASSED
|
108
|
+
# ========================================================================= #
|
109
|
+
SHOW_TOTAL_ECTS_POINTS_PASSED = true
|
110
|
+
|
111
|
+
# ========================================================================= #
|
112
|
+
# === initialize
|
113
|
+
#
|
114
|
+
# The first argument will keep track of the commandline-input.
|
115
|
+
#
|
116
|
+
# The input to this method should also handle blocks given, such as:
|
117
|
+
#
|
118
|
+
# Studium::ShowUpcomingExams.new { :disable_colours }
|
119
|
+
#
|
120
|
+
# ========================================================================= #
|
121
|
+
def initialize(
|
122
|
+
i = nil,
|
123
|
+
run_already = true,
|
124
|
+
&block
|
125
|
+
)
|
126
|
+
reset
|
127
|
+
case i
|
128
|
+
# ======================================================================= #
|
129
|
+
# === :be_silent
|
130
|
+
# ======================================================================= #
|
131
|
+
when :be_silent,
|
132
|
+
:do_not_report_anything
|
133
|
+
be_silent
|
134
|
+
i = nil
|
135
|
+
@report_result = false
|
136
|
+
# ======================================================================= #
|
137
|
+
# === :do_not_report_anything_and_do_not_update_the_cd_aliases
|
138
|
+
# ======================================================================= #
|
139
|
+
when :do_not_report_anything_and_do_not_update_the_cd_aliases
|
140
|
+
be_silent
|
141
|
+
i = nil
|
142
|
+
@report_result = false
|
143
|
+
@internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries] = false
|
144
|
+
end
|
145
|
+
set_input(i)
|
146
|
+
# ======================================================================= #
|
147
|
+
# === Handle blocks next
|
148
|
+
#
|
149
|
+
# Next handle blocks given to the initializer:
|
150
|
+
# ======================================================================= #
|
151
|
+
if block_given?
|
152
|
+
yielded = yield
|
153
|
+
if yielded.is_a? Hash
|
154
|
+
# =================================================================== #
|
155
|
+
# === :show_n_upcoming_exams
|
156
|
+
# =================================================================== #
|
157
|
+
if yielded.has_key? :show_n_upcoming_exams
|
158
|
+
set_show_n_upcoming_exams(
|
159
|
+
yielded.delete(:show_n_upcoming_exams)
|
160
|
+
)
|
161
|
+
# =================================================================== #
|
162
|
+
# === :show_n_exams
|
163
|
+
# =================================================================== #
|
164
|
+
elsif yielded.has_key? :show_n_exams
|
165
|
+
set_show_n_upcoming_exams(
|
166
|
+
yielded.fetch(:show_n_exams)
|
167
|
+
)
|
168
|
+
end
|
169
|
+
# =================================================================== #
|
170
|
+
# === :array_of_symbols
|
171
|
+
# =================================================================== #
|
172
|
+
if yielded.has_key? :array_of_symbols
|
173
|
+
array_of_symbols.each {|this_symbol|
|
174
|
+
case this_symbol
|
175
|
+
# =============================================================== #
|
176
|
+
# === :do_not_exit
|
177
|
+
# =============================================================== #
|
178
|
+
when :do_not_exit
|
179
|
+
set_do_not_exit(false)
|
180
|
+
else
|
181
|
+
e 'Unhandled symbol: :'+this_symbol.to_s
|
182
|
+
end
|
183
|
+
}
|
184
|
+
end
|
185
|
+
else
|
186
|
+
case yielded # case tag
|
187
|
+
# === :do_not_exit
|
188
|
+
when :do_not_exit
|
189
|
+
set_do_not_exit(false)
|
190
|
+
when :disable_colours,
|
191
|
+
:no_colours
|
192
|
+
no_colours
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
if i.is_a? Symbol
|
197
|
+
case i
|
198
|
+
when :do_not_report_anything
|
199
|
+
do_not_report_anything
|
200
|
+
end
|
201
|
+
end
|
202
|
+
case run_already
|
203
|
+
when :dont_run_yet,
|
204
|
+
:do_not_run_yet
|
205
|
+
run_already = false
|
206
|
+
end
|
207
|
+
run if run_already
|
208
|
+
end
|
209
|
+
|
210
|
+
# ========================================================================= #
|
211
|
+
# === consider_autogenerating_exam_aliases
|
212
|
+
#
|
213
|
+
# This method will autogenerate the proper cd_aliases entries.
|
214
|
+
#
|
215
|
+
# It will only do so if these three conditions are met:
|
216
|
+
#
|
217
|
+
# (1) the target system is a "roebe-system"
|
218
|
+
# (2) a new entry has been added or removed in the file
|
219
|
+
# 'lecture_information.yml'
|
220
|
+
# (3) a file exists as specified by the constant
|
221
|
+
# FILE_ALL_REGISTERED_UPCOMING_EXAMS
|
222
|
+
#
|
223
|
+
# ========================================================================= #
|
224
|
+
def consider_autogenerating_exam_aliases(
|
225
|
+
use_this_file =
|
226
|
+
Studium.file_all_registered_upcoming_exams # Defaults to "/root/Studium/all_registered_upcoming_exams.yml".
|
227
|
+
)
|
228
|
+
if is_on_roebe? and commandline_mode? # Only do so on roebe-systems.
|
229
|
+
# ===================================================================== #
|
230
|
+
# Next we have to determine whether the file 'lecture_information.yml'
|
231
|
+
# has any different entry. If so, the cd_aliases entries will be
|
232
|
+
# autogenerated.
|
233
|
+
# ===================================================================== #
|
234
|
+
if File.exist? use_this_file
|
235
|
+
existing_dataset = YAML.load_file(use_this_file)
|
236
|
+
# =================================================================== #
|
237
|
+
# This may be in the wrong encoding, so we have to sanitize the
|
238
|
+
# Encoding still. Since as of April 2022 this is no longer in use.
|
239
|
+
# =================================================================== #
|
240
|
+
# existing_dataset = ensure_main_encoding(existing_dataset)
|
241
|
+
# =================================================================== #
|
242
|
+
# Next compare this to the dataset from the file
|
243
|
+
# 'lecture_information.yml'. We have to load up the
|
244
|
+
# original dataset again because the one available
|
245
|
+
# from the method reset(), may have been altered
|
246
|
+
# lateron.
|
247
|
+
# =================================================================== #
|
248
|
+
_ = ::Studium.return_sanitized_dataset_from_the_file_lecture_information.select {|a, b|
|
249
|
+
b.has_key?('registered') or
|
250
|
+
b.has_key?('not_yet_registered')
|
251
|
+
}
|
252
|
+
array = _.map {|name_of_the_lecture, inner_hash|
|
253
|
+
if inner_hash.has_key? 'registered'
|
254
|
+
entry = inner_hash['registered']
|
255
|
+
elsif inner_hash.has_key? 'not_yet_registered'
|
256
|
+
entry = inner_hash['not_yet_registered']
|
257
|
+
end
|
258
|
+
entry = entry.first
|
259
|
+
entry
|
260
|
+
}
|
261
|
+
# =================================================================== #
|
262
|
+
# Finally, compare the two Arrays, but sort them via Time:
|
263
|
+
# =================================================================== #
|
264
|
+
array = array.sort_by {|line|
|
265
|
+
line = line.split(',').first if line.include? ','
|
266
|
+
line = remove_weekdays(line)
|
267
|
+
Time.parse(line)
|
268
|
+
}
|
269
|
+
existing_dataset = existing_dataset.sort_by {|line|
|
270
|
+
line = line.split(',').first if line.include? ','
|
271
|
+
line = remove_weekdays(line)
|
272
|
+
Time.parse(line)
|
273
|
+
}
|
274
|
+
if (array == existing_dataset)
|
275
|
+
# ================================================================= #
|
276
|
+
# In this case, we pass through, as it is the very same dataset.
|
277
|
+
# ================================================================= #
|
278
|
+
else
|
279
|
+
# ================================================================= #
|
280
|
+
# Else we must update the cd-aliases.
|
281
|
+
# ================================================================= #
|
282
|
+
if @internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries]
|
283
|
+
update_the_cd_aliases_with_new_exam_entries
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
# ========================================================================= #
|
291
|
+
# === update_the_cd_aliases_with_new_exam_entries
|
292
|
+
#
|
293
|
+
# This will do a semi-silent update.
|
294
|
+
# ========================================================================= #
|
295
|
+
def update_the_cd_aliases_with_new_exam_entries
|
296
|
+
opne "Updating the #{gold('cd-aliases')} next - this "\
|
297
|
+
"may take a few seconds."
|
298
|
+
create_the_auto_stud_aliases(:do_not_exit, :be_quiet)
|
299
|
+
system 'history -c'
|
300
|
+
end
|
301
|
+
|
302
|
+
# ========================================================================= #
|
303
|
+
# === shall_we_exit?
|
304
|
+
# ========================================================================= #
|
305
|
+
def shall_we_exit?
|
306
|
+
@internal_hash[:shall_we_exit]
|
307
|
+
end
|
308
|
+
|
309
|
+
# ========================================================================= #
|
310
|
+
# === create_the_auto_stud_aliases
|
311
|
+
#
|
312
|
+
# To invoke this class, do:
|
313
|
+
#
|
314
|
+
# show_upcoming_exams --autostud
|
315
|
+
#
|
316
|
+
# ========================================================================= #
|
317
|
+
def create_the_auto_stud_aliases(
|
318
|
+
shall_we_exit = shall_we_exit?,
|
319
|
+
be_verbose = true
|
320
|
+
)
|
321
|
+
case be_verbose
|
322
|
+
when :be_quiet
|
323
|
+
be_verbose = false
|
324
|
+
end
|
325
|
+
case shall_we_exit
|
326
|
+
when :do_not_exit
|
327
|
+
shall_we_exit = false
|
328
|
+
end
|
329
|
+
base_dir = ROEBE_STUDIUM_DIR.dup
|
330
|
+
index = 0
|
331
|
+
@dataset.each {|name_of_the_lecture, inner_hash| index += 1
|
332
|
+
name_of_the_lecture = name_of_the_lecture.tr(' ','_')
|
333
|
+
# ===================================================================== #
|
334
|
+
# Sanitize the name of the lecture:
|
335
|
+
# ===================================================================== #
|
336
|
+
name_of_the_lecture.delete!(':/(),') # Get rid of ':','/','(',')', ','.
|
337
|
+
if name_of_the_lecture.end_with? '.'
|
338
|
+
name_of_the_lecture.chop!
|
339
|
+
end
|
340
|
+
if name_of_the_lecture.include? '_-_'
|
341
|
+
name_of_the_lecture.gsub!(/_-_/,'_')
|
342
|
+
end
|
343
|
+
if name_of_the_lecture.include? '_+_' # Replace '_+_' with '_'
|
344
|
+
name_of_the_lecture.gsub!(/_\+_/,'_')
|
345
|
+
end
|
346
|
+
if name_of_the_lecture.include? '__'
|
347
|
+
name_of_the_lecture.squeeze!('_')
|
348
|
+
end
|
349
|
+
university = inner_hash[:university].dup
|
350
|
+
# ===================================================================== #
|
351
|
+
# Note that the entries matched in the following variable will be
|
352
|
+
# upcased lateron anyway.
|
353
|
+
# ===================================================================== #
|
354
|
+
case university
|
355
|
+
when /^vetmed$/i
|
356
|
+
university = 'VETMED_UNI'
|
357
|
+
when 'tu_vienna','TU_VIENNA','TU Vienna'
|
358
|
+
university = 'TU_WIEN'
|
359
|
+
when 'meduni','MEDUNI','Meduni',
|
360
|
+
'boku','BOKU'
|
361
|
+
university << '_WIEN'
|
362
|
+
end
|
363
|
+
target_dir = base_dir+university.upcase.tr(' ','_')+'/'.dup
|
364
|
+
target_dir << name_of_the_lecture
|
365
|
+
pwdstud_name = "pwdstud#{index}:"
|
366
|
+
if be_verbose
|
367
|
+
opne rev+'Settting alias '+
|
368
|
+
simp(pwdstud_name.to_s.rjust(10))+
|
369
|
+
rev+' pointing to the directory '+
|
370
|
+
sdir(target_dir)
|
371
|
+
end
|
372
|
+
# ===================================================================== #
|
373
|
+
# Delegate towards Studium.set_this_cd_alias_to() next,
|
374
|
+
# in the file "studium/toplevel_methods/set_this_cd_alias_to.rb".
|
375
|
+
# ===================================================================== #
|
376
|
+
set_this_cd_alias_to(
|
377
|
+
pwdstud_name,
|
378
|
+
target_dir,
|
379
|
+
:be_quiet # But be quiet there.
|
380
|
+
)
|
381
|
+
begin
|
382
|
+
if is_on_roebe?
|
383
|
+
opne 'Autogenerating the cd-aliases next.'
|
384
|
+
end
|
385
|
+
require 'rcfiles'
|
386
|
+
Rcfiles.generate_files(:cd_aliases) {{ be_verbose: be_verbose? }}
|
387
|
+
rescue LoadError; end
|
388
|
+
}
|
389
|
+
exit if shall_we_exit
|
390
|
+
end
|
391
|
+
|
392
|
+
# ========================================================================= #
|
393
|
+
# === show_help (help tag)
|
394
|
+
#
|
395
|
+
# Invoke this method via:
|
396
|
+
#
|
397
|
+
# show_upcoming_exams --help
|
398
|
+
#
|
399
|
+
# ========================================================================= #
|
400
|
+
def show_help
|
401
|
+
help_string = <<-EOF
|
402
|
+
|
403
|
+
Input a number n, which means to show n upcoming exams.
|
404
|
+
|
405
|
+
Other documented help options are:
|
406
|
+
|
407
|
+
--autostud # automatically set the proper
|
408
|
+
# cd-alias for all upcoming exams
|
409
|
+
|
410
|
+
EOF
|
411
|
+
e help_string
|
412
|
+
end
|
413
|
+
|
414
|
+
# ========================================================================= #
|
415
|
+
# === menu (menu tag)
|
416
|
+
# ========================================================================= #
|
417
|
+
def menu(
|
418
|
+
i = @input
|
419
|
+
)
|
420
|
+
if i.is_a? Array
|
421
|
+
i.each {|entry| menu(entry) }
|
422
|
+
else
|
423
|
+
case i # case tag
|
424
|
+
# ===================================================================== #
|
425
|
+
# === show_upcoming_exams --only-registered
|
426
|
+
#
|
427
|
+
# Show only exams for which we are factually registered.
|
428
|
+
# ===================================================================== #
|
429
|
+
when /^-?-?only(-|_)?registered$/
|
430
|
+
do_show_only_exams_for_which_we_are_registered
|
431
|
+
# ===================================================================== #
|
432
|
+
# === show_upcoming_exams --auto-stud
|
433
|
+
# ===================================================================== #
|
434
|
+
when /^-?-?auto(-|_)?stud$/
|
435
|
+
create_the_auto_stud_aliases
|
436
|
+
# ===================================================================== #
|
437
|
+
# === show_upcoming_exams --be_silent
|
438
|
+
# ===================================================================== #
|
439
|
+
when /^-?-?be(_|-)?silent$/i
|
440
|
+
do_not_report_anything
|
441
|
+
# ===================================================================== #
|
442
|
+
# === show_upcoming_exams --disable-colours
|
443
|
+
# ===================================================================== #
|
444
|
+
when /^-?-?disable(_|-)?colours$/,
|
445
|
+
/^-?-?no(_|-)?colours$/
|
446
|
+
@use_colours = false
|
447
|
+
# ===================================================================== #
|
448
|
+
# === show_upcoming_exams --help
|
449
|
+
# ===================================================================== #
|
450
|
+
when /^-?-?help$/
|
451
|
+
show_help
|
452
|
+
exit
|
453
|
+
else
|
454
|
+
if i.to_s =~ /^(\d+)$/ # Is it a number?
|
455
|
+
set_show_n_upcoming_exams($1.to_s.dup) # If so, feed into this method here.
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end; alias check_against_menu menu # === check_against_menu
|
460
|
+
|
461
|
+
# ========================================================================= #
|
462
|
+
# === reset (reset tag)
|
463
|
+
# ========================================================================= #
|
464
|
+
def reset
|
465
|
+
super()
|
466
|
+
infer_the_namespace
|
467
|
+
# ======================================================================= #
|
468
|
+
# === :shall_we_exit
|
469
|
+
# ======================================================================= #
|
470
|
+
@internal_hash[:shall_we_exit] = true
|
471
|
+
# ======================================================================= #
|
472
|
+
# === @report_result
|
473
|
+
# ======================================================================= #
|
474
|
+
@report_result = true
|
475
|
+
# ======================================================================= #
|
476
|
+
# === @show_n_upcoming_exams
|
477
|
+
#
|
478
|
+
# By default all upcoming exams will be shown.
|
479
|
+
# ======================================================================= #
|
480
|
+
@show_n_upcoming_exams = :all_of_them
|
481
|
+
# ======================================================================= #
|
482
|
+
# === @dataset_from_file_lecture_information
|
483
|
+
# ======================================================================= #
|
484
|
+
@dataset_from_file_lecture_information =
|
485
|
+
return_dataset_from_file_lecture_information
|
486
|
+
# ======================================================================= #
|
487
|
+
# === :show_only_exams_for_which_we_are_registered
|
488
|
+
# ======================================================================= #
|
489
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered] = false
|
490
|
+
# ======================================================================= #
|
491
|
+
# === :n_ljust_to_the_left
|
492
|
+
# ======================================================================= #
|
493
|
+
@internal_hash[:n_ljust_to_the_left] = 66
|
494
|
+
# ======================================================================= #
|
495
|
+
# === :shall_we_update_the_cd_aliases_with_new_exam_entries
|
496
|
+
# ======================================================================= #
|
497
|
+
@internal_hash[:shall_we_update_the_cd_aliases_with_new_exam_entries] = true
|
498
|
+
sanitize_dataset
|
499
|
+
if Object.const_defined?(:EmojiParadise)
|
500
|
+
@emoji_checkbox = EmojiParadise.return_checkbox
|
501
|
+
@warning_sign = EmojiParadise.warning_sign
|
502
|
+
else
|
503
|
+
@emoji_checkbox = ''
|
504
|
+
@warning_sign = ''
|
505
|
+
end
|
506
|
+
end
|
507
|
+
|
508
|
+
# ========================================================================= #
|
509
|
+
# === do_show_only_exams_for_which_we_are_registered
|
510
|
+
# ========================================================================= #
|
511
|
+
def do_show_only_exams_for_which_we_are_registered
|
512
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered] = true
|
513
|
+
end
|
514
|
+
|
515
|
+
# ========================================================================= #
|
516
|
+
# === show_only_exams_for_which_we_are_registered?
|
517
|
+
# ========================================================================= #
|
518
|
+
def show_only_exams_for_which_we_are_registered?
|
519
|
+
@internal_hash[:show_only_exams_for_which_we_are_registered]
|
520
|
+
end
|
521
|
+
|
522
|
+
# ========================================================================= #
|
523
|
+
# === set_input
|
524
|
+
# ========================================================================= #
|
525
|
+
def set_input(i = '')
|
526
|
+
i = i.first if i.is_a? Array
|
527
|
+
i = i.to_s.dup
|
528
|
+
@input = i
|
529
|
+
end
|
530
|
+
|
531
|
+
# ========================================================================= #
|
532
|
+
# === set_do_not_exit
|
533
|
+
# ========================================================================= #
|
534
|
+
def set_do_not_exit(i = true)
|
535
|
+
@internal_hash[:shall_we_exit] = i
|
536
|
+
end
|
537
|
+
|
538
|
+
# ========================================================================= #
|
539
|
+
# === input?
|
540
|
+
# ========================================================================= #
|
541
|
+
def input?
|
542
|
+
@input
|
543
|
+
end
|
544
|
+
|
545
|
+
# ========================================================================= #
|
546
|
+
# === set_show_n_upcoming_exams
|
547
|
+
# ========================================================================= #
|
548
|
+
def set_show_n_upcoming_exams(
|
549
|
+
i = :all_of_them
|
550
|
+
)
|
551
|
+
i = i.to_i if i.is_a? String
|
552
|
+
@show_n_upcoming_exams = i
|
553
|
+
end
|
554
|
+
|
555
|
+
# ========================================================================= #
|
556
|
+
# === do_not_report_anything
|
557
|
+
# ========================================================================= #
|
558
|
+
def do_not_report_anything
|
559
|
+
@report_result = false
|
560
|
+
end
|
561
|
+
|
562
|
+
# ========================================================================= #
|
563
|
+
# === sort_dataset_by_time
|
564
|
+
# ========================================================================= #
|
565
|
+
def sort_dataset_by_time
|
566
|
+
@dataset = @dataset.sort_by {|name_of_the_lecture, inner_hash|
|
567
|
+
# ===================================================================== #
|
568
|
+
# We will next select lectures that have the entry called
|
569
|
+
# registered.
|
570
|
+
# However had, not all lectures may have this entry - for example,
|
571
|
+
# some lectures have exam entries for which we have not yet
|
572
|
+
# registered. So the following code has to keep this in "mind".
|
573
|
+
# ===================================================================== #
|
574
|
+
if inner_hash.has_key? 'registered'
|
575
|
+
if inner_hash['registered'].respond_to? :first
|
576
|
+
the_exam_will_happen_when = inner_hash['registered'].first
|
577
|
+
else
|
578
|
+
opne crimson(name_of_the_lecture)+' has no key called `'+
|
579
|
+
sfancy('registered')+'`.'
|
580
|
+
opne swarn('Please fix this error before we can continue.')
|
581
|
+
exit
|
582
|
+
end
|
583
|
+
else
|
584
|
+
the_exam_will_happen_when = inner_hash['not_yet_registered']
|
585
|
+
if the_exam_will_happen_when and
|
586
|
+
the_exam_will_happen_when.respond_to?(:first)
|
587
|
+
the_exam_will_happen_when = the_exam_will_happen_when.first
|
588
|
+
else
|
589
|
+
opnn; ewarn 'No dataset found for the key '+
|
590
|
+
slateblue('not_yet_registered')
|
591
|
+
opnn; ewarn 'This may be because you forgot to add '\
|
592
|
+
'a " -" entry for this key.'
|
593
|
+
opnn; ewarn 'Please correct this error. '\
|
594
|
+
'Exiting now until this error has been resolved.'
|
595
|
+
exit
|
596
|
+
end
|
597
|
+
end
|
598
|
+
result = parse_time_entry_from_this_string(the_exam_will_happen_when)
|
599
|
+
if result.nil?
|
600
|
+
e 'A problem was encountered for this lecture: '+name_of_the_lecture.to_s
|
601
|
+
e 'This should be corrected.'
|
602
|
+
exit
|
603
|
+
end
|
604
|
+
result
|
605
|
+
}
|
606
|
+
end
|
607
|
+
|
608
|
+
# ========================================================================= #
|
609
|
+
# === return_startzeit_from
|
610
|
+
# ========================================================================= #
|
611
|
+
def return_startzeit_from(i)
|
612
|
+
return i.scan(
|
613
|
+
/\d{1,2}:\d{1,2}-\d{1,2}:\d{1,2}/ # This is the regex we are currently using.
|
614
|
+
).flatten.first
|
615
|
+
end
|
616
|
+
|
617
|
+
# ========================================================================= #
|
618
|
+
# === display_total_ects
|
619
|
+
# ========================================================================= #
|
620
|
+
def display_total_ects
|
621
|
+
if SHOW_TOTAL_ECTS_POINTS_PASSED
|
622
|
+
total_n_ects = @dataset.select {|a, b|
|
623
|
+
b[:ects]
|
624
|
+
}.map {|a,b|
|
625
|
+
b[:ects]
|
626
|
+
}.sum.to_s
|
627
|
+
plus = "+#{total_n_ects}"
|
628
|
+
e
|
629
|
+
result = ((' ' * 60)+
|
630
|
+
limegreen('Total ECTS passed so far: ').to_s+
|
631
|
+
colourize_ects_points(::Studium.n_ects_passed_so_far).to_s).dup
|
632
|
+
if @emoji_checkbox and !@emoji_checkbox.empty?
|
633
|
+
result << goldenrod(' '+@emoji_checkbox+' ... ← registered for that course')
|
634
|
+
end
|
635
|
+
e result
|
636
|
+
result = ((' ' * 59).to_s+
|
637
|
+
limegreen('ECTS of the above exams: ')+
|
638
|
+
colourize_ects_points(plus)).dup
|
639
|
+
if @warning_sign and !@warning_sign.empty? # Offer an explanation to the user about the warning-sign.
|
640
|
+
result << crimson(" #{@warning_sign} ... ← outdated course exam-registration")
|
641
|
+
end
|
642
|
+
e result
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
# ========================================================================= #
|
647
|
+
# === n_exams?
|
648
|
+
# ========================================================================= #
|
649
|
+
def n_exams?
|
650
|
+
@dataset.size
|
651
|
+
end
|
652
|
+
|
653
|
+
# ========================================================================= #
|
654
|
+
# === return_date_of_the_exam
|
655
|
+
#
|
656
|
+
# This method will extract dd.mm.yyyy.
|
657
|
+
# ========================================================================= #
|
658
|
+
def return_date_of_the_exam(i)
|
659
|
+
i.scan(
|
660
|
+
/(\d{1,2}\.\d{1,2}\.\d{4})/
|
661
|
+
).flatten.first
|
662
|
+
end
|
663
|
+
|
664
|
+
# ========================================================================= #
|
665
|
+
# === in_n_days
|
666
|
+
# ========================================================================= #
|
667
|
+
def in_n_days(i)
|
668
|
+
if i.include? '-'
|
669
|
+
i = i.split('-').first
|
670
|
+
end
|
671
|
+
future_time = Time.parse(i).to_i - Time.now.to_i
|
672
|
+
result = future_time.to_f / ONE_DAY.to_f
|
673
|
+
result.ceil(1)
|
674
|
+
end
|
675
|
+
|
676
|
+
# ========================================================================= #
|
677
|
+
# === return_red_vertical_bar
|
678
|
+
#
|
679
|
+
# Note that this will have the proper colour already.
|
680
|
+
# ========================================================================= #
|
681
|
+
def return_red_vertical_bar
|
682
|
+
"#{short_vertical_bar} "
|
683
|
+
end; alias return_vertical_bar return_red_vertical_bar # === return_red_vertical_bar
|
684
|
+
|
685
|
+
# ========================================================================= #
|
686
|
+
# === vertical_bar?
|
687
|
+
# ========================================================================= #
|
688
|
+
def vertical_bar?
|
689
|
+
SEPARATOR_TOKEN_TO_USE
|
690
|
+
end
|
691
|
+
|
692
|
+
# ========================================================================= #
|
693
|
+
# === short_vertical_bar
|
694
|
+
# ========================================================================= #
|
695
|
+
def short_vertical_bar
|
696
|
+
swarn(SEPARATOR_TOKEN_TO_USE)
|
697
|
+
end
|
698
|
+
|
699
|
+
# ========================================================================= #
|
700
|
+
# === show_n_upcoming_exams?
|
701
|
+
# ========================================================================= #
|
702
|
+
def show_n_upcoming_exams?
|
703
|
+
@show_n_upcoming_exams
|
704
|
+
end; alias show_n_exams? show_n_upcoming_exams? # === show_n_exams?
|
705
|
+
|
706
|
+
# ========================================================================= #
|
707
|
+
# === report_result?
|
708
|
+
# ========================================================================= #
|
709
|
+
def report_result?
|
710
|
+
@report_result
|
711
|
+
end
|
712
|
+
|
713
|
+
# ========================================================================= #
|
714
|
+
# === colourize_ects_points
|
715
|
+
# ========================================================================= #
|
716
|
+
def colourize_ects_points(i)
|
717
|
+
lightgreen(i)
|
718
|
+
end
|
719
|
+
|
720
|
+
# ========================================================================= #
|
721
|
+
# === return_location (ort tag)
|
722
|
+
#
|
723
|
+
# This method will return a String, depending on whether the substring
|
724
|
+
# 'Ort' is part of the given input or whether it is not.
|
725
|
+
# ========================================================================= #
|
726
|
+
def return_location(i)
|
727
|
+
if i.include? 'Ort'
|
728
|
+
scan_result = i.scan(/(Ort: .+)$/).flatten
|
729
|
+
scan_result = scan_result.first if scan_result.respond_to?(:first)
|
730
|
+
" #{scan_result}"
|
731
|
+
else
|
732
|
+
'(No specific Ort has been found - or is known)'
|
733
|
+
end
|
734
|
+
end
|
735
|
+
|
736
|
+
# ========================================================================= #
|
737
|
+
# === is_part_of_the_vector_curriculum?
|
738
|
+
#
|
739
|
+
# This checks whether the lecture at hand is part of the individual
|
740
|
+
# Vector-Curriculum.
|
741
|
+
# ========================================================================= #
|
742
|
+
def is_part_of_the_vector_curriculum?(i = '')
|
743
|
+
::Studium.is_this_lecture_part_of_the_vector_curriculum( # <- In the file studium/toplevel_methods/is_this_lecture_part_of_the_vector_curriculum.rb
|
744
|
+
i, :be_lenient
|
745
|
+
)
|
746
|
+
end
|
747
|
+
|
748
|
+
# ========================================================================= #
|
749
|
+
# === consider_renaming_the_konsole_tab
|
750
|
+
#
|
751
|
+
# We should actually check whether we are using Kde Konsole or not.
|
752
|
+
#
|
753
|
+
# We will then run system 'clear', but only if we have enabled
|
754
|
+
# reporting.
|
755
|
+
# ========================================================================= #
|
756
|
+
def consider_renaming_the_konsole_tab(
|
757
|
+
use_this_namespace = :Roebe
|
758
|
+
)
|
759
|
+
if report_result? and
|
760
|
+
konsole_support?
|
761
|
+
begin
|
762
|
+
require 'roebe/classes/kde/kde_konsole/kde_konsole.rb'
|
763
|
+
rescue LoadError; end
|
764
|
+
if Object.const_defined? use_this_namespace
|
765
|
+
# =================================================================== #
|
766
|
+
# We will also use a small icon for the KDE-renaming action.
|
767
|
+
# =================================================================== #
|
768
|
+
e Roebe.return_important_notification("Next #{n_exams?} exams")
|
769
|
+
system 'clear' # Required to get rid of the annoying KDebug output from KDE Konsole.
|
770
|
+
end
|
771
|
+
end
|
772
|
+
end
|
773
|
+
|
774
|
+
# ========================================================================= #
|
775
|
+
# === parse_time_entry_from_this_string
|
776
|
+
# ========================================================================= #
|
777
|
+
def parse_time_entry_from_this_string(
|
778
|
+
the_exam_will_happen_when
|
779
|
+
)
|
780
|
+
return if the_exam_will_happen_when.empty?
|
781
|
+
sanitized_the_exam_will_happen_when = remove_german_weekdays(the_exam_will_happen_when).strip
|
782
|
+
sanitized_the_exam_will_happen_when =~ REGEX_TO_EXTRACT_DATE_AND_TIME_FROM_AN_UPCOMING_EXAM
|
783
|
+
this_time = $1.to_s.dup
|
784
|
+
begin
|
785
|
+
this_time = Time.parse(this_time) # This method will return a time-parsed entry.
|
786
|
+
rescue Exception => error
|
787
|
+
e 'The original input to the method parse_time_entry_from_this_string() was:'
|
788
|
+
e
|
789
|
+
e " #{sfancy(the_exam_will_happen_when)}"
|
790
|
+
e
|
791
|
+
pp error
|
792
|
+
e
|
793
|
+
e 'The caller() stack was:'
|
794
|
+
e
|
795
|
+
pp caller()
|
796
|
+
e
|
797
|
+
exit
|
798
|
+
end
|
799
|
+
return this_time
|
800
|
+
end
|
801
|
+
|
802
|
+
# ========================================================================= #
|
803
|
+
# === dataset?
|
804
|
+
# ========================================================================= #
|
805
|
+
def dataset?
|
806
|
+
@dataset
|
807
|
+
end; alias result? dataset? # === result?
|
808
|
+
|
809
|
+
# ========================================================================= #
|
810
|
+
# === n_ljust_to_the_left?
|
811
|
+
# ========================================================================= #
|
812
|
+
def n_ljust_to_the_left?
|
813
|
+
@internal_hash[:n_ljust_to_the_left]
|
814
|
+
end; alias left_pad? n_ljust_to_the_left? # === left_pad?
|
815
|
+
|
816
|
+
# ========================================================================= #
|
817
|
+
# === report_today
|
818
|
+
# ========================================================================= #
|
819
|
+
def report_today(
|
820
|
+
show_n_exams = show_n_exams?
|
821
|
+
)
|
822
|
+
if @report_result
|
823
|
+
opne yellowgreen('Heute ist der ')+
|
824
|
+
sfancy(dd_mm_yyyy)+' '+
|
825
|
+
yellowgreen('(')+
|
826
|
+
lightgreen(
|
827
|
+
# translate_dd_mm_yyy_to_weekday(dd_mm_yyyy)
|
828
|
+
german_weekday?(dd_mm_yyyy)
|
829
|
+
)+
|
830
|
+
yellowgreen('). Die nächsten ')+
|
831
|
+
lightslategray(show_n_exams.to_s)+
|
832
|
+
yellowgreen(' Prüfungen sind: ')
|
833
|
+
e
|
834
|
+
end
|
835
|
+
end
|
836
|
+
|
837
|
+
# ========================================================================= #
|
838
|
+
# === colourize_and_return_the_beginning_of_the_month
|
839
|
+
#
|
840
|
+
# This method must colourize a String such as:
|
841
|
+
#
|
842
|
+
# "[Beginn Oktober 2023] ☻ ----------------------------------------------------"
|
843
|
+
#
|
844
|
+
# ========================================================================= #
|
845
|
+
def colourize_and_return_the_beginning_of_the_month(i)
|
846
|
+
i = i.dup
|
847
|
+
i.gsub!(/-/, tomato('-'))
|
848
|
+
if i.include?('☻')
|
849
|
+
i.sub!(/☻/, gold('☻'))
|
850
|
+
end
|
851
|
+
i.gsub!(/(\d{4})/, darkgoldenrod('\1'))
|
852
|
+
i.sub!(/(\[Beginn (.+))/, saddlebrown('\1'))
|
853
|
+
i.sub!(/\]/, saddlebrown(']'))
|
854
|
+
if i.include? 'ECTS' # Colourize e. g. [^^^ 22.0 ECTS].
|
855
|
+
i.sub!(
|
856
|
+
/(\[\^\^\^ \d{1,3}\.\d{1} ECTS\])/,
|
857
|
+
colourize_ects_points('\1')
|
858
|
+
)
|
859
|
+
end
|
860
|
+
return i
|
861
|
+
end
|
862
|
+
|
863
|
+
# ========================================================================= #
|
864
|
+
# === show_horizontal_bar
|
865
|
+
#
|
866
|
+
# This will show a red, horizontal bar - or, alternatively, also the
|
867
|
+
# name of the month at hand.
|
868
|
+
# ========================================================================= #
|
869
|
+
def show_horizontal_bar(
|
870
|
+
optional_this_month = nil,
|
871
|
+
current_year = current_year?
|
872
|
+
)
|
873
|
+
if optional_this_month
|
874
|
+
if optional_this_month.is_a? Array
|
875
|
+
optional_this_month = optional_this_month.first
|
876
|
+
end
|
877
|
+
optional_this_month = number_to_month(optional_this_month)
|
878
|
+
end
|
879
|
+
# The next string is the one that will be shown to the left side.
|
880
|
+
if optional_this_month
|
881
|
+
the_left_string = ''.dup
|
882
|
+
the_left_string << '[Beginn '+
|
883
|
+
"#{to_german_month(optional_this_month)} #{current_year}"+
|
884
|
+
']'
|
885
|
+
if use_unicode_symbols?
|
886
|
+
# ===================================================================== #
|
887
|
+
# Display a little smiley-face next, if we make use of unicode
|
888
|
+
# symbols.
|
889
|
+
# ===================================================================== #
|
890
|
+
the_left_string << " #{return_smiley_face}"
|
891
|
+
end
|
892
|
+
# ======================================================================= #
|
893
|
+
# The user may pass a special Hash to this method, in which case we
|
894
|
+
# may display some more - in particular n ECTS points registered so
|
895
|
+
# far for the given month.
|
896
|
+
# ======================================================================= #
|
897
|
+
if block_given?
|
898
|
+
yielded = yield
|
899
|
+
if yielded.is_a? Hash
|
900
|
+
# ================================================================= #
|
901
|
+
# === :n_ects_points_in_this_month
|
902
|
+
# ================================================================= #
|
903
|
+
if yielded.has_key? :n_ects_points_in_this_month
|
904
|
+
n_ects_points = yielded[:n_ects_points_in_this_month]
|
905
|
+
if n_ects_points > 0
|
906
|
+
n_ects_points_string = " [^^^ #{n_ects_points} ECTS] "
|
907
|
+
the_left_string << n_ects_points_string
|
908
|
+
end
|
909
|
+
end
|
910
|
+
end
|
911
|
+
end
|
912
|
+
# ======================================================================= #
|
913
|
+
# Next we will add '-' characters.
|
914
|
+
# ======================================================================= #
|
915
|
+
the_left_string = the_left_string.ljust(
|
916
|
+
@internal_hash[:n_ljust_to_the_left]+9, '-' # A bit hackish but it'll do for now.
|
917
|
+
)
|
918
|
+
the_left_string = colourize_and_return_the_beginning_of_the_month(the_left_string)
|
919
|
+
# ======================================================================= #
|
920
|
+
# Past this point we have the right side - this one can
|
921
|
+
# simply be appended, as-is.
|
922
|
+
# ======================================================================= #
|
923
|
+
the_left_string << short_vertical_bar+
|
924
|
+
palegreen(' [Datum] ')+
|
925
|
+
swarn('-'*1)+
|
926
|
+
tomato(' ⌛')+
|
927
|
+
swarn('-'*48)+
|
928
|
+
"\n"
|
929
|
+
e tomato('-')+the_left_string
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
# ========================================================================= #
|
934
|
+
# === return_smiley_face
|
935
|
+
# ========================================================================= #
|
936
|
+
def return_smiley_face
|
937
|
+
Roebe.black_smiling_face
|
938
|
+
end
|
939
|
+
|
940
|
+
# ========================================================================= #
|
941
|
+
# === sanitize_dataset
|
942
|
+
# ========================================================================= #
|
943
|
+
def sanitize_dataset
|
944
|
+
# ======================================================================= #
|
945
|
+
# Select all lectures for which we are either registered, or
|
946
|
+
# not_yet_registered_for_an_upcoming_exam_at - the latter applies
|
947
|
+
# to lectures where we will still have to register for.
|
948
|
+
# ======================================================================= #
|
949
|
+
@dataset = @dataset_from_file_lecture_information.select {|name, inner_hash|
|
950
|
+
if inner_hash.nil?
|
951
|
+
e "#{rev}Some erroneous entry for `#{tomato(name)}#{rev}`."
|
952
|
+
end
|
953
|
+
# ===================================================================== #
|
954
|
+
# Next we must select all entries that are relevant. This will be
|
955
|
+
# done by querying the Hash stored in the inner_hash variable.
|
956
|
+
# ===================================================================== #
|
957
|
+
inner_hash.has_key?('registered') or
|
958
|
+
inner_hash.has_key?('not_yet_registered')
|
959
|
+
}
|
960
|
+
sort_dataset_by_time
|
961
|
+
end
|
962
|
+
|
963
|
+
# ========================================================================= #
|
964
|
+
# === Studium::ShowUpcomingExams.next_exam?
|
965
|
+
#
|
966
|
+
# This class-method will always tell us which exam will come next.
|
967
|
+
#
|
968
|
+
# This method will return an Array, such as:
|
969
|
+
#
|
970
|
+
# ["500157 Populationsgenetik", {:ects=>1.5, :sws=>1.5,
|
971
|
+
#
|
972
|
+
# The first entry is the LVA-id and the name of the course; then comes
|
973
|
+
# the Hash with the data, exactly as it is stored in the file called
|
974
|
+
# 'lecture_information.yml'.
|
975
|
+
# ========================================================================= #
|
976
|
+
def self.next_exam?
|
977
|
+
new(:be_silent).result?.first
|
978
|
+
end
|
979
|
+
|
980
|
+
# ========================================================================= #
|
981
|
+
# === store_old_upcoming_exams
|
982
|
+
#
|
983
|
+
# This method will store the old upcoming exams. It will always trigger
|
984
|
+
# the storing-routine, so if you need to make additional checks, do so
|
985
|
+
# before calling that method.
|
986
|
+
# ========================================================================= #
|
987
|
+
def store_old_upcoming_exams
|
988
|
+
Studium.save_all_registered_upcoming_exams # ← Save the upcoming exams here.
|
989
|
+
end
|
990
|
+
|
991
|
+
# ========================================================================= #
|
992
|
+
# === run (run tag)
|
993
|
+
# ========================================================================= #
|
994
|
+
def run
|
995
|
+
menu
|
996
|
+
consider_renaming_the_konsole_tab
|
997
|
+
consider_autogenerating_exam_aliases
|
998
|
+
report
|
999
|
+
store_old_upcoming_exams # ← Store the upcoming-exams into a file as well.
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
# ========================================================================= #
|
1003
|
+
# === report (report tag)
|
1004
|
+
# ========================================================================= #
|
1005
|
+
def report
|
1006
|
+
_ = dataset?
|
1007
|
+
if _.empty?
|
1008
|
+
opne 'You have not registered for any upcoming exams.'
|
1009
|
+
else
|
1010
|
+
left_pad = left_pad?
|
1011
|
+
current_month = month?
|
1012
|
+
if show_only_exams_for_which_we_are_registered?
|
1013
|
+
_.select! {|name_of_the_course, inner_hash|
|
1014
|
+
inner_hash.has_key?('registered')
|
1015
|
+
}
|
1016
|
+
end
|
1017
|
+
# ===================================================================== #
|
1018
|
+
# At this point, we assume (usually correctly so) that the main
|
1019
|
+
# dataset was already sorted.
|
1020
|
+
# ===================================================================== #
|
1021
|
+
index = 0
|
1022
|
+
case show_n_upcoming_exams?
|
1023
|
+
# ===================================================================== #
|
1024
|
+
# === :all_of_them
|
1025
|
+
# ===================================================================== #
|
1026
|
+
when :all_of_them
|
1027
|
+
# In this case, we show all of them.
|
1028
|
+
else
|
1029
|
+
if show_n_upcoming_exams?.to_s =~ /^(\d+)$/
|
1030
|
+
n_exams_to_show = $1.to_s.dup.to_i
|
1031
|
+
_ = _[0 .. (n_exams_to_show - 1)]
|
1032
|
+
end
|
1033
|
+
end
|
1034
|
+
e
|
1035
|
+
report_today(_.size) # Show the "Heute ist der ..." part here.
|
1036
|
+
n_ects_in_this_month = 0 # Keep track of how many ECTS are "available" in this month.
|
1037
|
+
# ===================================================================== #
|
1038
|
+
# Keep in mind that the variable name_of_the_lecture also contains
|
1039
|
+
# the LVA-ID, such as "330064 Mikrobiologie und Hygiene", so it is
|
1040
|
+
# a slightly misnomer-named variable name.
|
1041
|
+
# ===================================================================== #
|
1042
|
+
today_is = ::Time.now
|
1043
|
+
_.each {|name_of_the_lecture, inner_hash| index += 1
|
1044
|
+
# =================================================================== #
|
1045
|
+
# === Consider working without the lva-id number next:
|
1046
|
+
# =================================================================== #
|
1047
|
+
unless SHOW_LEADING_LVA_ID_NUMBER
|
1048
|
+
splitted = name_of_the_lecture.split(' ')
|
1049
|
+
name_of_the_lecture = splitted[1 .. -1].join(' ').strip
|
1050
|
+
end
|
1051
|
+
use_this_as_ljust_value = left_pad
|
1052
|
+
new_line_index = 10 # This is for the second row, containing "Ort:".
|
1053
|
+
all_exams = inner_hash['exams']
|
1054
|
+
next_exam_date = ::Studium.return_next_exam_date(all_exams)
|
1055
|
+
next_exam_date_as_time_object = ::Time.parse(next_exam_date)
|
1056
|
+
this_line = ''.dup # This is the line that will be shown.
|
1057
|
+
n_ects_points = inner_hash[:ects] # How many ECTS this lecture has.
|
1058
|
+
priority_of_the_lecture = inner_hash[:priority]
|
1059
|
+
if inner_hash.has_key? 'registered'
|
1060
|
+
the_exam_will_happen_when = inner_hash['registered'].first
|
1061
|
+
else # else use the key 'not_yet_registered'.
|
1062
|
+
the_exam_will_happen_when = inner_hash['not_yet_registered'].first
|
1063
|
+
end # Must come before "startzeit = ".
|
1064
|
+
# =================================================================== #
|
1065
|
+
# Add the "Ort" of the exam.
|
1066
|
+
# =================================================================== #
|
1067
|
+
the_location = return_location( # This variable will contain only the location, aka 'Ort'.
|
1068
|
+
the_exam_will_happen_when.delete("\t")
|
1069
|
+
).lstrip
|
1070
|
+
# =================================================================== #
|
1071
|
+
# === Add the date of the exam, stored in the variable
|
1072
|
+
# called `date_of_the_exam`.
|
1073
|
+
# =================================================================== #
|
1074
|
+
date_of_the_exam = return_date_of_the_exam(the_exam_will_happen_when)
|
1075
|
+
german_weekday = german_weekday?(date_of_the_exam).ljust(11) # "Donnerstag" is the longest name.
|
1076
|
+
# =================================================================== #
|
1077
|
+
# === Handle new months next
|
1078
|
+
#
|
1079
|
+
# Display a horizontal bar if we are at a new month. This must
|
1080
|
+
# come after we have defined the variable date_of_the_exam.
|
1081
|
+
# =================================================================== #
|
1082
|
+
if DISPLAY_HORIZONTAL_BAR_TO_INDICATE_A_NEW_MONTH and @report_result
|
1083
|
+
# ================================================================= #
|
1084
|
+
# Must first check whether it is a new month.
|
1085
|
+
# ================================================================= #
|
1086
|
+
actual_month = date_of_the_exam.scan(/\d{1,2}\.(\d{1,2})\.\d{4}/).flatten
|
1087
|
+
if actual_month == current_month
|
1088
|
+
else
|
1089
|
+
# =============================================================== #
|
1090
|
+
# Ok, this means we have a new month then. We can thus
|
1091
|
+
# delegate towards show_horizontal_bar() to indicate this.
|
1092
|
+
# =============================================================== #
|
1093
|
+
current_month = actual_month.dup
|
1094
|
+
show_horizontal_bar(current_month) {{ n_ects_points_in_this_month: n_ects_in_this_month }}
|
1095
|
+
if n_ects_in_this_month > 0
|
1096
|
+
n_ects_in_this_month = 0
|
1097
|
+
end
|
1098
|
+
end
|
1099
|
+
end
|
1100
|
+
n_ects_in_this_month += n_ects_points
|
1101
|
+
# =================================================================== #
|
1102
|
+
# Have a colourized german weekday show up in colours:
|
1103
|
+
# =================================================================== #
|
1104
|
+
colourized_german_weekday = mediumpurple(german_weekday)
|
1105
|
+
startzeit = return_startzeit_from(the_exam_will_happen_when).strip.dup
|
1106
|
+
colourized_startzeit = royalblue('Startzeit: ')+
|
1107
|
+
steelblue(startzeit)+rev
|
1108
|
+
# =================================================================== #
|
1109
|
+
# Next, find out in how many days the exam will happen - this has
|
1110
|
+
# to come after we defined the two variables "date_of_the_exam" and
|
1111
|
+
# "startzeit":
|
1112
|
+
# =================================================================== #
|
1113
|
+
the_exam_will_happen_in_n_days = in_n_days(date_of_the_exam+' '+startzeit.to_s)
|
1114
|
+
# =================================================================== #
|
1115
|
+
# Note that index.to_s.size will yield 3, if we have more than 100
|
1116
|
+
# entries, so we have to pad it a little bit.
|
1117
|
+
# =================================================================== #
|
1118
|
+
colourized_and_padded_index = (' ' * (3 - index.to_s.size ))
|
1119
|
+
use_this_as_leading_padding = ' ' # This is the default padding.
|
1120
|
+
if next_exam_date_as_time_object < today_is
|
1121
|
+
# In this case, it is an outdated lecture, so indicate this
|
1122
|
+
# visually to the user too:
|
1123
|
+
use_this_as_leading_padding = ''.dup
|
1124
|
+
if index > 9
|
1125
|
+
use_this_as_leading_padding << ' '
|
1126
|
+
use_this_as_ljust_value -= 1
|
1127
|
+
else
|
1128
|
+
new_line_index -= 1
|
1129
|
+
end
|
1130
|
+
use_this_as_leading_padding << crimson(@warning_sign) # And we'll use some red-colour variant in this event.
|
1131
|
+
use_this_as_leading_padding << ' '
|
1132
|
+
use_this_as_ljust_value += 1
|
1133
|
+
elsif inner_hash.has_key? 'registered' # In this case prepend the emoji-checkbox.
|
1134
|
+
use_this_as_leading_padding = ' '+goldenrod(@emoji_checkbox)+' '
|
1135
|
+
end
|
1136
|
+
# =================================================================== #
|
1137
|
+
# Next, put together the leading-padding with the colours we will use
|
1138
|
+
# for the index:
|
1139
|
+
# =================================================================== #
|
1140
|
+
colourized_and_padded_index << use_this_as_leading_padding+
|
1141
|
+
orange('(')+
|
1142
|
+
goldenrod(index.to_s)+
|
1143
|
+
orange(') ')
|
1144
|
+
this_line << colourized_and_padded_index
|
1145
|
+
copy_of_the_lecture_name = name_of_the_lecture.dup
|
1146
|
+
# =================================================================== #
|
1147
|
+
# Truncate the name a bit - otherwise it looks rather terrible.
|
1148
|
+
# =================================================================== #
|
1149
|
+
if copy_of_the_lecture_name.size > 62
|
1150
|
+
copy_of_the_lecture_name = copy_of_the_lecture_name[0 .. 58]+
|
1151
|
+
' [...] '
|
1152
|
+
end
|
1153
|
+
# =================================================================== #
|
1154
|
+
# Justify the name of the lecture a bit and indicate to the
|
1155
|
+
# user that he may register for this exam.
|
1156
|
+
# =================================================================== #
|
1157
|
+
if inner_hash.has_key? 'not_yet_registered'
|
1158
|
+
unless copy_of_the_lecture_name.size + 34 >= use_this_as_ljust_value # See the next line for an explanation of the number here; +1
|
1159
|
+
copy_of_the_lecture_name << ' ← [TODO: register for this exam]' # 33 chars
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
# =================================================================== #
|
1163
|
+
# .ljust the result next:
|
1164
|
+
# =================================================================== #
|
1165
|
+
copy_of_the_lecture_name = copy_of_the_lecture_name.ljust(use_this_as_ljust_value, ' ')
|
1166
|
+
if inner_hash.has_key? 'registered'
|
1167
|
+
# ================================================================= #
|
1168
|
+
# Registered exams will be coloured via lightgreen:
|
1169
|
+
# ================================================================= #
|
1170
|
+
copy_of_the_lecture_name = lightgreen(copy_of_the_lecture_name)
|
1171
|
+
else # Else we are not registered for that exam.
|
1172
|
+
# ================================================================= #
|
1173
|
+
# In this case we need to distinguish:
|
1174
|
+
#
|
1175
|
+
# - For courses that are of priority 1, we will use
|
1176
|
+
# - Otherwise the olivedrab colour will be used, as the default colour
|
1177
|
+
#
|
1178
|
+
# The old code before the rewrite in January 2024 used as the
|
1179
|
+
# default colour "lightslategray".
|
1180
|
+
# ================================================================= #
|
1181
|
+
if priority_of_the_lecture == 1
|
1182
|
+
copy_of_the_lecture_name = olivedrab(copy_of_the_lecture_name)
|
1183
|
+
else
|
1184
|
+
copy_of_the_lecture_name = darkolivegreen(copy_of_the_lecture_name)
|
1185
|
+
end
|
1186
|
+
end
|
1187
|
+
if copy_of_the_lecture_name.include?(' ← [TODO: register for this exam]')
|
1188
|
+
copy_of_the_lecture_name.sub!(
|
1189
|
+
/ ← \[TODO: register for this exam\]/,
|
1190
|
+
rev+indianred(' ← [TODO: register for this exam]')
|
1191
|
+
)
|
1192
|
+
end
|
1193
|
+
this_line << copy_of_the_lecture_name
|
1194
|
+
this_line << " #{return_red_vertical_bar} "
|
1195
|
+
this_line << colourized_german_weekday # Append the colourized germany weekday next.
|
1196
|
+
this_line << " #{mediumorchid(next_exam_date)}"
|
1197
|
+
this_line << " #{return_red_vertical_bar}"
|
1198
|
+
if the_exam_will_happen_in_n_days < 0.5 # Assume "heute" aka today.
|
1199
|
+
colourized_in_n_days = crimson('[ HEUTE ] ')
|
1200
|
+
else
|
1201
|
+
colourized_in_n_days = skyblue('[+ ')+
|
1202
|
+
orangered(
|
1203
|
+
the_exam_will_happen_in_n_days.to_s.rjust(4)
|
1204
|
+
)+
|
1205
|
+
skyblue(' days] ')
|
1206
|
+
end
|
1207
|
+
this_line << "#{colourized_in_n_days}"
|
1208
|
+
this_line << colourized_startzeit
|
1209
|
+
# =================================================================== #
|
1210
|
+
# Next comes the big display part - we will show the built-up line:
|
1211
|
+
# =================================================================== #
|
1212
|
+
if @report_result
|
1213
|
+
e this_line # And display it here.
|
1214
|
+
end
|
1215
|
+
if @report_result
|
1216
|
+
# ================================================================= #
|
1217
|
+
# We will work on a sanitized variant of `the_location`.
|
1218
|
+
# ================================================================= #
|
1219
|
+
sanitized_the_location = the_location.dup
|
1220
|
+
if sanitized_the_location.size > 49
|
1221
|
+
sanitized_the_location = word_wrap(sanitized_the_location, 49)
|
1222
|
+
end
|
1223
|
+
if sanitized_the_location.include? "\n"
|
1224
|
+
sanitized_the_location = sanitized_the_location.split("\n")
|
1225
|
+
else
|
1226
|
+
sanitized_the_location = [sanitized_the_location]
|
1227
|
+
end
|
1228
|
+
# ================================================================= #
|
1229
|
+
# Also show the location of the exam at hand. This will be done
|
1230
|
+
# on a new line, for which we will modify the array next.
|
1231
|
+
# ================================================================= #
|
1232
|
+
sanitized_the_location.map! {|entry|
|
1233
|
+
entry.strip!
|
1234
|
+
entry = entry.prepend(
|
1235
|
+
(
|
1236
|
+
(' ' * (use_this_as_ljust_value+new_line_index))
|
1237
|
+
)+'|'+(' ' * 14)
|
1238
|
+
)
|
1239
|
+
entry # Return it here.
|
1240
|
+
}
|
1241
|
+
joined_location = sanitized_the_location.join("\n").dup
|
1242
|
+
if TRY_TO_SHOW_PRIORITIES_FOR_THE_LECTURES
|
1243
|
+
# ================================================================= #
|
1244
|
+
# And append the priority as well, onto the location_of_the_exam
|
1245
|
+
# variable.
|
1246
|
+
# ================================================================= #
|
1247
|
+
joined_location << ' Priorität: '+priority_of_the_lecture.to_s # Used to be :springgreen
|
1248
|
+
end
|
1249
|
+
# ================================================================= #
|
1250
|
+
# Next append how many ECTS points this exam has.
|
1251
|
+
# ================================================================= #
|
1252
|
+
joined_location << ' ('+n_ects_points.to_s+' ECTS)' # limegreen
|
1253
|
+
if joined_location.include?(':')
|
1254
|
+
joined_location.sub!(
|
1255
|
+
/:/, " #{RIGHT_ARROW}"
|
1256
|
+
)
|
1257
|
+
end
|
1258
|
+
if joined_location.include?('|')
|
1259
|
+
joined_location.gsub!(/\|/, vertical_bar?)
|
1260
|
+
end
|
1261
|
+
if joined_location.include?('Priorität')
|
1262
|
+
array = [] # This is our new Array.
|
1263
|
+
splitted = joined_location.split('Priorität')
|
1264
|
+
array << 'Priorität'+splitted.last
|
1265
|
+
splitted = splitted.first
|
1266
|
+
splitted = splitted.split('→')
|
1267
|
+
array.prepend splitted.last
|
1268
|
+
array.prepend splitted.first
|
1269
|
+
array[2] = limegreen(array[2])
|
1270
|
+
if array[1].include? vertical_bar?
|
1271
|
+
splitted = array[1].split(vertical_bar?)
|
1272
|
+
splitted[0] = slategray(" #{splitted[0].lstrip}")
|
1273
|
+
splitted[1] = slategray(splitted[1])
|
1274
|
+
splitted = splitted.join(swarn(vertical_bar?))
|
1275
|
+
array[1] = splitted
|
1276
|
+
else
|
1277
|
+
array[1] = slategray(array[1])
|
1278
|
+
end
|
1279
|
+
if array[0].include?(vertical_bar?)
|
1280
|
+
splitted = array[0].split(vertical_bar?)
|
1281
|
+
splitted[1] = paleturquoise(splitted[1]) # This will include "Ort".
|
1282
|
+
array[0] = splitted[0] + swarn(vertical_bar?) + splitted[1]
|
1283
|
+
else
|
1284
|
+
array[0] = paleturquoise(array[0])
|
1285
|
+
end
|
1286
|
+
joined_location = array[0] + swarn('→')+
|
1287
|
+
array[1] + array[2]
|
1288
|
+
end
|
1289
|
+
e joined_location
|
1290
|
+
end
|
1291
|
+
}
|
1292
|
+
if @report_result
|
1293
|
+
display_total_ects
|
1294
|
+
e
|
1295
|
+
end
|
1296
|
+
end
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
# ========================================================================= #
|
1300
|
+
# === Studium::ShowUpcomingExams.return_all_registered_upcoming_exams
|
1301
|
+
#
|
1302
|
+
# Return all upcoming exams, without limitation, as an Array. This Array
|
1303
|
+
# can then be used, for example, in a GUI where it is displayed to the
|
1304
|
+
# user.
|
1305
|
+
#
|
1306
|
+
# Usage example:
|
1307
|
+
#
|
1308
|
+
# dataset = Studium::ShowUpcomingExams.return_all_registered_upcoming_exams
|
1309
|
+
#
|
1310
|
+
# ========================================================================= #
|
1311
|
+
def self.return_all_registered_upcoming_exams(&block)
|
1312
|
+
result = Studium::ShowUpcomingExams.new(
|
1313
|
+
:do_not_report_anything_and_do_not_update_the_cd_aliases
|
1314
|
+
).result?
|
1315
|
+
# ======================================================================= #
|
1316
|
+
# === Handle blocks next
|
1317
|
+
# ======================================================================= #
|
1318
|
+
if block_given?
|
1319
|
+
yielded = yield
|
1320
|
+
case yielded
|
1321
|
+
# ===================================================================== #
|
1322
|
+
# === :only_for_registered_exams
|
1323
|
+
# ===================================================================== #
|
1324
|
+
when :only_for_registered_exams
|
1325
|
+
result = result.select {|a, b|
|
1326
|
+
b.has_key?('registered')
|
1327
|
+
}
|
1328
|
+
end
|
1329
|
+
end
|
1330
|
+
return result
|
1331
|
+
end; self.instance_eval { alias upcoming_exams? return_all_registered_upcoming_exams } # === Studium::ShowUpcomingExams.upcoming_exams?
|
1332
|
+
|
1333
|
+
# ========================================================================= #
|
1334
|
+
# === Studium::ShowUpcomingExams[]
|
1335
|
+
# ========================================================================= #
|
1336
|
+
def self.[](i = ARGV, &block)
|
1337
|
+
new(i, &block)
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
end
|
1341
|
+
|
1342
|
+
# =========================================================================== #
|
1343
|
+
# === Studium.return_all_registered_upcoming_exams
|
1344
|
+
#
|
1345
|
+
# This method is recommended to be used if you need to return all
|
1346
|
+
# upcoming exams.
|
1347
|
+
# =========================================================================== #
|
1348
|
+
def self.return_all_registered_upcoming_exams(&block)
|
1349
|
+
Studium::ShowUpcomingExams.return_all_registered_upcoming_exams(&block)
|
1350
|
+
end; self.instance_eval { alias upcoming_exams? return_all_registered_upcoming_exams } # === Studium.upcoming_exams?
|
1351
|
+
|
1352
|
+
# =========================================================================== #
|
1353
|
+
# === Studium.d150
|
1354
|
+
# =========================================================================== #
|
1355
|
+
def self.d150
|
1356
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1357
|
+
Studium.show_upcoming_exams(150)
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# =========================================================================== #
|
1361
|
+
# === Studium.d100
|
1362
|
+
# =========================================================================== #
|
1363
|
+
def self.d100
|
1364
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1365
|
+
Studium.show_upcoming_exams(100)
|
1366
|
+
end
|
1367
|
+
|
1368
|
+
# =========================================================================== #
|
1369
|
+
# === Studium.d25
|
1370
|
+
# =========================================================================== #
|
1371
|
+
def self.d25
|
1372
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1373
|
+
Studium.show_upcoming_exams(25)
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
# =========================================================================== #
|
1377
|
+
# === Studium.d20
|
1378
|
+
# =========================================================================== #
|
1379
|
+
def self.d20
|
1380
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1381
|
+
Studium.show_upcoming_exams(20)
|
1382
|
+
end
|
1383
|
+
|
1384
|
+
# =========================================================================== #
|
1385
|
+
# === Studium.d15
|
1386
|
+
# =========================================================================== #
|
1387
|
+
def self.d15
|
1388
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1389
|
+
Studium.show_upcoming_exams(15)
|
1390
|
+
end
|
1391
|
+
|
1392
|
+
# =========================================================================== #
|
1393
|
+
# === Studium.d10
|
1394
|
+
# =========================================================================== #
|
1395
|
+
def self.d10
|
1396
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1397
|
+
Studium.show_upcoming_exams(10)
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
# =========================================================================== #
|
1401
|
+
# === Studium.d5
|
1402
|
+
# =========================================================================== #
|
1403
|
+
def self.d5
|
1404
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1405
|
+
Studium.show_upcoming_exams(5)
|
1406
|
+
end
|
1407
|
+
|
1408
|
+
# =========================================================================== #
|
1409
|
+
# === Studium.d3
|
1410
|
+
# =========================================================================== #
|
1411
|
+
def self.d3
|
1412
|
+
Studium::ShowUpcomingExams.new('--autostud') { :do_not_exit } if Studium.is_on_roebe?
|
1413
|
+
Studium.show_upcoming_exams(3)
|
1414
|
+
end
|
1415
|
+
|
1416
|
+
# =========================================================================== #
|
1417
|
+
# === Studium.next_exam?
|
1418
|
+
#
|
1419
|
+
# This method will return an Array.
|
1420
|
+
#
|
1421
|
+
# Result may be like this:
|
1422
|
+
#
|
1423
|
+
# ["300178 Mikrob. Lebensgemeinschaften", {:ects=>3.0, etc..]
|
1424
|
+
#
|
1425
|
+
# =========================================================================== #
|
1426
|
+
def self.next_exam?
|
1427
|
+
::Studium::ShowUpcomingExams.next_exam?
|
1428
|
+
end
|
1429
|
+
|
1430
|
+
# =========================================================================== #
|
1431
|
+
# === Studium.return_upcoming_exams_as_HTML
|
1432
|
+
# =========================================================================== #
|
1433
|
+
def self.return_upcoming_exams_as_HTML(
|
1434
|
+
hash = {}
|
1435
|
+
)
|
1436
|
+
_ = '<div'.dup
|
1437
|
+
if hash and hash.is_a?(Hash)
|
1438
|
+
# ======================================================================= #
|
1439
|
+
# === :css_style
|
1440
|
+
# ======================================================================= #
|
1441
|
+
if hash.has_key? :css_style
|
1442
|
+
_ << ' style="'+
|
1443
|
+
hash.delete(:css_style).to_s+
|
1444
|
+
'"'
|
1445
|
+
end
|
1446
|
+
end
|
1447
|
+
_ << ">\n"
|
1448
|
+
Studium.enable_www_mode
|
1449
|
+
time_now = ::Time.now
|
1450
|
+
dataset = Studium.upcoming_exams? { :only_for_registered_exams }
|
1451
|
+
dataset.each {|a, inner_hash|
|
1452
|
+
homepage = inner_hash[:homepage]
|
1453
|
+
homepage = homepage.first if homepage.is_a? Array
|
1454
|
+
homepage = homepage.to_s
|
1455
|
+
n_ECTS = inner_hash[:ects]
|
1456
|
+
registered_for_the_exam_on_this_day = inner_hash['registered']
|
1457
|
+
if registered_for_the_exam_on_this_day.is_a? Array
|
1458
|
+
registered_for_the_exam_on_this_day = registered_for_the_exam_on_this_day.first
|
1459
|
+
end
|
1460
|
+
only_the_exam_day = registered_for_the_exam_on_this_day.scan(
|
1461
|
+
/\d{2}\.\d{2}\.\d{4}/
|
1462
|
+
).flatten.first
|
1463
|
+
future_time = ::Time.parse(only_the_exam_day)
|
1464
|
+
time_difference = future_time - time_now
|
1465
|
+
_ << '<p class="default">'+"\n"
|
1466
|
+
# ======================================================================= #
|
1467
|
+
# The header. Note that the CSS class specific_exam_date can be
|
1468
|
+
# used to style the specific exam date.
|
1469
|
+
# ======================================================================= #
|
1470
|
+
_ << Cyberweb.boldbr(
|
1471
|
+
HtmlTags.a(homepage, content: a)+
|
1472
|
+
' <b class="indigo">['+n_ECTS.to_s+' ECTS]</b>'
|
1473
|
+
)+'<br>'+
|
1474
|
+
'<span class="marl1em">Exam on:</span> '+
|
1475
|
+
'<span class="BOLD specific_exam_date">'+
|
1476
|
+
registered_for_the_exam_on_this_day.to_s+
|
1477
|
+
'</span> '+ # This has the special CSS class.
|
1478
|
+
'(in <b class="darkgreen">'+(
|
1479
|
+
(time_difference / 60 / 60) / 24
|
1480
|
+
).round(1).to_s+' days</b>)'
|
1481
|
+
_ << "</p>\n"
|
1482
|
+
_ << Cyberweb.fancy_spacer
|
1483
|
+
}
|
1484
|
+
_ << "</div>\n"
|
1485
|
+
return _
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
# =========================================================================== #
|
1489
|
+
# === Studium.show_upcoming_exams
|
1490
|
+
# =========================================================================== #
|
1491
|
+
def self.show_upcoming_exams(
|
1492
|
+
show_n_exams = :all_of_them, # This is also :default.
|
1493
|
+
pass_this_array_onto_the_menu = nil,
|
1494
|
+
&block
|
1495
|
+
)
|
1496
|
+
if show_n_exams.is_a?(Array) and show_n_exams.empty?
|
1497
|
+
show_n_exams = :all_of_them
|
1498
|
+
end
|
1499
|
+
# ========================================================================= #
|
1500
|
+
# === Handle blocks given to this method next
|
1501
|
+
# ========================================================================= #
|
1502
|
+
if block_given?
|
1503
|
+
yielded = yield
|
1504
|
+
if yielded.is_a? Hash
|
1505
|
+
yielded.merge!(
|
1506
|
+
show_n_upcoming_exams: show_n_exams
|
1507
|
+
)
|
1508
|
+
elsif yielded.is_a? Symbol
|
1509
|
+
hash = { show_n_upcoming_exams: show_n_exams }
|
1510
|
+
hash.merge!(
|
1511
|
+
array_of_symbols: [yielded]
|
1512
|
+
)
|
1513
|
+
end
|
1514
|
+
end
|
1515
|
+
_ = Studium::ShowUpcomingExams.new(show_n_exams, :do_not_run_yet) { yielded }
|
1516
|
+
if pass_this_array_onto_the_menu and
|
1517
|
+
!pass_this_array_onto_the_menu.empty?
|
1518
|
+
_.menu(pass_this_array_onto_the_menu)
|
1519
|
+
end
|
1520
|
+
# ========================================================================= #
|
1521
|
+
# === Handle blocks next
|
1522
|
+
# ========================================================================= #
|
1523
|
+
if block_given?
|
1524
|
+
yielded = yield
|
1525
|
+
case yielded
|
1526
|
+
when :do_not_use_opn
|
1527
|
+
_.do_not_use_opn
|
1528
|
+
end
|
1529
|
+
end
|
1530
|
+
_.run
|
1531
|
+
end
|
1532
|
+
|
1533
|
+
end
|
1534
|
+
|
1535
|
+
if __FILE__ == $PROGRAM_NAME
|
1536
|
+
Studium.show_upcoming_exams(ARGV)
|
1537
|
+
end # showupcomingexams
|