studium 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of studium might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/README.md +2785 -0
- data/bin/ask_exam_question +7 -0
- data/bin/check_description_of_these_lectures +7 -0
- data/bin/curriculum_module_displayer +7 -0
- data/bin/cycle +7 -0
- data/bin/d10 +7 -0
- data/bin/d100 +7 -0
- data/bin/d15 +7 -0
- data/bin/d20 +7 -0
- data/bin/d25 +7 -0
- data/bin/d3 +7 -0
- data/bin/d30 +7 -0
- data/bin/d5 +7 -0
- data/bin/determine_curricula +7 -0
- data/bin/display_lecture_url +7 -0
- data/bin/exam_registration_at +7 -0
- data/bin/exam_statistics +7 -0
- data/bin/exams_per_month +9 -0
- data/bin/finished_exams_at_this_university +7 -0
- data/bin/flashcards +7 -0
- data/bin/from_curriculum_id_to_university +9 -0
- data/bin/location_to_this_exam_topic.rb +7 -0
- data/bin/mandatory_continuous_assessment +7 -0
- data/bin/mandatory_upcoming_courses +7 -0
- data/bin/n_ECTS +7 -0
- data/bin/n_exam_questions_already_answered +16 -0
- data/bin/nquestions +7 -0
- data/bin/nsolved +7 -0
- data/bin/open_last_exam_question_asked_file +7 -0
- data/bin/passed_exams +7 -0
- data/bin/passed_pr/303/274fungsimmanente_courses +7 -0
- data/bin/pdf_for +7 -0
- data/bin/random_exam_topic +7 -0
- data/bin/report_solved_topics +7 -0
- data/bin/return_n_ects_from_this_file +7 -0
- data/bin/search_for_n_ects +7 -0
- data/bin/show_lectures_on_the_commandline +7 -0
- data/bin/show_themes +7 -0
- data/bin/solved +9 -0
- data/bin/solved_ects +7 -0
- data/bin/studienkennzahl +7 -0
- data/bin/studium +7 -0
- data/bin/studium_skeleton +7 -0
- data/bin/ufind +7 -0
- data/bin/upcoming_exams +7 -0
- data/bin/week_parser +7 -0
- data/doc/ECTS_CONSIDERATIONS.md +81 -0
- data/doc/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER.md +44 -0
- data/doc/README.gen +2742 -0
- data/doc/SQL_database_specification.md +46 -0
- data/doc/deprecated_components.md +24 -0
- data/doc/documentation_for_the_file_lecture_information.md +311 -0
- data/doc/elegant_colours.md +21 -0
- data/doc/todo/TODO_FOR_STUDIUM_GEM.md +112 -0
- data/doc/todo/TODO_FOR_THE_GRAPHICAL_PARTS_OF_THE_STUDIUM_GEM_INCLUDING_WWW_RELATED_ASPECTS.md +35 -0
- data/img/STUDIES.png +0 -0
- data/lib/studium/autoinclude.rb +7 -0
- data/lib/studium/base/base.rb +2710 -0
- data/lib/studium/base/prototype.rb +543 -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 +11 -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 +110 -0
- data/lib/studium/check_and_sanitize/check_for_correct_themes_of_each_course.rb +90 -0
- data/lib/studium/check_and_sanitize/check_for_existing_description_of_this_lecture.rb +189 -0
- data/lib/studium/check_and_sanitize/check_the_lecture_information_file.rb +163 -0
- data/lib/studium/check_and_sanitize/find_duplicate_lectures.rb +115 -0
- data/lib/studium/check_and_sanitize/missing_priority_entry.rb +44 -0
- data/lib/studium/check_and_sanitize/sanitize_this_string_containing_the_lva_dates.rb +79 -0
- data/lib/studium/colours/colours.rb +549 -0
- data/lib/studium/colours/sfancy.rb +46 -0
- data/lib/studium/colours/sfile.rb +35 -0
- data/lib/studium/colours/simp.rb +40 -0
- data/lib/studium/colours/use_colours.rb +39 -0
- data/lib/studium/colours/use_this_colour_for_exam_questions_and_exam_answers.rb +80 -0
- data/lib/studium/commandline/commandline.rb +932 -0
- data/lib/studium/commandline/menu.rb +903 -0
- data/lib/studium/constants/colours.rb +14 -0
- data/lib/studium/constants/constants.rb +2142 -0
- data/lib/studium/constants/image_constants.rb +217 -0
- data/lib/studium/constants/web_constants.rb +25 -0
- data/lib/studium/css/project.css +267 -0
- data/lib/studium/curricula/curriculum.rb +210 -0
- data/lib/studium/curricula/curriculum_as_string.rb +280 -0
- data/lib/studium/curricula/curriculum_module_displayer/constants.rb +33 -0
- data/lib/studium/curricula/curriculum_module_displayer/curriculum_module_displayer.rb +417 -0
- data/lib/studium/curricula/curriculum_module_displayer/initialize.rb +25 -0
- data/lib/studium/curricula/curriculum_module_displayer/menu.rb +45 -0
- data/lib/studium/curricula/curriculum_module_displayer/reset.rb +74 -0
- data/lib/studium/curricula/curriculum_module_displayer/run.rb +20 -0
- data/lib/studium/curricula/curriculum_module_displayer/set_use_this_curriculum.rb +93 -0
- data/lib/studium/curricula/curriculum_module_displayer/show_and_report.rb +190 -0
- data/lib/studium/curricula/determine_curricula/constants.rb +11 -0
- data/lib/studium/curricula/determine_curricula/determine_curricula.rb +36 -0
- data/lib/studium/curricula/determine_curricula/help.rb +39 -0
- data/lib/studium/curricula/determine_curricula/initialize.rb +48 -0
- data/lib/studium/curricula/determine_curricula/menu.rb +151 -0
- data/lib/studium/curricula/determine_curricula/misc.rb +403 -0
- data/lib/studium/curricula/determine_curricula/report.rb +143 -0
- data/lib/studium/curricula/determine_curricula/reset.rb +59 -0
- data/lib/studium/curricula/determine_curricula/run.rb +19 -0
- data/lib/studium/curricula/determine_elective_courses_in_this_curriculum.rb +112 -0
- data/lib/studium/curricula/display_bachelor_curricula.rb +90 -0
- data/lib/studium/curricula/mitteilungsbl/303/244tter/mitteilungsbl/303/244tter.rb +324 -0
- data/lib/studium/curricula/modules/display_on_the_commandline.rb +319 -0
- data/lib/studium/curricula/modules/return_n_ects_in_this_module.rb +75 -0
- data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +75 -0
- data/lib/studium/curricula/prepare_individual_curriculum.rb +304 -0
- data/lib/studium/curricula/random_curriculum_creator/random_curriculum_creator.rb +163 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum.rb +114 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/constants.rb +11 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/initialize.rb +27 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/menu.rb +35 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/misc.rb +264 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/report.rb +163 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/reset.rb +64 -0
- data/lib/studium/curricula/show_lectures_of_this_curriculum_id/show_lectures_of_this_curriculum_id.rb +38 -0
- data/lib/studium/curricula/show_solved_percentage_among_the_registered_curricula.rb +87 -0
- data/lib/studium/ects/boku_ects_splitter.rb +128 -0
- data/lib/studium/ects/ects_per_university.rb +179 -0
- data/lib/studium/ects/ects_scanner.rb +141 -0
- data/lib/studium/ects/ects_to_university_parser.rb +142 -0
- data/lib/studium/ects/last_entry_is_curriculum.rb +150 -0
- data/lib/studium/ects/n_ects_in_these_lectures.rb +196 -0
- data/lib/studium/ects/n_ects_points_in_mandatory_presence_courses.rb +50 -0
- data/lib/studium/ects/return_n_ects_from_this_file.rb +59 -0
- data/lib/studium/ects/return_n_ects_from_this_url.rb +196 -0
- data/lib/studium/ects/search_for_n_ects.rb +614 -0
- data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +191 -0
- data/lib/studium/ects/show_passed_credits_per_curriculum.rb +276 -0
- data/lib/studium/ects/simple_total_ects_points.rb +135 -0
- data/lib/studium/ects/solved_ects/constants.rb +19 -0
- data/lib/studium/ects/solved_ects/reset.rb +51 -0
- data/lib/studium/ects/solved_ects/solved_ects.rb +325 -0
- data/lib/studium/ects/solved_ects_per_university/reset.rb +25 -0
- data/lib/studium/ects/solved_ects_per_university/solved_ects_per_university.rb +106 -0
- data/lib/studium/ects/still_missing.rb +129 -0
- data/lib/studium/ects/sum_of_ects.rb +144 -0
- data/lib/studium/encoding/encoding.rb +108 -0
- data/lib/studium/exam_topics/RNAi_siRNA_and_miRNA +86 -0
- data/lib/studium/exam_topics/abfall_als_ressource +86 -0
- data/lib/studium/exam_topics/advanced_biochemistry +781 -0
- data/lib/studium/exam_topics/advanced_biotechnology +214 -0
- data/lib/studium/exam_topics/advanced_cellbiology +27 -0
- data/lib/studium/exam_topics/advanced_chemistry +504 -0
- data/lib/studium/exam_topics/advanced_microbiology +43 -0
- data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +85 -0
- data/lib/studium/exam_topics/advanced_virology +218 -0
- data/lib/studium/exam_topics/ageing +114 -0
- data/lib/studium/exam_topics/agrar_ecology +63 -0
- data/lib/studium/exam_topics/agrarmarkt +71 -0
- data/lib/studium/exam_topics/agrarphysik +35 -0
- data/lib/studium/exam_topics/alcohols +29 -0
- data/lib/studium/exam_topics/algorithms +52 -0
- data/lib/studium/exam_topics/allergie +75 -0
- data/lib/studium/exam_topics/allgemeine_genetik +1006 -0
- data/lib/studium/exam_topics/allgemeine_mikrobiologie +946 -0
- data/lib/studium/exam_topics/aminoacids +438 -0
- data/lib/studium/exam_topics/analytische_chemie_1 +132 -0
- data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
- data/lib/studium/exam_topics/anatomie +290 -0
- data/lib/studium/exam_topics/anorganische_chemie +311 -0
- data/lib/studium/exam_topics/anthropologie +116 -0
- data/lib/studium/exam_topics/antibodies_and_antigens +764 -0
- data/lib/studium/exam_topics/apoptosis +35 -0
- data/lib/studium/exam_topics/archaea +60 -0
- data/lib/studium/exam_topics/architecture +8 -0
- data/lib/studium/exam_topics/artificial_intelligence +81 -0
- data/lib/studium/exam_topics/atomemissionsspektrometrie +6 -0
- data/lib/studium/exam_topics/audio +11 -0
- data/lib/studium/exam_topics/bacteriophages +240 -0
- data/lib/studium/exam_topics/basic_biochemistry +1002 -0
- data/lib/studium/exam_topics/basic_biotechnology +1001 -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 +126 -0
- data/lib/studium/exam_topics/betriebswirtschaftslehre +29 -0
- data/lib/studium/exam_topics/bioanalytik_und_biosensoren +382 -0
- data/lib/studium/exam_topics/biochips +78 -0
- data/lib/studium/exam_topics/bioelektrochemie +57 -0
- data/lib/studium/exam_topics/biofilms +22 -0
- data/lib/studium/exam_topics/bioinformatics +503 -0
- data/lib/studium/exam_topics/biological_therapeutics +153 -0
- data/lib/studium/exam_topics/biologie +137 -0
- data/lib/studium/exam_topics/biomarkers +106 -0
- data/lib/studium/exam_topics/biomaterials +89 -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/bodenkunde +373 -0
- data/lib/studium/exam_topics/bodenmikrobiologie +40 -0
- data/lib/studium/exam_topics/cancerbiology +442 -0
- data/lib/studium/exam_topics/cell_cultures +155 -0
- data/lib/studium/exam_topics/cellbiology +995 -0
- data/lib/studium/exam_topics/cellular_transport_and_protein_secretion +27 -0
- data/lib/studium/exam_topics/cellulose +6 -0
- data/lib/studium/exam_topics/chemische_technologie_anorganischer_stoffe +209 -0
- data/lib/studium/exam_topics/chemische_technologie_organischer_stoffe +25 -0
- data/lib/studium/exam_topics/chemisches_labor +60 -0
- data/lib/studium/exam_topics/chemotaxis_and_motility_in_prokaryotes +87 -0
- data/lib/studium/exam_topics/citric_acid_cycle +80 -0
- data/lib/studium/exam_topics/clinical_microbiology +492 -0
- data/lib/studium/exam_topics/computer_graphics +5 -0
- data/lib/studium/exam_topics/computer_science +280 -0
- data/lib/studium/exam_topics/crispr +28 -0
- data/lib/studium/exam_topics/cyanobacteria +42 -0
- data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +551 -0
- data/lib/studium/exam_topics/cytokines +5 -0
- data/lib/studium/exam_topics/databases_and_sql +106 -0
- data/lib/studium/exam_topics/dna_mutation_and_dna_repair +35 -0
- data/lib/studium/exam_topics/dna_replication +56 -0
- data/lib/studium/exam_topics/ecogenetics +26 -0
- data/lib/studium/exam_topics/ecological_agriculture +12 -0
- data/lib/studium/exam_topics/ecology +314 -0
- data/lib/studium/exam_topics/economy +211 -0
- data/lib/studium/exam_topics/elektronenmikroskopie +354 -0
- data/lib/studium/exam_topics/elektrophorese +89 -0
- data/lib/studium/exam_topics/elektrotechnik_und_elektrizit/303/244t +41 -0
- data/lib/studium/exam_topics/elisa +54 -0
- data/lib/studium/exam_topics/embryologie_und_entwicklung +547 -0
- data/lib/studium/exam_topics/endospores_and_spores +104 -0
- data/lib/studium/exam_topics/enzymes_and_cofactors +345 -0
- data/lib/studium/exam_topics/epigenetik +179 -0
- data/lib/studium/exam_topics/ethik +138 -0
- data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +328 -0
- data/lib/studium/exam_topics/excel +7 -0
- data/lib/studium/exam_topics/fish +19 -0
- data/lib/studium/exam_topics/fluorescence_microscopy +7 -0
- data/lib/studium/exam_topics/food_microbiology_and_food_biotechnology +71 -0
- data/lib/studium/exam_topics/forensik +11 -0
- data/lib/studium/exam_topics/forstwirtschaft +53 -0
- data/lib/studium/exam_topics/fortgeschrittene_genetik +511 -0
- data/lib/studium/exam_topics/fortgeschrittene_gentechnik +211 -0
- data/lib/studium/exam_topics/fortgeschrittene_physik +6 -0
- data/lib/studium/exam_topics/fungi +79 -0
- data/lib/studium/exam_topics/genetische_krankheiten +176 -0
- data/lib/studium/exam_topics/genexpression +1008 -0
- data/lib/studium/exam_topics/genomics_and_metagenomics +244 -0
- data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +901 -0
- data/lib/studium/exam_topics/geochemistry +67 -0
- data/lib/studium/exam_topics/geography +8 -0
- data/lib/studium/exam_topics/geologie_und_mineralogie +621 -0
- data/lib/studium/exam_topics/geometrie +47 -0
- data/lib/studium/exam_topics/geschichte +93 -0
- data/lib/studium/exam_topics/gluconeogenesis +59 -0
- data/lib/studium/exam_topics/glycogen +25 -0
- data/lib/studium/exam_topics/glycolysis +109 -0
- data/lib/studium/exam_topics/glykomik +100 -0
- data/lib/studium/exam_topics/glyoxylatzyklus +31 -0
- data/lib/studium/exam_topics/grassland_cultivation +32 -0
- data/lib/studium/exam_topics/hormone +134 -0
- data/lib/studium/exam_topics/html +7 -0
- data/lib/studium/exam_topics/human_ecology +8 -0
- data/lib/studium/exam_topics/hygiene +191 -0
- data/lib/studium/exam_topics/imaging_and_microscopy +241 -0
- data/lib/studium/exam_topics/immunanalytik +94 -0
- data/lib/studium/exam_topics/immunologie +982 -0
- data/lib/studium/exam_topics/informatik +97 -0
- data/lib/studium/exam_topics/innate_immunity +22 -0
- data/lib/studium/exam_topics/insekten +57 -0
- data/lib/studium/exam_topics/insulin_and_diabetes +57 -0
- data/lib/studium/exam_topics/java +502 -0
- data/lib/studium/exam_topics/javascript +12 -0
- data/lib/studium/exam_topics/klima +6 -0
- data/lib/studium/exam_topics/kryptographie +5 -0
- data/lib/studium/exam_topics/landtechnik +26 -0
- data/lib/studium/exam_topics/lebensmittel +208 -0
- data/lib/studium/exam_topics/lebensmitteltechnologie +16 -0
- data/lib/studium/exam_topics/linux +5 -0
- data/lib/studium/exam_topics/lipids +94 -0
- data/lib/studium/exam_topics/macroeconomics +40 -0
- data/lib/studium/exam_topics/mathematics +254 -0
- data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +250 -0
- data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +398 -0
- data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
- data/lib/studium/exam_topics/metabolismus +406 -0
- data/lib/studium/exam_topics/microbial_ecology +35 -0
- data/lib/studium/exam_topics/microcontrollers +11 -0
- data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +33 -0
- data/lib/studium/exam_topics/mikrobielle_physiologie +172 -0
- data/lib/studium/exam_topics/mitochondria +32 -0
- data/lib/studium/exam_topics/mixed +278 -0
- data/lib/studium/exam_topics/molecular_biology_of_plants +242 -0
- data/lib/studium/exam_topics/molekulare_medizin +131 -0
- data/lib/studium/exam_topics/nanotechnologie +453 -0
- data/lib/studium/exam_topics/nature_conservation_and_biodiversity +166 -0
- data/lib/studium/exam_topics/naturstoffe +9 -0
- data/lib/studium/exam_topics/netzwerke +32 -0
- data/lib/studium/exam_topics/neurobiology +267 -0
- data/lib/studium/exam_topics/nucleotide_sequencing +32 -0
- data/lib/studium/exam_topics/nutztierethologie +11 -0
- data/lib/studium/exam_topics/object_oriented_modeling +14 -0
- data/lib/studium/exam_topics/obstbau +234 -0
- data/lib/studium/exam_topics/organische_chemie +1007 -0
- data/lib/studium/exam_topics/organische_chemie_2 +118 -0
- data/lib/studium/exam_topics/paleobiology +35 -0
- data/lib/studium/exam_topics/parasitic_diseases_and_molecular_infection_biology +335 -0
- data/lib/studium/exam_topics/patent_law +55 -0
- data/lib/studium/exam_topics/pathologie +717 -0
- data/lib/studium/exam_topics/pcr +144 -0
- data/lib/studium/exam_topics/pentosephosphatweg +41 -0
- data/lib/studium/exam_topics/peroxisomes_glycosomes_and_lysosomes +54 -0
- data/lib/studium/exam_topics/pflanzenanatomie +255 -0
- data/lib/studium/exam_topics/pflanzenbau +24 -0
- data/lib/studium/exam_topics/pflanzenschutz +35 -0
- data/lib/studium/exam_topics/pflanzenwissenschaften +1009 -0
- data/lib/studium/exam_topics/pharmaceutical_biotechnology +250 -0
- data/lib/studium/exam_topics/physik +433 -1
- data/lib/studium/exam_topics/physikalische_chemie +86 -0
- data/lib/studium/exam_topics/physiology_and_histology +506 -0
- data/lib/studium/exam_topics/phytochemie +33 -0
- data/lib/studium/exam_topics/plant_biotechnology +128 -0
- data/lib/studium/exam_topics/plant_breeding +64 -0
- data/lib/studium/exam_topics/plant_development +50 -0
- data/lib/studium/exam_topics/populationsgenetik +136 -0
- data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +191 -0
- data/lib/studium/exam_topics/projektmanagement +219 -0
- data/lib/studium/exam_topics/prokaryote_genetics +531 -0
- data/lib/studium/exam_topics/protein_engineering +8 -0
- data/lib/studium/exam_topics/proteolyse +33 -0
- data/lib/studium/exam_topics/proteomik +40 -0
- data/lib/studium/exam_topics/prozesstechnik +95 -0
- data/lib/studium/exam_topics/psychologie +13 -0
- data/lib/studium/exam_topics/python +353 -0
- data/lib/studium/exam_topics/quality_management +256 -0
- data/lib/studium/exam_topics/rechtsgrundlagen +115 -0
- data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
- data/lib/studium/exam_topics/rna_and_dna +395 -0
- data/lib/studium/exam_topics/rna_seq +11 -0
- data/lib/studium/exam_topics/ruby +146 -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 +62 -0
- data/lib/studium/exam_topics/signal_transduction_and_laser_systems +167 -0
- data/lib/studium/exam_topics/splicing_exons_and_introns +63 -0
- data/lib/studium/exam_topics/statistik +233 -0
- data/lib/studium/exam_topics/stemcells +158 -0
- data/lib/studium/exam_topics/stickstofffixierung +75 -0
- data/lib/studium/exam_topics/structural_bioinformatics +54 -0
- data/lib/studium/exam_topics/strukturbiologie +380 -0
- data/lib/studium/exam_topics/system_biology_and_synthetic_biology +101 -0
- data/lib/studium/exam_topics/systematische_zoologie +433 -0
- data/lib/studium/exam_topics/technical_ecology +144 -0
- data/lib/studium/exam_topics/technische_chemie +202 -0
- data/lib/studium/exam_topics/technische_grundlagen_der_informatik +26 -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 +97 -0
- data/lib/studium/exam_topics/the_c_plus_plus_programming_language +489 -0
- data/lib/studium/exam_topics/the_c_programming_language +129 -0
- data/lib/studium/exam_topics/the_cellcycle +81 -0
- data/lib/studium/exam_topics/the_european_union +119 -0
- data/lib/studium/exam_topics/the_interferon_system +38 -0
- data/lib/studium/exam_topics/the_microbiome +163 -0
- data/lib/studium/exam_topics/the_universe +12 -0
- data/lib/studium/exam_topics/theoretische_chemie +5 -0
- data/lib/studium/exam_topics/theoretische_informatik +157 -0
- data/lib/studium/exam_topics/tierzucht +94 -0
- data/lib/studium/exam_topics/toxikologie +408 -0
- data/lib/studium/exam_topics/transcription +82 -0
- data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +142 -0
- data/lib/studium/exam_topics/umweltbiotechnologie +63 -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 +55 -0
- data/lib/studium/exam_topics/vaccines_and_vaccination +242 -0
- data/lib/studium/exam_topics/vectors_and_gene_therapy +240 -0
- data/lib/studium/exam_topics/verfahrenstechnik +32 -0
- data/lib/studium/exam_topics/veterinary_medicine +10 -0
- data/lib/studium/exam_topics/vitamine +24 -0
- data/lib/studium/exam_topics/wasserkunde +137 -0
- data/lib/studium/exam_topics/weinbau +59 -0
- data/lib/studium/exam_topics/wissenschaft +18 -0
- data/lib/studium/exam_topics/yeast +102 -0
- data/lib/studium/exam_topics/zoologie +330 -0
- data/lib/studium/exams/afterburn/afterburn.rb +257 -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 +131 -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/csv/create_csv_passed_exams_file.rb +217 -0
- data/lib/studium/exams/cycle.rb +291 -0
- data/lib/studium/exams/dataset.rb +123 -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_question/README.md +3 -0
- data/lib/studium/exams/exam_question/answer.rb +177 -0
- data/lib/studium/exams/exam_question/constants.rb +111 -0
- data/lib/studium/exams/exam_question/exam_question.rb +1135 -0
- data/lib/studium/exams/exam_question/menu.rb +333 -0
- data/lib/studium/exams/exam_question/misc.rb +895 -0
- data/lib/studium/exams/exam_question/question.rb +91 -0
- data/lib/studium/exams/exam_question/reset.rb +96 -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 +2438 -0
- data/lib/studium/exams/exams_this_week.rb +182 -0
- data/lib/studium/exams/fix_exam_dates.rb +121 -0
- data/lib/studium/exams/frozen.rb +36 -0
- data/lib/studium/exams/last_exams/last_exams.rb +398 -0
- data/lib/studium/exams/lectures_without_exam_entry.rb +137 -0
- data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1956 -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 +404 -0
- data/lib/studium/exams/next_exam.rb +107 -0
- data/lib/studium/exams/next_exams.rb +378 -0
- data/lib/studium/exams/open_exam_associated_url.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 +109 -0
- data/lib/studium/exams/pr/303/274fung.rb +289 -0
- data/lib/studium/exams/push_solved_questions_on_top.rb +180 -0
- data/lib/studium/exams/questions_solved_from_day_to_day/questions_solved_from_day_to_day.rb +377 -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/show_all_passed_exams_of_this_university.rb +252 -0
- data/lib/studium/exams/show_backlog_of_exams.rb +117 -0
- data/lib/studium/exams/show_next_exams_for.rb +133 -0
- data/lib/studium/exams/show_themes/constants.rb +28 -0
- data/lib/studium/exams/show_themes/menu.rb +61 -0
- data/lib/studium/exams/show_themes/misc.rb +537 -0
- data/lib/studium/exams/show_themes/reset.rb +62 -0
- data/lib/studium/exams/show_themes/show_themes.rb +27 -0
- data/lib/studium/exams/show_upcoming_exams/consider_autogenerating_exam_aliases.rb +181 -0
- data/lib/studium/exams/show_upcoming_exams/constants.rb +82 -0
- data/lib/studium/exams/show_upcoming_exams/help.rb +33 -0
- data/lib/studium/exams/show_upcoming_exams/initialize.rb +77 -0
- data/lib/studium/exams/show_upcoming_exams/menu.rb +60 -0
- data/lib/studium/exams/show_upcoming_exams/report.rb +200 -0
- data/lib/studium/exams/show_upcoming_exams/reset.rb +45 -0
- data/lib/studium/exams/show_upcoming_exams/run.rb +20 -0
- data/lib/studium/exams/show_upcoming_exams/show_upcoming_exams.rb +544 -0
- data/lib/studium/exams/solve_all_questions_from_this_topic.rb +114 -0
- data/lib/studium/exams/solved/constants.rb +32 -0
- data/lib/studium/exams/solved/help.rb +24 -0
- data/lib/studium/exams/solved/initialize.rb +55 -0
- data/lib/studium/exams/solved/menu.rb +41 -0
- data/lib/studium/exams/solved/reset.rb +28 -0
- data/lib/studium/exams/solved/solved.rb +313 -0
- data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +162 -0
- data/lib/studium/exams/upcoming_exams/constants.rb +15 -0
- data/lib/studium/exams/upcoming_exams/help.rb +41 -0
- data/lib/studium/exams/upcoming_exams/initialize.rb +27 -0
- data/lib/studium/exams/upcoming_exams/menu.rb +79 -0
- data/lib/studium/exams/upcoming_exams/misc.rb +415 -0
- data/lib/studium/exams/upcoming_exams/reset.rb +34 -0
- data/lib/studium/exams/upcoming_exams/run.rb +26 -0
- data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +32 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/constants.rb +23 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/html.rb +64 -0
- data/lib/studium/exams/upcoming_exams_at_the_boku/upcoming_exams_at_the_boku.rb +194 -0
- data/lib/studium/exams/upcoming_exams_dataset.rb +247 -0
- data/lib/studium/exams/upload_exam_topics.rb +360 -0
- data/lib/studium/graphviz/README.md +4 -0
- data/lib/studium/graphviz/bachelor_vector_based_strategies.dot +160 -0
- data/lib/studium/graphviz/master_vector_based_strategies.dot +46 -0
- data/lib/studium/gui/gtk3/README.md +1 -0
- data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.config +6 -0
- data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.rb +760 -0
- data/lib/studium/gui/gtk3/ask_exam_question/manifest.yml +12 -0
- data/lib/studium/gui/gtk3/control_panel/control_panel.rb +39 -0
- data/lib/studium/gui/gtk3/curriculum_viewer/curriculum_viewer.rb +510 -0
- data/lib/studium/gui/gtk3/ects_per_university/ects_per_university.rb +217 -0
- data/lib/studium/gui/gtk3/exam_question_widget/exam_question_widget.rb +1887 -0
- data/lib/studium/gui/gtk3/expand_time_range/expand_time_range.rb +34 -0
- data/lib/studium/gui/gtk3/information_about_a_lecture/information_about_a_lecture.rb +34 -0
- data/lib/studium/gui/gtk3/lecture_information/lecture_information.rb +200 -0
- data/lib/studium/gui/gtk3/show_upcoming_exams/show_upcoming_exams.rb +34 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion$1.class +0 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion.class +0 -0
- data/lib/studium/gui/java/exam_question/ExamQuestion.java +215 -0
- data/lib/studium/gui/javafx/exam_question_widget/exam_question_widget.rb +58 -0
- data/lib/studium/gui/jruby/exam_question_widget/exam_question_widget.rb +317 -0
- data/lib/studium/gui/libui/ask_exam_question/ask_exam_question.rb +349 -0
- data/lib/studium/gui/shared_code/control_panel/control_panel_module.rb +314 -0
- data/lib/studium/gui/shared_code/exam_question_widget/exam_question_widget_module.rb +39 -0
- data/lib/studium/gui/shared_code/expand_time_range/expand_time_range.css +0 -0
- data/lib/studium/gui/shared_code/expand_time_range/expand_time_range_module.rb +190 -0
- data/lib/studium/gui/shared_code/information_about_a_lecture/information_about_a_lecture_module.rb +180 -0
- data/lib/studium/gui/shared_code/show_upcoming_exams/show_upcoming_exams_module.rb +206 -0
- data/lib/studium/images/libui_ask_exam_question.png +0 -0
- data/lib/studium/images/small_logos/DNA.png +0 -0
- data/lib/studium/images/small_logos/README.md +2 -0
- data/lib/studium/images/studies_favicon.png +0 -0
- data/lib/studium/java/Mkdir.java +15 -0
- data/lib/studium/java/README.md +2 -0
- data/lib/studium/java/ask_exam_question/AskExamQuestion.java +477 -0
- data/lib/studium/java/solved/Solved.class +0 -0
- data/lib/studium/java/solved/Solved.java +110 -0
- data/lib/studium/java/utility_scripts/OpenLastExamQuestionurlLinkViaTheBrowser.class +0 -0
- data/lib/studium/java/utility_scripts/OpenLastExamQuestionurlLinkViaTheBrowser.java +80 -0
- data/lib/studium/logging/README.md +2 -0
- data/lib/studium/logging/ensure_that_the_log_directory_exists.rb +47 -0
- data/lib/studium/logging/html_log_directory.rb +41 -0
- data/lib/studium/logging/log_directory.rb +112 -0
- data/lib/studium/logging/store_last_question_asked_into_file.rb +137 -0
- data/lib/studium/parsers/README.md +2 -0
- data/lib/studium/parsers/custom_exam_results_parser.rb +206 -0
- data/lib/studium/parsers/parse_lva_dates.rb +190 -0
- data/lib/studium/parsers/parse_remote_lecture.rb +325 -0
- data/lib/studium/project/project.rb +76 -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 +45 -0
- data/lib/studium/requires/require_the_logging_files.rb +23 -0
- data/lib/studium/requires/require_the_parsers.rb +28 -0
- data/lib/studium/requires/require_the_studium_constants.rb +10 -0
- data/lib/studium/requires/require_the_studium_project.rb +54 -0
- data/lib/studium/requires/require_the_toplevel_methods.rb +27 -0
- data/lib/studium/requires/require_the_utility_scripts.rb +49 -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.rb +336 -0
- data/lib/studium/statistics/determine_exam_statistics_from_this_file.rb +142 -0
- data/lib/studium/statistics/exam_topics_that_are_about_to_be_completed.rb +119 -0
- data/lib/studium/statistics/max_stats.rb +170 -0
- data/lib/studium/statistics/new_questions_per_year.rb +147 -0
- data/lib/studium/statistics/report_how_many_ects_points_per_curriculum_were_completed.rb +167 -0
- data/lib/studium/statistics/report_how_many_exam_questions_were_answered.rb +473 -0
- data/lib/studium/statistics/show_exam_statistics.rb +60 -0
- data/lib/studium/statistics/show_which_courses_are_in_a_bachelor_or_master_curriculum_respectively.rb +104 -0
- data/lib/studium/statistics/top_stats.rb +127 -0
- data/lib/studium/toplevel_methods/all_passed_exams.rb +37 -0
- data/lib/studium/toplevel_methods/already_solved_this_lecture.rb +100 -0
- data/lib/studium/toplevel_methods/available_topics.rb +156 -0
- data/lib/studium/toplevel_methods/average_grade.rb +141 -0
- data/lib/studium/toplevel_methods/calculate_pr/303/274fungsimmanente_lectures_from_this_file.rb +55 -0
- data/lib/studium/toplevel_methods/copy_the_last_backup_of_file_lecture_information.rb +34 -0
- data/lib/studium/toplevel_methods/curriculum_related_code.rb +999 -0
- data/lib/studium/toplevel_methods/determine_local_directory_of_this_lecture.rb +72 -0
- data/lib/studium/toplevel_methods/does_this_course_require_mandatory_presence.rb +51 -0
- data/lib/studium/toplevel_methods/download.rb +163 -0
- data/lib/studium/toplevel_methods/e.rb +16 -0
- data/lib/studium/toplevel_methods/ects_from_lectures.rb +250 -0
- data/lib/studium/toplevel_methods/editor.rb +65 -0
- data/lib/studium/toplevel_methods/esystem.rb +22 -0
- data/lib/studium/toplevel_methods/filter_away_invalid_questions.rb +77 -0
- data/lib/studium/toplevel_methods/find_exam_topic_and_exam_title.rb +3442 -0
- data/lib/studium/toplevel_methods/handle_archive_of_the_exam_questions.rb +136 -0
- data/lib/studium/toplevel_methods/has_this_lecture_been_already_passed_but_the_id_was_changed_lateron.rb +42 -0
- data/lib/studium/toplevel_methods/has_this_module_been_completed.rb +206 -0
- data/lib/studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb +32 -0
- data/lib/studium/toplevel_methods/is_on_roebe.rb +26 -0
- data/lib/studium/toplevel_methods/is_this_exam_topic_included.rb +46 -0
- data/lib/studium/toplevel_methods/is_this_homepage_registered.rb +31 -0
- data/lib/studium/toplevel_methods/is_this_lecture_a_practical_course.rb +100 -0
- data/lib/studium/toplevel_methods/is_this_lecture_registered_in_upcoming_exams.rb +42 -0
- data/lib/studium/toplevel_methods/java.rb +32 -0
- data/lib/studium/toplevel_methods/lecture_information.rb +106 -0
- data/lib/studium/toplevel_methods/lva_numbers.rb +355 -0
- data/lib/studium/toplevel_methods/main_dataset.rb +73 -0
- data/lib/studium/toplevel_methods/methods_related_to_directories.rb +225 -0
- data/lib/studium/toplevel_methods/methods_related_to_files.rb +205 -0
- data/lib/studium/toplevel_methods/misc.rb +169 -0
- data/lib/studium/toplevel_methods/n_questions_available.rb +137 -0
- data/lib/studium/toplevel_methods/n_topics_available.rb +63 -0
- data/lib/studium/toplevel_methods/names_of_all_solved_exams.rb +71 -0
- data/lib/studium/toplevel_methods/note_down_the_start_time_and_how_many_exams_have_been_already_solved.rb +69 -0
- data/lib/studium/toplevel_methods/opnn.rb +25 -0
- data/lib/studium/toplevel_methods/passed_this_exam_on.rb +105 -0
- data/lib/studium/toplevel_methods/pristine.rb +69 -0
- data/lib/studium/toplevel_methods/read_delay_between_questions_from_file.rb +34 -0
- data/lib/studium/toplevel_methods/regexes.rb +90 -0
- data/lib/studium/toplevel_methods/registered_for_this_exam.rb +62 -0
- data/lib/studium/toplevel_methods/remove_comments.rb +26 -0
- data/lib/studium/toplevel_methods/remove_exam_topics_that_were_already_answered.rb +27 -0
- data/lib/studium/toplevel_methods/remove_tags.rb +32 -0
- data/lib/studium/toplevel_methods/report.rb +419 -0
- data/lib/studium/toplevel_methods/return_all_exams_on_this_day.rb +66 -0
- data/lib/studium/toplevel_methods/return_dataset_for_this_exam_topic.rb +41 -0
- data/lib/studium/toplevel_methods/return_div_timetable_of_upcoming_exams.rb +498 -0
- data/lib/studium/toplevel_methods/return_ects_from_this_lecture_stored_in_the_file_lecture_information.rb +194 -0
- data/lib/studium/toplevel_methods/return_hash_of_already_solved_lectures.rb +46 -0
- data/lib/studium/toplevel_methods/return_last_exam_question.rb +34 -0
- data/lib/studium/toplevel_methods/return_local_path_of_this_pwdstud.rb +60 -0
- data/lib/studium/toplevel_methods/return_lva_number_of_this_lecture.rb +72 -0
- data/lib/studium/toplevel_methods/return_n_percent_solved_from_this_topic.rb +90 -0
- data/lib/studium/toplevel_methods/return_n_questions_were_answered_for_this_topic.rb +60 -0
- data/lib/studium/toplevel_methods/return_proper_university_image.rb +86 -0
- data/lib/studium/toplevel_methods/return_question_answer_string_from_this_topic.rb +63 -0
- data/lib/studium/toplevel_methods/return_remote_homepage_of_this_lecture.rb +9400 -0
- data/lib/studium/toplevel_methods/return_remote_moodle_link_of_this_lecture.rb +1661 -0
- data/lib/studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb +110 -0
- data/lib/studium/toplevel_methods/return_theme_of_the_next_upcoming_exam.rb +38 -0
- data/lib/studium/toplevel_methods/rinstall2.rb +34 -0
- data/lib/studium/toplevel_methods/rti_conflict.rb +35 -0
- data/lib/studium/toplevel_methods/runmode.rb +87 -0
- data/lib/studium/toplevel_methods/sanitized_dataset_from_file_passed_exams_per_month.rb +52 -0
- data/lib/studium/toplevel_methods/set_last_file_for_exam_questions.rb +64 -0
- data/lib/studium/toplevel_methods/set_this_cd_alias_to.rb +86 -0
- data/lib/studium/toplevel_methods/show_passed_exams_having_this_grade.rb +34 -0
- data/lib/studium/toplevel_methods/spacer.rb +18 -0
- data/lib/studium/toplevel_methods/time.rb +239 -0
- data/lib/studium/toplevel_methods/total_ects_points_passed.rb +72 -0
- data/lib/studium/toplevel_methods/try_to_guess_the_most_likely_lva_id.rb +57 -0
- data/lib/studium/toplevel_methods/try_to_return_the_expanded_name_of_this_lecture.rb +63 -0
- data/lib/studium/toplevel_methods/unfinished.rb +51 -0
- data/lib/studium/toplevel_methods/url.rb +100 -0
- data/lib/studium/toplevel_methods/verbose_truth.rb +36 -0
- data/lib/studium/toplevel_methods/when_was_this_lecture_passed.rb +54 -0
- data/lib/studium/toplevel_methods/word_wrap.rb +56 -0
- data/lib/studium/toplevel_methods/write_into_file_related_functionality.rb +189 -0
- data/lib/studium/toplevel_methods/yes_or_no_ja_oder_nein.rb +33 -0
- data/lib/studium/universities_in_austria/README.md +2 -0
- data/lib/studium/universities_in_austria/boku/README.md +4 -0
- data/lib/studium/universities_in_austria/boku/boku_/303/266ffnungszeiten.rb +28 -0
- data/lib/studium/universities_in_austria/boku/show_three_pillars_of_these_lectures.rb +110 -0
- data/lib/studium/universities_in_austria/boku/three_pillars.rb +237 -0
- data/lib/studium/universities_in_austria/tu_vienna/README.md +6 -0
- data/lib/studium/universities_in_austria/tu_vienna/tu_ferien.rb +42 -0
- data/lib/studium/universities_in_austria/tu_vienna/tu_/303/266ffnungszeiten.rb +34 -0
- data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_boku_lecture_to_curriculum.rb +384 -0
- data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_lecture_to_curriculum.rb +238 -0
- data/lib/studium/utility_scripts/attribute_lectures_to_university/attribute_lectures_to_university.rb +375 -0
- data/lib/studium/utility_scripts/audio_stats.rb +171 -0
- data/lib/studium/utility_scripts/auto_stud/auto_stud.rb +252 -0
- data/lib/studium/utility_scripts/auto_stud/constants.rb +18 -0
- data/lib/studium/utility_scripts/auto_stud/initialize.rb +23 -0
- data/lib/studium/utility_scripts/auto_stud/misc.rb +18 -0
- data/lib/studium/utility_scripts/autopurge_this_lecture_date.rb +93 -0
- data/lib/studium/utility_scripts/average_grade_of_this_curriculum.rb +101 -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/create_database/create_database.rb +106 -0
- data/lib/studium/utility_scripts/current_lectures_belonging_to_both_bachelor_and_master_curriculum.rb +113 -0
- data/lib/studium/utility_scripts/currently_participating_in_these_lectures/currently_participating_in_these_lectures.rb +104 -0
- data/lib/studium/utility_scripts/display_lecture_url.rb +160 -0
- data/lib/studium/utility_scripts/expand_time_range/expand_time_range.rb +414 -0
- data/lib/studium/utility_scripts/finished_exams_at_this_university.rb +94 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/constants.rb +23 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/foreign_language_percentage.rb +149 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/help.rb +31 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/initialize.rb +25 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/menu.rb +158 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/report.rb +62 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/reset.rb +50 -0
- data/lib/studium/utility_scripts/foreign_language_percentage/run.rb +19 -0
- data/lib/studium/utility_scripts/generate_spreadsheet/generate_spreadsheet.rb +354 -0
- data/lib/studium/utility_scripts/generate_spreadsheet/misc.rb +144 -0
- data/lib/studium/utility_scripts/holidays/holidays.rb +150 -0
- data/lib/studium/utility_scripts/homepage_of_these_courses.rb +118 -0
- data/lib/studium/utility_scripts/lecture_downloader.rb +107 -0
- data/lib/studium/utility_scripts/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.rb +431 -0
- data/lib/studium/utility_scripts/mandatory_lectures_in_this_month/mandatory_lectures_in_this_month.rb +316 -0
- data/lib/studium/utility_scripts/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.rb +103 -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 +177 -0
- data/lib/studium/utility_scripts/passed_pr/303/274fungsimmanente_courses/passed_pr/303/274fungsimmanente_courses.rb +181 -0
- data/lib/studium/utility_scripts/pdf/README.md +2 -0
- data/lib/studium/utility_scripts/pdf/create_pdf_file_for_this_exam_topic.rb +355 -0
- data/lib/studium/utility_scripts/pdf/hexapdf_support.rb +50 -0
- data/lib/studium/utility_scripts/preparatory_meetings/preparatory_meetings.rb +312 -0
- data/lib/studium/utility_scripts/priority.rb +164 -0
- data/lib/studium/utility_scripts/priority_points/priority_points.rb +263 -0
- data/lib/studium/utility_scripts/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 +300 -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_total_amount_of_questions_and_answers_for.rb +116 -0
- data/lib/studium/utility_scripts/report_whether_this_lecture_is_registered_in_the_file_lecture_information.rb +128 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/individual_resolve_practical_courses_date_conflicts.rb +254 -0
- data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/resolve_practical_courses_date_conflicts.rb +265 -0
- data/lib/studium/utility_scripts/scrape_remote_university_url.rb +138 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_container.rb +144 -0
- data/lib/studium/utility_scripts/semester_schedule_creator/semester_schedule_creator.rb +374 -0
- data/lib/studium/utility_scripts/semesterplaner.rb +289 -0
- data/lib/studium/utility_scripts/set_aliases_based_on_this_file.rb +95 -0
- data/lib/studium/utility_scripts/show_all_passed_master_lectures.rb +119 -0
- data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb +1238 -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/constants.rb +11 -0
- data/lib/studium/utility_scripts/show_lectures/help.rb +34 -0
- data/lib/studium/utility_scripts/show_lectures/initialize.rb +23 -0
- data/lib/studium/utility_scripts/show_lectures/menu.rb +127 -0
- data/lib/studium/utility_scripts/show_lectures/misc.rb +584 -0
- data/lib/studium/utility_scripts/show_lectures/reset.rb +89 -0
- data/lib/studium/utility_scripts/show_lectures/run.rb +27 -0
- data/lib/studium/utility_scripts/show_lectures/show_lectures.rb +48 -0
- data/lib/studium/utility_scripts/show_lectures_fitting_to_this_language/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/constants.rb +17 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/determine.rb +673 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/help.rb +44 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/html.rb +605 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/initialize.rb +56 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/konsole.rb +32 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/menu.rb +472 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/misc.rb +837 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/reset.rb +121 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/run.rb +44 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/show.rb +106 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb +261 -0
- data/lib/studium/utility_scripts/show_lectures_on_the_commandline/sorted_individual_curricula.rb +121 -0
- data/lib/studium/utility_scripts/show_lectures_on_this_day.rb +149 -0
- data/lib/studium/utility_scripts/show_lva_dates_of_this_lecture.rb +169 -0
- data/lib/studium/utility_scripts/show_mixed_bachelor_master_courses/show_mixed_bachelor_master_courses.rb +91 -0
- data/lib/studium/utility_scripts/show_outdated_lva_dates/show_outdated_lva_dates.rb +210 -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.rb +116 -0
- data/lib/studium/utility_scripts/studium_skeleton/studium_skeleton.rb +227 -0
- data/lib/studium/utility_scripts/stundenplan.rb +595 -0
- data/lib/studium/utility_scripts/sync_studium_relevant_entries_one_level_downwards.rb +217 -0
- data/lib/studium/utility_scripts/ufind/ufind.rb +98 -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 +181 -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.rb +261 -0
- data/lib/studium/version/version.rb +46 -0
- data/lib/studium/www/curricula_displayer.cgi +197 -0
- data/lib/studium/www/curriculum_displayer.rb +162 -0
- data/lib/studium/www/exams.cgi +53 -0
- data/lib/studium/www/fast_ask_exam_question.cgi +155 -0
- data/lib/studium/www/sinatra/app.rb +231 -0
- data/lib/studium/www/sinatra/misc.rb +115 -0
- data/lib/studium/www/statistics/statistics.cgi +59 -0
- data/lib/studium/yaml/ad_hoc_trainer/README.md +2 -0
- data/lib/studium/yaml/ad_hoc_trainer/exam_topics.md +15 -0
- data/lib/studium/yaml/allowed_themes_for_exams.yml +344 -0
- data/lib/studium/yaml/array_allowed_entries_for_the_file_lecture_information.yml +70 -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 +28 -0
- data/lib/studium/yaml/colours/use_colours.yml +1 -0
- data/lib/studium/yaml/current_exams.yml +19 -0
- data/lib/studium/yaml/curricula/README.md +9 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_agrarwissenschaften_033255.yml +142 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_basisblock_033630.yml +65 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_botanik_033630.yml +84 -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 +120 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_molekulare_biologie_033630.yml +104 -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 +183 -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 +130 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_ktww_033231.yml +84 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_lmbt_033217.yml +118 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_medizinische_informatik_033533.yml +203 -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 +129 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_technische_informatik_033535.yml +23 -0
- data/lib/studium/yaml/curricula/bachelor/bachelor_ubrm_033227.yml +136 -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/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 +76 -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 +61 -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 +111 -0
- data/lib/studium/yaml/curricula/master/master_molekulare_biologie_066834.yml +142 -0
- data/lib/studium/yaml/curricula/master/master_pharmazie_066605.yml +170 -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 +538 -0
- data/lib/studium/yaml/daily_questions_solved.yml +1468 -0
- data/lib/studium/yaml/default_delay.yml +4 -0
- data/lib/studium/yaml/default_encoding.yml +1 -0
- data/lib/studium/yaml/directory_to_the_exam_topics.yml +0 -0
- data/lib/studium/yaml/editor.yml +1 -0
- data/lib/studium/yaml/file_for_exam_questions.yml +1 -0
- data/lib/studium/yaml/german/README.md +2 -0
- data/lib/studium/yaml/german/german_to_english_month_names.yml +16 -0
- data/lib/studium/yaml/grouped_themes.yml +192 -0
- data/lib/studium/yaml/holidays.yml +194 -0
- data/lib/studium/yaml/important_exams.yml +226 -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 +55870 -0
- data/lib/studium/yaml/log_dir.yml +1 -0
- data/lib/studium/yaml/main_topic.yml +11 -0
- data/lib/studium/yaml/max_stats.yml +241 -0
- data/lib/studium/yaml/meta_themes/README.md +13 -0
- data/lib/studium/yaml/meta_themes/biochemistry.md +6 -0
- data/lib/studium/yaml/meta_themes/bioinformatics.md +6 -0
- data/lib/studium/yaml/meta_themes/biotechnology.md +9 -0
- data/lib/studium/yaml/meta_themes/chemistry.md +9 -0
- data/lib/studium/yaml/meta_themes/genetics.md +10 -0
- data/lib/studium/yaml/meta_themes/immunology.md +5 -0
- data/lib/studium/yaml/meta_themes/metabolic_pathways.md +12 -0
- data/lib/studium/yaml/meta_themes/molecular_biology.md +9 -0
- data/lib/studium/yaml/meta_themes/protein_engineering.md +10 -0
- data/lib/studium/yaml/meta_themes/statistics.md +2 -0
- data/lib/studium/yaml/mitbelegung/README.md +4 -0
- data/lib/studium/yaml/mitbelegung/mitbelegung.yml +23 -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/show_topic.yml +1 -0
- data/lib/studium/yaml/statistics/max_stats.yml +239 -0
- data/lib/studium/yaml/statistics/statistics.yml +69 -0
- data/lib/studium/yaml/week/01_monday.yml +5 -0
- data/lib/studium/yaml/week/02_tuesday.yml +75 -0
- data/lib/studium/yaml/week/03_wednesday.yml +62 -0
- data/lib/studium/yaml/week/04_thursday.yml +14 -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 +13 -0
- data/lib/studium.rb +5 -0
- data/studium.gemspec +80 -0
- data/test/testing_studium.rb +244 -0
- data/test/testing_studium_base_class.rb +17 -0
- data/test/testing_time_component.rb +29 -0
- metadata +1078 -0
data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb
ADDED
@@ -0,0 +1,1238 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# === Studium::ShowConflictingLvaLectures
|
6
|
+
#
|
7
|
+
# This class can show conflicting dates for Lva-lectures (and exams to
|
8
|
+
# these lectures).
|
9
|
+
#
|
10
|
+
# As argument you can pass in a string in a date format such as 'dd.mm.yyyy',
|
11
|
+
# which is commonly seen in Europe.
|
12
|
+
# =========================================================================== #
|
13
|
+
# require 'studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb'
|
14
|
+
# Studium::ShowConflictingLvaLectures.new(ARGV)
|
15
|
+
# =========================================================================== #
|
16
|
+
require 'studium/base/base.rb'
|
17
|
+
|
18
|
+
module Studium
|
19
|
+
|
20
|
+
class ShowConflictingLvaLectures < Base # === Studium::ShowConflictingLvaLectures
|
21
|
+
|
22
|
+
require 'studium/utility_scripts/holidays/holidays.rb'
|
23
|
+
require 'studium/utility_scripts/preparatory_meetings/preparatory_meetings.rb'
|
24
|
+
|
25
|
+
# ========================================================================= #
|
26
|
+
# === ALPHABET
|
27
|
+
#
|
28
|
+
# Keep a reference to the alphabet.
|
29
|
+
# ========================================================================= #
|
30
|
+
ALPHABET = ('a'..'z').to_a
|
31
|
+
|
32
|
+
# ========================================================================= #
|
33
|
+
# === A
|
34
|
+
#
|
35
|
+
# This special constant denotes a very important date, such as the
|
36
|
+
# '01.10.2018' (first october in the year 2018). Based on this date,
|
37
|
+
# we can also input capital letters into this class, such as "conflict A",
|
38
|
+
# "conflict B", "conflict C" - where conflict is an alias to this class
|
39
|
+
# here. A means this set date, aka '01.10.2018', B then simply refers to
|
40
|
+
# the date after this date listed at A, C then means the date after B
|
41
|
+
# and so on, and so forth.
|
42
|
+
#
|
43
|
+
# The idea behind this is to just quickly input single letters and still
|
44
|
+
# get some meaningful output, without having to type whole years in the
|
45
|
+
# dd.mm.yyyy schemata, as the latter can become fairly tedious.
|
46
|
+
#
|
47
|
+
# Ideally, a monday may be used for A, simply because this is the start
|
48
|
+
# of the week.
|
49
|
+
# ========================================================================= #
|
50
|
+
A = '18.10.2020'
|
51
|
+
|
52
|
+
# ========================================================================= #
|
53
|
+
# === ARRAY_SHORTCUTS_FOR_TOMORROW
|
54
|
+
#
|
55
|
+
# Some string-aliases, stored as array, for "tomorrow".
|
56
|
+
# ========================================================================= #
|
57
|
+
ARRAY_SHORTCUTS_FOR_TOMORROW = %w(
|
58
|
+
morgen
|
59
|
+
tomorrow
|
60
|
+
+1
|
61
|
+
+
|
62
|
+
)
|
63
|
+
|
64
|
+
# ========================================================================= #
|
65
|
+
# === ARRAY_SHORTCUTS_FOR_THE_DAY_AFTER_TOMORROW
|
66
|
+
# ========================================================================= #
|
67
|
+
ARRAY_SHORTCUTS_FOR_THE_DAY_AFTER_TOMORROW = %w(
|
68
|
+
übermorgen
|
69
|
+
+2
|
70
|
+
)
|
71
|
+
|
72
|
+
# ========================================================================= #
|
73
|
+
# === initialize
|
74
|
+
# ========================================================================= #
|
75
|
+
def initialize(
|
76
|
+
use_this_date = DEFAULT_DATE,
|
77
|
+
run_already = true
|
78
|
+
)
|
79
|
+
reset
|
80
|
+
use_this_date = check_for_commandline_arguments(
|
81
|
+
use_this_date
|
82
|
+
)
|
83
|
+
set_use_this_date(
|
84
|
+
use_this_date
|
85
|
+
)
|
86
|
+
run if run_already
|
87
|
+
end
|
88
|
+
|
89
|
+
# ========================================================================= #
|
90
|
+
# === show_help (help tag)
|
91
|
+
#
|
92
|
+
# Invoke this method like so:
|
93
|
+
#
|
94
|
+
# conflict --help
|
95
|
+
#
|
96
|
+
# ========================================================================= #
|
97
|
+
def show_help
|
98
|
+
e
|
99
|
+
e "#{rev}This class can report all study-related lectures on "\
|
100
|
+
"the given (input) date."
|
101
|
+
e
|
102
|
+
e "The date must be in the format dd.mm.yyyy, such as #{sfancy('01.10.2018')}"
|
103
|
+
e
|
104
|
+
e ' conflict <DD.MM.YYYY> # example: conflict 11.10.2018'
|
105
|
+
e
|
106
|
+
e ' conflict --lva-dates-of=301246 # show the lva-dates of lecture id 301246'
|
107
|
+
e ' # ^^^ this is, sort of, a batch-variant'
|
108
|
+
e
|
109
|
+
e " conflict A # show the courses on day #{sfancy(A)}"
|
110
|
+
e ' conflict B # show the courses on day +1 after '+sfancy(A)
|
111
|
+
e ' conflict def # simply repeat the last day '\
|
112
|
+
'that was used before'
|
113
|
+
e
|
114
|
+
e 'Do note that for the last example (conflict def) to work, at the least'
|
115
|
+
e 'one other date has to have been used before.'
|
116
|
+
e
|
117
|
+
e ' --show-raw # show some debug information (rarely needed)'
|
118
|
+
e
|
119
|
+
e 'You can also input a range separated via "-", such as in:'
|
120
|
+
e
|
121
|
+
e ' conflict 11.10.2020-11.11.2020'
|
122
|
+
e
|
123
|
+
e 'This would specify a total of 5 consecutive days.'
|
124
|
+
e
|
125
|
+
end
|
126
|
+
|
127
|
+
# ========================================================================= #
|
128
|
+
# === menu (menu tag)
|
129
|
+
# ========================================================================= #
|
130
|
+
def menu(
|
131
|
+
i = commandline_arguments?
|
132
|
+
)
|
133
|
+
if i.is_a? Array
|
134
|
+
i.each {|entry| menu(entry) }
|
135
|
+
else
|
136
|
+
case i
|
137
|
+
# ===================================================================== #
|
138
|
+
# === conflict 15.01.2019 --show-raw-data
|
139
|
+
# ===================================================================== #
|
140
|
+
when /^-?-?show(-|_)?raw(-|_)?data$/,
|
141
|
+
/^-?-?show(-|_)?raw$/
|
142
|
+
do_show_raw_data
|
143
|
+
# ===================================================================== #
|
144
|
+
# === slectures --help
|
145
|
+
# ===================================================================== #
|
146
|
+
when /help$/
|
147
|
+
show_help
|
148
|
+
exit
|
149
|
+
# ===================================================================== #
|
150
|
+
# === slectures --lva-dates-of=301246
|
151
|
+
#
|
152
|
+
# This entry point allows us to show all LVA-dates of a specific
|
153
|
+
# lecture, by using the lecture-id for this.
|
154
|
+
#
|
155
|
+
# Invocation examples:
|
156
|
+
#
|
157
|
+
# slectures --lvaid=941110
|
158
|
+
#
|
159
|
+
# ===================================================================== #
|
160
|
+
when /^-?-?lva(-|_)?dates(-|_)?of=(.+)$/i,
|
161
|
+
/^-?-?for=(.+)$/i,
|
162
|
+
/^-?-?lvaid=(.+)$/i
|
163
|
+
_ = $1.to_s.dup
|
164
|
+
_ = $3.to_s.dup if $3
|
165
|
+
show_lva_dates_of_this_lecture(_)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# ========================================================================= #
|
171
|
+
# === check_for_commandline_arguments
|
172
|
+
# ========================================================================= #
|
173
|
+
def check_for_commandline_arguments(i)
|
174
|
+
if i.is_a? Array
|
175
|
+
if i.any? {|line| line.start_with?('--') }
|
176
|
+
# =================================================================== #
|
177
|
+
# Ok, the user has provided at the least one -- argument.
|
178
|
+
# =================================================================== #
|
179
|
+
set_commandline_arguments(
|
180
|
+
i.select {|inner_line| inner_line.start_with?('--') }
|
181
|
+
)
|
182
|
+
# =================================================================== #
|
183
|
+
# And reject them, too.
|
184
|
+
# =================================================================== #
|
185
|
+
i.reject! {|inner_line| inner_line.start_with?('--') }
|
186
|
+
end
|
187
|
+
end
|
188
|
+
i # We must return this here.
|
189
|
+
end
|
190
|
+
|
191
|
+
# ========================================================================= #
|
192
|
+
# === do_show_raw_data
|
193
|
+
# ========================================================================= #
|
194
|
+
def do_show_raw_data
|
195
|
+
@show_raw_data = true
|
196
|
+
end
|
197
|
+
|
198
|
+
# ========================================================================= #
|
199
|
+
# === show_raw_data?
|
200
|
+
# ========================================================================= #
|
201
|
+
def show_raw_data?
|
202
|
+
@show_raw_data
|
203
|
+
end; alias show_raw? show_raw_data? # === show_raw?
|
204
|
+
alias debug? show_raw_data? # === debug?
|
205
|
+
|
206
|
+
# ========================================================================= #
|
207
|
+
# === append_onto_the_main_hash
|
208
|
+
# ========================================================================= #
|
209
|
+
def append_onto_the_main_hash(
|
210
|
+
i = @use_these_dates
|
211
|
+
)
|
212
|
+
our_date_of_interest = Time.parse(i)
|
213
|
+
@dataset.each_pair {|name_of_the_lecture, inner_hash|
|
214
|
+
# ===================================================================== #
|
215
|
+
# === Check for exams on that day
|
216
|
+
#
|
217
|
+
# First find relevant exams: We will also register the lva_dates
|
218
|
+
# but check them later.
|
219
|
+
# ===================================================================== #
|
220
|
+
exams = inner_hash['exams']
|
221
|
+
if exams
|
222
|
+
begin
|
223
|
+
# First, check for flawed entries:
|
224
|
+
if exams.is_a?(Array) and exams.first.nil?
|
225
|
+
opne 'A '+steelblue('problem')+' occurred for '+
|
226
|
+
sfancy(name_of_the_lecture)+'.'
|
227
|
+
opne 'There is a faulty exams: entry. Please correct '\
|
228
|
+
'this before we can continue'
|
229
|
+
pp exams
|
230
|
+
exit
|
231
|
+
end
|
232
|
+
array_exams_on = remove_weekday_names_from(
|
233
|
+
exams
|
234
|
+
).map(&:strip)
|
235
|
+
array_exams_on.compact!
|
236
|
+
array_exams_on.map!(&:strip).map {|line|
|
237
|
+
Time.parse(line.delete(','))
|
238
|
+
}
|
239
|
+
rescue ArgumentError => error
|
240
|
+
opnn; e 'We encountered an error for '\
|
241
|
+
'the lecture called `'+
|
242
|
+
royalblue(name_of_the_lecture)+'`:'
|
243
|
+
pp error
|
244
|
+
opnn; e 'Exiting now - please fix this problem.'
|
245
|
+
exit
|
246
|
+
end
|
247
|
+
end
|
248
|
+
# ===================================================================== #
|
249
|
+
# Check for the lva-dates entry next.
|
250
|
+
# ===================================================================== #
|
251
|
+
lva_dates = inner_hash['lva_dates']
|
252
|
+
if lva_dates
|
253
|
+
begin
|
254
|
+
array_lva_dates_on = remove_weekday_names_from(
|
255
|
+
lva_dates
|
256
|
+
).map(&:strip).map {|line| line.delete(',').strip }
|
257
|
+
array_lva_dates_on.map! {|line|
|
258
|
+
Time.parse(line)
|
259
|
+
}
|
260
|
+
rescue ArgumentError => error
|
261
|
+
opnn; e 'Problem with lecture name: '+
|
262
|
+
sfancy(name_of_the_lecture)
|
263
|
+
pp error
|
264
|
+
end
|
265
|
+
end
|
266
|
+
if exams.nil?
|
267
|
+
else
|
268
|
+
if exams
|
269
|
+
# =================================================================== #
|
270
|
+
# Ok, we have found at the least one exam here.
|
271
|
+
# =================================================================== #
|
272
|
+
exams.map! {|line| line.to_s.strip }
|
273
|
+
if exams.first.empty?
|
274
|
+
opnn; e 'Empty exams-entry for '+
|
275
|
+
slateblue(name_of_the_lecture)
|
276
|
+
end
|
277
|
+
# =================================================================== #
|
278
|
+
# Next, we must find out if the exams are on the same date.
|
279
|
+
# This works if we use date-objects via Time.at().to_date.
|
280
|
+
# =================================================================== #
|
281
|
+
if array_exams_on.any? {|time_entry|
|
282
|
+
date1 = time_entry
|
283
|
+
if date1.is_a? String
|
284
|
+
date1 = Time.parse(date1)
|
285
|
+
end
|
286
|
+
if date1.respond_to? :to_date
|
287
|
+
date1 = date1.to_date
|
288
|
+
end
|
289
|
+
date2 = our_date_of_interest.to_date
|
290
|
+
# =============================================================== #
|
291
|
+
# Must convert date1 to start at 00:00:00 too.
|
292
|
+
# =============================================================== #
|
293
|
+
date1 = Time.parse(
|
294
|
+
date1.day.to_s+'.'+date1.month.to_s+'.'+date1.year.to_s
|
295
|
+
).to_date if date1.respond_to? :day
|
296
|
+
date1 === date2
|
297
|
+
}
|
298
|
+
main_hash?[:exams] << name_of_the_lecture
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
302
|
+
# ===================================================================== #
|
303
|
+
# Next check for lva-dates.
|
304
|
+
# ===================================================================== #
|
305
|
+
if lva_dates.nil?
|
306
|
+
else
|
307
|
+
# =================================================================== #
|
308
|
+
# Next, we must find out if the exams are on the same date.
|
309
|
+
# This works if we use date-objects via Time.at().to_date.
|
310
|
+
# =================================================================== #
|
311
|
+
if array_lva_dates_on.any? {|time_entry|
|
312
|
+
date1 = time_entry.to_date
|
313
|
+
date2 = our_date_of_interest.to_date
|
314
|
+
# =============================================================== #
|
315
|
+
# Must convert date1 to start at 00:00:00 too.
|
316
|
+
# =============================================================== #
|
317
|
+
date1 = Time.parse(date1.day.to_s+'.'+date1.month.to_s+'.'+date1.year.to_s).to_date
|
318
|
+
# =============================================================== #
|
319
|
+
# Check whether it is from the past year:
|
320
|
+
# =============================================================== #
|
321
|
+
if date2.year - date1.year > 0
|
322
|
+
register_this_lecture_having_a_wrong_date(
|
323
|
+
name_of_the_lecture.strip, date1
|
324
|
+
)
|
325
|
+
e crimson('There may be a wrong date (year) set '\
|
326
|
+
'for the lecture `')+royalblue(name_of_the_lecture)+
|
327
|
+
crimson('`.')
|
328
|
+
pp date1
|
329
|
+
end
|
330
|
+
date1 === date2
|
331
|
+
}
|
332
|
+
main_hash?[:lva_dates] << name_of_the_lecture
|
333
|
+
end
|
334
|
+
if @show_raw_data
|
335
|
+
opnn; e royalblue('Debug output of the variable called array_lva_dates_on')
|
336
|
+
opnn; e slateblue('For the lecture called ')+lightgreen(name_of_the_lecture)
|
337
|
+
e
|
338
|
+
pp array_lva_dates_on
|
339
|
+
e
|
340
|
+
e 'The inner_hash dataset was:'
|
341
|
+
e
|
342
|
+
pp inner_hash
|
343
|
+
e
|
344
|
+
end
|
345
|
+
end
|
346
|
+
}
|
347
|
+
if @show_raw_data
|
348
|
+
opnn; e royalblue('Debug output:')
|
349
|
+
e
|
350
|
+
pp main_hash?
|
351
|
+
e
|
352
|
+
end
|
353
|
+
report_lectures_having_an_outdated_year
|
354
|
+
end
|
355
|
+
|
356
|
+
# ========================================================================= #
|
357
|
+
# === prepare_dataset_and_then_report_for_this_date
|
358
|
+
# ========================================================================= #
|
359
|
+
def prepare_dataset_and_then_report_for_this_date(
|
360
|
+
this_date
|
361
|
+
)
|
362
|
+
reset_internal_dataset
|
363
|
+
filter_the_main_dataset
|
364
|
+
append_onto_the_main_hash(
|
365
|
+
this_date
|
366
|
+
)
|
367
|
+
report(
|
368
|
+
this_date
|
369
|
+
)
|
370
|
+
store_this_date_into_a_local_file
|
371
|
+
end
|
372
|
+
|
373
|
+
# ========================================================================= #
|
374
|
+
# === report (report tag)
|
375
|
+
# ========================================================================= #
|
376
|
+
def report(
|
377
|
+
i = main_day?
|
378
|
+
)
|
379
|
+
e # An initial newline to make this prettier.
|
380
|
+
opnn { :no_colon }
|
381
|
+
header_string = (" [Heutiger Tag: #{return_weekday}, #{dd_mm_yyyy}]").
|
382
|
+
rjust(50)
|
383
|
+
if use_unicode_symbols? and Object.const_defined? :Roebe
|
384
|
+
lindex = header_string.index('[')
|
385
|
+
header_string[lindex, 0] = '|'
|
386
|
+
splitted = header_string.split('|')
|
387
|
+
splitted[0] = crimson(splitted[0]+Roebe.shamrock) # Add a shamrock-unicode icon.
|
388
|
+
splitted[1] = lightseagreen(splitted[1])+
|
389
|
+
crimson(Roebe.shamrock) # Add the clear-sun weather icon.
|
390
|
+
header_string = lightseagreen(splitted.join)
|
391
|
+
|
392
|
+
else
|
393
|
+
header_string = lightseagreen(header_string)
|
394
|
+
end
|
395
|
+
ee header_string
|
396
|
+
e
|
397
|
+
e
|
398
|
+
if Studium.is_this_day_a_holiday?(i)
|
399
|
+
opnn; e "Note that the day #{sfancy(i)} is a holiday."
|
400
|
+
e
|
401
|
+
end
|
402
|
+
# ======================================================================= #
|
403
|
+
# First, look if there are any "vorbesprechungen", aka
|
404
|
+
# "preliminary meetings". If so, we will show these first.
|
405
|
+
# ======================================================================= #
|
406
|
+
if Studium.is_a_vorbesprechungs_day?(i)
|
407
|
+
do_report_all_preliminary_meetings_on_that_day(i)
|
408
|
+
end
|
409
|
+
# ======================================================================= #
|
410
|
+
# === Report upcoming exams next
|
411
|
+
#
|
412
|
+
# Next, report the exams. The lva-dates will be reported lateron.
|
413
|
+
# ======================================================================= #
|
414
|
+
do_report_the_upcoming_exams(i)
|
415
|
+
lva_dates_on_that_day = main_hash?[:lva_dates]
|
416
|
+
sorted_lectures_on_that_day = []
|
417
|
+
main_day = i
|
418
|
+
unless lva_dates_on_that_day.empty?
|
419
|
+
# ===================================================================== #
|
420
|
+
# === "The following lectures occur on"
|
421
|
+
# ===================================================================== #
|
422
|
+
result = 'The following '.dup
|
423
|
+
if use_unicode_symbols? and Object.const_defined? :Roebe
|
424
|
+
result << lightgreen(Roebe.white_sun_with_rays)+' '
|
425
|
+
end
|
426
|
+
result << colour_for_lectures('lectures')+
|
427
|
+
' occur on '+orange(main_day)+
|
428
|
+
' ('+colourize_weekday(translate_dd_mm_yyy_to_weekday(main_day))+
|
429
|
+
')'+
|
430
|
+
darkslategray(':')
|
431
|
+
e result
|
432
|
+
# ===================================================================== #
|
433
|
+
# Iterate over our lectures next:
|
434
|
+
# ===================================================================== #
|
435
|
+
lva_dates_on_that_day.each {|name_of_the_lecture|
|
436
|
+
pointer = main_dataset?[name_of_the_lecture]
|
437
|
+
selection = pointer['lva_dates'].select {|line|
|
438
|
+
line.include? i
|
439
|
+
}
|
440
|
+
if selection
|
441
|
+
_ = selection.first
|
442
|
+
_.strip! if _
|
443
|
+
# ================================================================= #
|
444
|
+
# The _ variable is now something like this: "16.04.2018, 18:00-19:30"
|
445
|
+
# ================================================================= #
|
446
|
+
_.delete!(',')
|
447
|
+
_.squeeze!(' ')
|
448
|
+
if _.include? '-'
|
449
|
+
_ = _.split('-').first+':00'
|
450
|
+
end
|
451
|
+
begin
|
452
|
+
sorted_lectures_on_that_day << [
|
453
|
+
name_of_the_lecture, Time.parse(_)
|
454
|
+
]
|
455
|
+
rescue Exception => error
|
456
|
+
e 'A problem occurred.'
|
457
|
+
pp error
|
458
|
+
pp name_of_the_lecture
|
459
|
+
pp _
|
460
|
+
exit
|
461
|
+
end
|
462
|
+
end
|
463
|
+
}
|
464
|
+
sorted_lectures_on_that_day = sorted_lectures_on_that_day.sort_by {|a,b|
|
465
|
+
b
|
466
|
+
}
|
467
|
+
# ===================================================================== #
|
468
|
+
# === The lectures on that day
|
469
|
+
#
|
470
|
+
# Finally, we will display the lectures that happen on that day.
|
471
|
+
# ===================================================================== #
|
472
|
+
display_these_lectures_on_that_day(
|
473
|
+
sorted_lectures_on_that_day
|
474
|
+
)
|
475
|
+
else
|
476
|
+
e "No lectures were found on the day #{orange(main_day)}"\
|
477
|
+
" (#{sfancy(return_weekday_for(main_day))})."
|
478
|
+
end
|
479
|
+
e
|
480
|
+
end
|
481
|
+
|
482
|
+
# ========================================================================= #
|
483
|
+
# === reset (reset tag)
|
484
|
+
# ========================================================================= #
|
485
|
+
def reset
|
486
|
+
super()
|
487
|
+
reset_internal_dataset
|
488
|
+
infer_the_namespace
|
489
|
+
# ======================================================================= #
|
490
|
+
# === :commandline_arguments
|
491
|
+
# ======================================================================= #
|
492
|
+
reset_the_commandline_arguments
|
493
|
+
# ======================================================================= #
|
494
|
+
# === @store_into_this_file
|
495
|
+
# ======================================================================= #
|
496
|
+
@store_into_this_file =
|
497
|
+
"#{log_dir?}last_date_for_conflicting_lva_lectures.md"
|
498
|
+
# ======================================================================= #
|
499
|
+
# === @show_raw_data
|
500
|
+
#
|
501
|
+
# The next instance variable determines whether we will show some
|
502
|
+
# additional debug information or not. By default we will not do
|
503
|
+
# so, hence why it is set to false.
|
504
|
+
# ======================================================================= #
|
505
|
+
@show_raw_data = false
|
506
|
+
# ======================================================================= #
|
507
|
+
# === @reported_n_lectures_having_a_wrong_date
|
508
|
+
# ======================================================================= #
|
509
|
+
@reported_n_lectures_having_a_wrong_date = 0
|
510
|
+
end
|
511
|
+
|
512
|
+
# ========================================================================= #
|
513
|
+
# === reset_internal_dataset
|
514
|
+
#
|
515
|
+
# Put variables into this method here only if you really wish to
|
516
|
+
# reset them. Commandline arguments should normally NOT be reset
|
517
|
+
# in this method.
|
518
|
+
# ========================================================================= #
|
519
|
+
def reset_internal_dataset
|
520
|
+
# ======================================================================= #
|
521
|
+
# The @main_hash will store :exams and :lectures as separate entities.
|
522
|
+
# ======================================================================= #
|
523
|
+
@main_hash = {}
|
524
|
+
@main_hash[:exams] = []
|
525
|
+
@main_hash[:lva_dates] = []
|
526
|
+
# ======================================================================= #
|
527
|
+
# === @array_we_have_registered_for_these_exams_on_that_day
|
528
|
+
# ======================================================================= #
|
529
|
+
@array_we_have_registered_for_these_exams_on_that_day = []
|
530
|
+
# ======================================================================= #
|
531
|
+
# === @original_dataset
|
532
|
+
# ======================================================================= #
|
533
|
+
@original_dataset = return_dataset_from_file_lecture_information
|
534
|
+
# ======================================================================= #
|
535
|
+
# === @dataset
|
536
|
+
# ======================================================================= #
|
537
|
+
@dataset = @original_dataset.dup
|
538
|
+
# ======================================================================= #
|
539
|
+
# === @n_ljust
|
540
|
+
# ======================================================================= #
|
541
|
+
@n_ljust = 78
|
542
|
+
# ======================================================================= #
|
543
|
+
# === @left_pad
|
544
|
+
# ======================================================================= #
|
545
|
+
@left_pad = ' ' # This one is displayed when showing indices in this class.
|
546
|
+
# ======================================================================= #
|
547
|
+
# === @hash_these_lectures_have_a_wrong_date
|
548
|
+
# ======================================================================= #
|
549
|
+
@hash_these_lectures_have_a_wrong_date = {}
|
550
|
+
end
|
551
|
+
|
552
|
+
# ========================================================================= #
|
553
|
+
# === dataset?
|
554
|
+
# ========================================================================= #
|
555
|
+
def dataset?
|
556
|
+
@dataset
|
557
|
+
end; alias main_dataset? dataset? # === main_dataset?
|
558
|
+
|
559
|
+
# ========================================================================= #
|
560
|
+
# === main_hash?
|
561
|
+
# ========================================================================= #
|
562
|
+
def main_hash?
|
563
|
+
@main_hash
|
564
|
+
end
|
565
|
+
|
566
|
+
# ========================================================================= #
|
567
|
+
# === input_given?
|
568
|
+
#
|
569
|
+
# This will return the first date.
|
570
|
+
# ========================================================================= #
|
571
|
+
def input_given?
|
572
|
+
@use_these_dates.first
|
573
|
+
end
|
574
|
+
|
575
|
+
# ========================================================================= #
|
576
|
+
# === filter_the_main_dataset
|
577
|
+
# ========================================================================= #
|
578
|
+
def filter_the_main_dataset
|
579
|
+
@dataset.reject! {|name_of_the_lecture, inner_hash|
|
580
|
+
inner_hash.has_key?(:already_solved) and
|
581
|
+
inner_hash[:already_solved] == true
|
582
|
+
}
|
583
|
+
@dataset.select! {|name_of_the_lecture, inner_hash|
|
584
|
+
inner_hash.has_key?('lva_dates') or
|
585
|
+
inner_hash.has_key?('exams')
|
586
|
+
}
|
587
|
+
end
|
588
|
+
|
589
|
+
# ========================================================================= #
|
590
|
+
# === append_university
|
591
|
+
#
|
592
|
+
# This will properly format and colourize the "university-string", before
|
593
|
+
# returning it. It is to be used to append it to the displayed string.
|
594
|
+
# ========================================================================= #
|
595
|
+
def append_university(i)
|
596
|
+
# Still have to modify these two:
|
597
|
+
# VetMed
|
598
|
+
case i
|
599
|
+
when 'TU Vienna'
|
600
|
+
i = 'TU'
|
601
|
+
when 'Uni Wien'
|
602
|
+
i = 'UniWien'
|
603
|
+
end
|
604
|
+
i = " #{i.center(8)}"
|
605
|
+
return dodgerblue(i) # Or deepskyblue
|
606
|
+
end
|
607
|
+
|
608
|
+
# ========================================================================= #
|
609
|
+
# === properly_colourize_this_lecture_type
|
610
|
+
#
|
611
|
+
# Lecture types such as SE, UE and so forth, will be displayed in a
|
612
|
+
# slightly brighter colour, to denote that they are more important
|
613
|
+
# than other lecture-types such as VO.
|
614
|
+
# ========================================================================= #
|
615
|
+
def properly_colourize_this_lecture_type(lecture_type)
|
616
|
+
_ = ' ['+lecture_type+'] '
|
617
|
+
if is_prüfungsimmanent?(lecture_type)
|
618
|
+
darkturquoise(_)
|
619
|
+
else
|
620
|
+
steelblue(_)
|
621
|
+
end
|
622
|
+
end
|
623
|
+
|
624
|
+
# ========================================================================= #
|
625
|
+
# === colourize_weekday
|
626
|
+
# ========================================================================= #
|
627
|
+
def colourize_weekday(i)
|
628
|
+
limegreen(i)
|
629
|
+
end
|
630
|
+
|
631
|
+
# ========================================================================= #
|
632
|
+
# === use_this_date?
|
633
|
+
# ========================================================================= #
|
634
|
+
def use_these_dates?
|
635
|
+
@use_these_dates
|
636
|
+
end; alias main_day? use_these_dates? # === main_day?
|
637
|
+
alias interesting_day? use_these_dates? # === interesting_day?
|
638
|
+
alias use_this_date? use_these_dates? # === use_this_date?
|
639
|
+
alias use_which_date? use_these_dates? # === use_which_date?
|
640
|
+
|
641
|
+
# ========================================================================= #
|
642
|
+
# === return_dataset_of_this_lecture
|
643
|
+
# ========================================================================= #
|
644
|
+
def return_dataset_of_this_lecture(i)
|
645
|
+
@dataset[i]
|
646
|
+
end
|
647
|
+
|
648
|
+
# ========================================================================= #
|
649
|
+
# === colour_for_index_strings
|
650
|
+
# ========================================================================= #
|
651
|
+
def colour_for_index_strings(i)
|
652
|
+
powderblue(i)
|
653
|
+
end
|
654
|
+
|
655
|
+
# ========================================================================= #
|
656
|
+
# === colour_for_preliminary_meetings
|
657
|
+
# ========================================================================= #
|
658
|
+
def colour_for_preliminary_meetings(i)
|
659
|
+
rosybrown(i)
|
660
|
+
end
|
661
|
+
|
662
|
+
# ========================================================================= #
|
663
|
+
# === colour_for_exams
|
664
|
+
# ========================================================================= #
|
665
|
+
def colour_for_exams(
|
666
|
+
i,
|
667
|
+
optional_priority = nil,
|
668
|
+
optional_registered_for_that_exam = false
|
669
|
+
)
|
670
|
+
if optional_registered_for_that_exam
|
671
|
+
orangered(i)+
|
672
|
+
orangered(" #{left_arrow} [Registered for this exam]")
|
673
|
+
else
|
674
|
+
case optional_priority
|
675
|
+
when 1
|
676
|
+
crimson(i)+
|
677
|
+
crimson(" #{left_arrow} [High Priority Exam]")
|
678
|
+
else
|
679
|
+
springgreen(i)
|
680
|
+
end
|
681
|
+
end
|
682
|
+
end
|
683
|
+
|
684
|
+
# ========================================================================= #
|
685
|
+
# === colour_for_lectures
|
686
|
+
# ========================================================================= #
|
687
|
+
def colour_for_lectures(i)
|
688
|
+
turquoise(i)
|
689
|
+
end; alias colour_for_vorbesprechungs_termin colour_for_lectures # === colour_for_vorbesprechungs_termin
|
690
|
+
|
691
|
+
# ========================================================================= #
|
692
|
+
# === display_these_exams_on_that_day
|
693
|
+
#
|
694
|
+
# This is the method that will report which exams will happen during
|
695
|
+
# the given input-day.
|
696
|
+
# ========================================================================= #
|
697
|
+
def display_these_exams_on_that_day(i)
|
698
|
+
index = 0
|
699
|
+
e
|
700
|
+
i.each {|name_of_the_lecture, date_of_the_lecture| index += 1
|
701
|
+
_ = date_of_the_lecture
|
702
|
+
padded_index = "#{index})".rjust(3)
|
703
|
+
colourized_and_padded_index = powderblue(padded_index)
|
704
|
+
priority = return_dataset_of_this_lecture(name_of_the_lecture)[:priority]
|
705
|
+
which_university = return_dataset_of_this_lecture(name_of_the_lecture)[:university].to_s
|
706
|
+
registered_for_an_upcoming_exam_at = @dataset[name_of_the_lecture]['registered']
|
707
|
+
if registered_for_an_upcoming_exam_at
|
708
|
+
if registered_for_an_upcoming_exam_at.is_a? Array
|
709
|
+
# ================================================================= #
|
710
|
+
# Note that the array above may have some additional ' '
|
711
|
+
# characters, so we apply .squeeze() on it.
|
712
|
+
#
|
713
|
+
# An example for this is:
|
714
|
+
#
|
715
|
+
# "Dienstag 12.06.2018, 14:00-16:00, Ort: Foobar"
|
716
|
+
# ================================================================= #
|
717
|
+
registered_for_an_upcoming_exam_at.map! {|entry| entry.squeeze(' ') }
|
718
|
+
registered_for_an_upcoming_exam_at = registered_for_an_upcoming_exam_at.first
|
719
|
+
end
|
720
|
+
registered_for_an_upcoming_exam_at = remove_leading_weeknames(
|
721
|
+
registered_for_an_upcoming_exam_at
|
722
|
+
)
|
723
|
+
end
|
724
|
+
case which_university
|
725
|
+
when 'TU Vienna'
|
726
|
+
which_university = 'TU Wien'
|
727
|
+
end
|
728
|
+
padded_which_university = " #{which_university}".center(10)
|
729
|
+
colourized_and_padded_which_university = plum('['+padded_which_university+'] ')
|
730
|
+
# ===================================================================== #
|
731
|
+
# In the event that priority is 1, we will use slightly different
|
732
|
+
# colours - aka red.
|
733
|
+
# ===================================================================== #
|
734
|
+
are_we_registered_for_that_exam = false
|
735
|
+
if registered_for_an_upcoming_exam_at # to prevent nil-entries
|
736
|
+
# =================================================================== #
|
737
|
+
# The line may be like this:
|
738
|
+
# "18.06.2018, 14:00-16:00, Ort: Hörsaal 2 UZA 1 Biozentrum 2.249 1.OG"
|
739
|
+
# =================================================================== #
|
740
|
+
splitted = registered_for_an_upcoming_exam_at.split(',')
|
741
|
+
first = splitted.first
|
742
|
+
if first == input_given?
|
743
|
+
are_we_registered_for_that_exam = true
|
744
|
+
end
|
745
|
+
end
|
746
|
+
return_colourized_entry_for_an_upcoming_exam = colour_for_exams(
|
747
|
+
'['+return_dd_mm_yy_and_time_from(date_of_the_lecture).to_s.rjust(19,'0')+']',
|
748
|
+
priority,
|
749
|
+
are_we_registered_for_that_exam
|
750
|
+
)
|
751
|
+
padded_name_of_the_lecture = name_of_the_lecture.ljust(@n_ljust)
|
752
|
+
# ===================================================================== #
|
753
|
+
# If we are registered for that particular exam then we
|
754
|
+
# will use a slightly brighter colour.
|
755
|
+
# ===================================================================== #
|
756
|
+
if are_we_registered_for_that_exam
|
757
|
+
@array_we_have_registered_for_these_exams_on_that_day << [
|
758
|
+
name_of_the_lecture, date_of_the_lecture
|
759
|
+
]
|
760
|
+
colourized_and_padded_name_of_the_lecture =
|
761
|
+
cadetblue(padded_name_of_the_lecture)
|
762
|
+
else
|
763
|
+
colourized_and_padded_name_of_the_lecture =
|
764
|
+
cornflowerblue(padded_name_of_the_lecture)
|
765
|
+
end
|
766
|
+
# ===================================================================== #
|
767
|
+
# And finally, report which exams will happen on that day next,
|
768
|
+
# on the commandline.
|
769
|
+
# ===================================================================== #
|
770
|
+
e @left_pad+
|
771
|
+
colourized_and_padded_index+ # The index such as ' 1)'
|
772
|
+
' '+
|
773
|
+
colourized_and_padded_name_of_the_lecture+ # The name of the lecture.
|
774
|
+
colourized_and_padded_which_university+
|
775
|
+
return_colourized_entry_for_an_upcoming_exam
|
776
|
+
}
|
777
|
+
e
|
778
|
+
end
|
779
|
+
|
780
|
+
# ========================================================================= #
|
781
|
+
# === this_exam_happens_on_that_day?
|
782
|
+
# ========================================================================= #
|
783
|
+
def this_exam_happens_on_that_day?(i)
|
784
|
+
result = false
|
785
|
+
unless @array_we_have_registered_for_these_exams_on_that_day.empty?
|
786
|
+
@array_we_have_registered_for_these_exams_on_that_day.each {|a, b|
|
787
|
+
result = true if a.include? i
|
788
|
+
}
|
789
|
+
end
|
790
|
+
result
|
791
|
+
end
|
792
|
+
|
793
|
+
# ========================================================================= #
|
794
|
+
# === store_this_date_into_a_local_file
|
795
|
+
#
|
796
|
+
# This method will store the date used, aka the dd.mm.yyyy format,
|
797
|
+
# into a local file.
|
798
|
+
# ========================================================================= #
|
799
|
+
def store_this_date_into_a_local_file
|
800
|
+
what = use_which_date?
|
801
|
+
what = what.first if what.is_a? Array
|
802
|
+
into = @store_into_this_file
|
803
|
+
write_what_into(what, into)
|
804
|
+
end
|
805
|
+
|
806
|
+
# ========================================================================= #
|
807
|
+
# === register_this_lecture_having_a_wrong_date
|
808
|
+
# ========================================================================= #
|
809
|
+
def register_this_lecture_having_a_wrong_date(
|
810
|
+
name_of_the_lecture, date
|
811
|
+
)
|
812
|
+
# ======================================================================= #
|
813
|
+
# We will only register the first incorrect lecture; the others will
|
814
|
+
# be ignored. This way the user can fix the flawed dataset.
|
815
|
+
# ======================================================================= #
|
816
|
+
unless @hash_these_lectures_have_a_wrong_date.has_key? name_of_the_lecture.strip
|
817
|
+
@hash_these_lectures_have_a_wrong_date[name_of_the_lecture.strip] = date
|
818
|
+
end
|
819
|
+
end
|
820
|
+
|
821
|
+
# ========================================================================= #
|
822
|
+
# === show_lva_dates_of_this_lecture
|
823
|
+
#
|
824
|
+
# This method will report all LVA-dates of the given lecture at hand.
|
825
|
+
# ========================================================================= #
|
826
|
+
def show_lva_dates_of_this_lecture(i)
|
827
|
+
entries = @dataset.select {|name_of_the_lecture, inner_dataset|
|
828
|
+
name_of_the_lecture.include? i
|
829
|
+
}
|
830
|
+
if entries.size > 1
|
831
|
+
e 'More than one entry. Need to decide what to do with that.'
|
832
|
+
e 'Proposing to just return the first entry. Acceptable? '\
|
833
|
+
'Consider later (July 2018)'
|
834
|
+
else
|
835
|
+
name = entries.keys.first
|
836
|
+
e 'Showing all lva-dates of the lecture `'+royalblue(name)+'` next:'
|
837
|
+
hash = entries[name]
|
838
|
+
lva_dates = hash['lva_dates']
|
839
|
+
if lva_dates
|
840
|
+
lva_dates.each {|lva_date|
|
841
|
+
lva_date = remove_weekday_name(lva_date).strip
|
842
|
+
lva_date = extract_dd_mm_yyyy(lva_date)
|
843
|
+
prepare_dataset_and_then_report_for_this_date(lva_date)
|
844
|
+
}
|
845
|
+
else
|
846
|
+
e 'No lva_dates: entry appears to be '\
|
847
|
+
'registered for `'+royalblue(name)+'`.'
|
848
|
+
end
|
849
|
+
end
|
850
|
+
exit
|
851
|
+
end
|
852
|
+
|
853
|
+
# ========================================================================= #
|
854
|
+
# === display_these_lectures_on_that_day
|
855
|
+
#
|
856
|
+
# This method will display the lectures on that given day, along
|
857
|
+
# with some additional information to make it easier to read what
|
858
|
+
# is all happening on that day.
|
859
|
+
# ========================================================================= #
|
860
|
+
def display_these_lectures_on_that_day(i)
|
861
|
+
index = 0
|
862
|
+
# ======================================================================= #
|
863
|
+
# Obtain a reference to the main dataset next:
|
864
|
+
# ======================================================================= #
|
865
|
+
main_dataset = main_dataset?
|
866
|
+
# ======================================================================= #
|
867
|
+
# Merge in all exams that occur on that day:
|
868
|
+
# ======================================================================= #
|
869
|
+
unless @array_we_have_registered_for_these_exams_on_that_day.empty?
|
870
|
+
@array_we_have_registered_for_these_exams_on_that_day.each {|element|
|
871
|
+
# =================================================================== #
|
872
|
+
# We have to re-set the time counter for these elements, as they
|
873
|
+
# may have the wrong timezone-offset, which would mess up our
|
874
|
+
# sorting done at a later point.
|
875
|
+
# =================================================================== #
|
876
|
+
second_element = Studium.normalize_time(
|
877
|
+
element.last
|
878
|
+
)
|
879
|
+
element[-1] = second_element
|
880
|
+
# =================================================================== #
|
881
|
+
# We will add that element onto the dataset, aka i - but before
|
882
|
+
# we do so, we have to remove the old element from our dataset.
|
883
|
+
# =================================================================== #
|
884
|
+
i.reject! {|array|
|
885
|
+
name = array.first
|
886
|
+
first_entry = element.first
|
887
|
+
name == first_entry
|
888
|
+
}
|
889
|
+
i << element
|
890
|
+
}
|
891
|
+
end
|
892
|
+
sorted_by_date = i.sort_by {|name_of_the_lecture, time_entry|
|
893
|
+
Time.parse(time_entry.to_s)
|
894
|
+
}
|
895
|
+
e; sorted_by_date.each {|name_of_the_lecture, date_of_the_lecture| index += 1
|
896
|
+
_ = date_of_the_lecture
|
897
|
+
# Pad the index a bit:
|
898
|
+
padded_index = ("#{index})").rjust(3)
|
899
|
+
if this_exam_happens_on_that_day?(name_of_the_lecture)
|
900
|
+
colourized_and_padded_index = colourize_via_orangered(padded_index)
|
901
|
+
else
|
902
|
+
colourized_and_padded_index = colour_for_index_strings(padded_index)
|
903
|
+
end
|
904
|
+
priority = main_dataset[name_of_the_lecture][:priority]
|
905
|
+
lecture_type = main_dataset[name_of_the_lecture][:type] # Can be "VO" or "VO+SE" and so forth.
|
906
|
+
name_of_the_university = main_dataset[name_of_the_lecture][:university]
|
907
|
+
do_we_participate = main_dataset[name_of_the_lecture][:currently_participating_in_this_course]
|
908
|
+
# ===================================================================== #
|
909
|
+
# We will store everything in the String referenced via the variabled
|
910
|
+
# called "result".
|
911
|
+
# ===================================================================== #
|
912
|
+
result = @left_pad+colourized_and_padded_index # First show the index
|
913
|
+
if do_we_participate
|
914
|
+
result[1,1] = mediumseagreen('✓') # This icon denotes that we currently participate in this course.
|
915
|
+
end
|
916
|
+
result << properly_colourize_this_lecture_type(lecture_type) # Next the lecture-type such as "VO" or "SE" etc.
|
917
|
+
padding_to_use = @n_ljust
|
918
|
+
if lecture_type.size > 2
|
919
|
+
# =================================================================== #
|
920
|
+
# In this case, use a slightly shorter padding.
|
921
|
+
# =================================================================== #
|
922
|
+
padding_to_use -= (lecture_type.size - 2)
|
923
|
+
end
|
924
|
+
# ===================================================================== #
|
925
|
+
# Make too long names shorter (truncate):
|
926
|
+
# ===================================================================== #
|
927
|
+
chop_off_at_this_offset = @n_ljust - 4
|
928
|
+
if name_of_the_lecture.size > chop_off_at_this_offset
|
929
|
+
name_of_the_lecture = name_of_the_lecture[0 .. (chop_off_at_this_offset - 6)]+' [...]'
|
930
|
+
end
|
931
|
+
padded_name_of_the_lecture = name_of_the_lecture.ljust(padding_to_use)
|
932
|
+
# ===================================================================== #
|
933
|
+
# The normal colour for lectures here is slateblue; but if the
|
934
|
+
# lecture is of high priority, aka priority 1, then a slightly
|
935
|
+
# brighter colour will be used, to also visually denote that
|
936
|
+
# this lecture is more important.
|
937
|
+
# ===================================================================== #
|
938
|
+
if this_exam_happens_on_that_day?(name_of_the_lecture)
|
939
|
+
# =================================================================== #
|
940
|
+
# In this case we will also pad anew:
|
941
|
+
# =================================================================== #
|
942
|
+
result << orangered(
|
943
|
+
(
|
944
|
+
"#{name_of_the_lecture} #{left_arrow} #{return_people_cheering_for_an_exam}"
|
945
|
+
).ljust(padding_to_use)
|
946
|
+
)
|
947
|
+
else
|
948
|
+
case priority
|
949
|
+
when 1
|
950
|
+
result << mediumpurple(padded_name_of_the_lecture) # Now the name of the lecture.
|
951
|
+
else
|
952
|
+
result << slateblue(padded_name_of_the_lecture) # Now the name of the lecture.
|
953
|
+
end
|
954
|
+
end
|
955
|
+
result << colour_for_lectures(
|
956
|
+
'['+return_dd_mm_yy_and_time_from(date_of_the_lecture).to_s.rjust(19,'0')+']'
|
957
|
+
)
|
958
|
+
# ===================================================================== #
|
959
|
+
# Find out whether this exame happens on the day:
|
960
|
+
# ===================================================================== #
|
961
|
+
if this_exam_happens_on_that_day?(name_of_the_lecture)
|
962
|
+
# =================================================================== #
|
963
|
+
# Registered exams will appear in another colour:
|
964
|
+
# =================================================================== #
|
965
|
+
result << skyblue(' [')+return_colourized_people_cheering_for_an_exam+skyblue(']')
|
966
|
+
elsif priority.to_i == 1
|
967
|
+
result << skyblue(' [')+orange('Priorität: '+priority.to_s)+skyblue(']')
|
968
|
+
else
|
969
|
+
result << skyblue(" [Priorität: #{priority}]")
|
970
|
+
end
|
971
|
+
# ===================================================================== #
|
972
|
+
# Next, append the university.
|
973
|
+
# ===================================================================== #
|
974
|
+
result << append_university(name_of_the_university)
|
975
|
+
e result
|
976
|
+
}
|
977
|
+
e
|
978
|
+
end
|
979
|
+
|
980
|
+
# ========================================================================= #
|
981
|
+
# === return_people_cheering_for_an_exam
|
982
|
+
# ========================================================================= #
|
983
|
+
def return_people_cheering_for_an_exam
|
984
|
+
'\\o/ EXAM \\o/'
|
985
|
+
end
|
986
|
+
|
987
|
+
# ========================================================================= #
|
988
|
+
# === return_colourized_people_cheering_for_an_exam
|
989
|
+
# ========================================================================= #
|
990
|
+
def return_colourized_people_cheering_for_an_exam
|
991
|
+
colourized_orangered(
|
992
|
+
return_people_cheering_for_an_exam
|
993
|
+
)
|
994
|
+
end
|
995
|
+
|
996
|
+
# ========================================================================= #
|
997
|
+
# === colourized_orangered
|
998
|
+
# ========================================================================= #
|
999
|
+
def colourized_orangered(i)
|
1000
|
+
orangered(i)
|
1001
|
+
end; alias colourize_via_orangered colourized_orangered # === colourize_via_orangered
|
1002
|
+
|
1003
|
+
# ========================================================================= #
|
1004
|
+
# === set_use_this_date (set tag)
|
1005
|
+
#
|
1006
|
+
# This will set the date that we are interested in. If the input is an
|
1007
|
+
# Array then we will work on a String. In general, the String should
|
1008
|
+
# be in the format dd.mm.yyyy such as '25.02.2018'.
|
1009
|
+
# ========================================================================= #
|
1010
|
+
def set_use_this_date(
|
1011
|
+
i = nil
|
1012
|
+
)
|
1013
|
+
i = DEFAULT_DATE if i.nil?
|
1014
|
+
# ======================================================================= #
|
1015
|
+
# === Handle Arrays next
|
1016
|
+
# ======================================================================= #
|
1017
|
+
if i.is_a?(Array)
|
1018
|
+
# ===================================================================== #
|
1019
|
+
# First, we will reject all entries that are a weekday, such as
|
1020
|
+
# "Freitag". The reason for this behaviour is because we can also
|
1021
|
+
# invoke this class here via e. g.:
|
1022
|
+
#
|
1023
|
+
# conflict Freitag 25.10.2019
|
1024
|
+
#
|
1025
|
+
# But we don't care about the weekday name here; the dd.mm.yyyy format
|
1026
|
+
# is sufficient. So, let's modify the array.
|
1027
|
+
# ===================================================================== #
|
1028
|
+
i.reject! {|entry| weekdays?.include?(entry.capitalize) }
|
1029
|
+
first = i.first
|
1030
|
+
if i.empty?
|
1031
|
+
i = return_dd_mm_yyyy
|
1032
|
+
elsif first.is_a?(String) and first.include?('-') and (first =~ /\d+/)
|
1033
|
+
require 'studium/utility_scripts/expand_time_range.rb'
|
1034
|
+
i = Studium.expand_these_lectures(i)
|
1035
|
+
elsif first !~ /\d+/ # If it does not have a number but is not empty.
|
1036
|
+
case first
|
1037
|
+
# =================================================================== #
|
1038
|
+
# === default
|
1039
|
+
# =================================================================== #
|
1040
|
+
when 'default','def'
|
1041
|
+
if File.exist? @store_into_this_file
|
1042
|
+
opnn; e 'Reading from the file'
|
1043
|
+
opnn; e " `#{sfile(@store_into_this_file)}`."
|
1044
|
+
i = File.read(@store_into_this_file).strip
|
1045
|
+
else
|
1046
|
+
opnn
|
1047
|
+
e 'No entry could be found at non-existing '\
|
1048
|
+
'file `'+sfile(@store_into_this_file)+'`.'
|
1049
|
+
end
|
1050
|
+
when *ALPHABET.map(&:upcase)
|
1051
|
+
i = A # ← i will now be e. g. 01.10.2018
|
1052
|
+
# ================================================================= #
|
1053
|
+
# Next, we add the difference to this string.
|
1054
|
+
# ================================================================= #
|
1055
|
+
n_difference = ALPHABET.index(first.downcase)
|
1056
|
+
i = Time.parse(i) + ONE_DAY * n_difference
|
1057
|
+
i = dd_mm_yyyy(i)
|
1058
|
+
end
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
if i.is_a?(Array) and i.size == 1
|
1062
|
+
i = i.first
|
1063
|
+
end
|
1064
|
+
case i # case tag
|
1065
|
+
when *ARRAY_SHORTCUTS_FOR_THE_DAY_AFTER_TOMORROW
|
1066
|
+
i = Time.now + ONE_DAY + ONE_DAY
|
1067
|
+
i = return_dd_mm_yyyy(i)
|
1068
|
+
when *ARRAY_SHORTCUTS_FOR_TOMORROW
|
1069
|
+
i = Time.now + ONE_DAY
|
1070
|
+
i = return_dd_mm_yyyy(i)
|
1071
|
+
end
|
1072
|
+
# ======================================================================= #
|
1073
|
+
# We require an Array past this point:
|
1074
|
+
# ======================================================================= #
|
1075
|
+
i = [i].compact unless i.is_a? Array
|
1076
|
+
i.flatten!
|
1077
|
+
i.map! {|line|
|
1078
|
+
line = remove_leading_weekdays(line)
|
1079
|
+
case line
|
1080
|
+
when *ARRAY_SHORTCUTS_FOR_TOMORROW
|
1081
|
+
line = Time.now + ONE_DAY # ← Add one day.
|
1082
|
+
line = return_dd_mm_yyyy(line)
|
1083
|
+
when 'today','heute'
|
1084
|
+
line = return_dd_mm_yyyy(Time.now)
|
1085
|
+
end
|
1086
|
+
if line.end_with? ','
|
1087
|
+
line = line.dup if line.frozen?
|
1088
|
+
line.chop!
|
1089
|
+
end
|
1090
|
+
# ===================================================================== #
|
1091
|
+
# Check for a proper date, which is in the format dd.mm.yyyy.
|
1092
|
+
# ===================================================================== #
|
1093
|
+
if line =~ /^\d{1,2}\.\d{1,2}\.\d{4}$/
|
1094
|
+
else
|
1095
|
+
if line.count('.') == 1
|
1096
|
+
line = line.dup if line.frozen?
|
1097
|
+
line << '.'+current_year?
|
1098
|
+
end
|
1099
|
+
end
|
1100
|
+
line
|
1101
|
+
}
|
1102
|
+
@use_these_dates = i
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
# ========================================================================= #
|
1106
|
+
# === report_lectures_having_an_outdated_year
|
1107
|
+
# ========================================================================= #
|
1108
|
+
def report_lectures_having_an_outdated_year
|
1109
|
+
unless @hash_these_lectures_have_a_wrong_date.empty?
|
1110
|
+
@hash_these_lectures_have_a_wrong_date.each_pair {|name_of_the_lecture, date|
|
1111
|
+
@reported_n_lectures_having_a_wrong_date += 1
|
1112
|
+
unless @reported_n_lectures_having_a_wrong_date > 3
|
1113
|
+
# ================================================================= #
|
1114
|
+
# Don't show more than 3 outdated dates.
|
1115
|
+
# ================================================================= #
|
1116
|
+
e crimson('There may be a wrong date (year) set '\
|
1117
|
+
'for the lecture `')+royalblue(name_of_the_lecture)+
|
1118
|
+
crimson('`.')
|
1119
|
+
pp date
|
1120
|
+
end
|
1121
|
+
}
|
1122
|
+
end
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
# ========================================================================= #
|
1126
|
+
# === do_report_the_upcoming_exams
|
1127
|
+
# ========================================================================= #
|
1128
|
+
def do_report_the_upcoming_exams(
|
1129
|
+
i = main_day?
|
1130
|
+
)
|
1131
|
+
i = i.dup if i.frozen?
|
1132
|
+
i.strip! # Get rid of irrelevant ' ', just in case.
|
1133
|
+
main_day = i
|
1134
|
+
exams_on_that_day = main_hash?[:exams]
|
1135
|
+
unless exams_on_that_day.empty?
|
1136
|
+
# ===================================================================== #
|
1137
|
+
# === "The following exams happen on ..."
|
1138
|
+
# ===================================================================== #
|
1139
|
+
e 'The following '+
|
1140
|
+
colour_for_exams('exams')+
|
1141
|
+
' happen on '+orange(main_day)+
|
1142
|
+
' ('+colourize_weekday(translate_dd_mm_yyy_to_weekday(main_day))+
|
1143
|
+
')'+
|
1144
|
+
darkslategray(':')
|
1145
|
+
sorted_exams_on_that_day = []
|
1146
|
+
exams_on_that_day = exams_on_that_day.each {|name_of_the_lecture|
|
1147
|
+
pointer = main_dataset?[name_of_the_lecture]
|
1148
|
+
selection = pointer['exams'].select {|line|
|
1149
|
+
line.include? i
|
1150
|
+
}
|
1151
|
+
if selection
|
1152
|
+
if selection.empty?
|
1153
|
+
opnn; e "The selection is empty for the day #{sfancy(i.to_s)}."
|
1154
|
+
opnn; e "The name of the lecture was #{sfancy(name_of_the_lecture)}"
|
1155
|
+
pp exams_on_that_day
|
1156
|
+
else
|
1157
|
+
selection_match = selection.first.strip
|
1158
|
+
sorted_exams_on_that_day << [
|
1159
|
+
name_of_the_lecture, Time.parse(selection_match)
|
1160
|
+
]
|
1161
|
+
end
|
1162
|
+
end
|
1163
|
+
}
|
1164
|
+
sorted_exams_on_that_day = sorted_exams_on_that_day.sort_by {|a,b|
|
1165
|
+
b
|
1166
|
+
}
|
1167
|
+
display_these_exams_on_that_day(sorted_exams_on_that_day)
|
1168
|
+
else
|
1169
|
+
e "No exams were found on the day #{orange(main_day)}"\
|
1170
|
+
" (#{sfancy(return_weekday_for(main_day))})."
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# ========================================================================= #
|
1175
|
+
# === do_report_all_preliminary_meetings_on_that_day
|
1176
|
+
# ========================================================================= #
|
1177
|
+
def do_report_all_preliminary_meetings_on_that_day(
|
1178
|
+
i,
|
1179
|
+
use_this_key = :preparatory_meeting # This used to be 'vorbesprechung' in the past.
|
1180
|
+
)
|
1181
|
+
selection = @original_dataset.select {|a, inner_hash|
|
1182
|
+
if inner_hash.has_key?(use_this_key)
|
1183
|
+
pointer = inner_hash[use_this_key]
|
1184
|
+
if pointer.is_a? Array
|
1185
|
+
pointer = pointer.first
|
1186
|
+
end
|
1187
|
+
pointer = pointer.to_s
|
1188
|
+
pointer.include?(i.to_s)
|
1189
|
+
end
|
1190
|
+
}
|
1191
|
+
index = 0
|
1192
|
+
if selection.empty?
|
1193
|
+
else
|
1194
|
+
# ===================================================================== #
|
1195
|
+
# === "The following preliminary meetings happen on ... "
|
1196
|
+
# ===================================================================== #
|
1197
|
+
e 'The following '+
|
1198
|
+
colour_for_preliminary_meetings('preliminary meetings')+
|
1199
|
+
' happen on '+orange(i)+
|
1200
|
+
' ('+simp(translate_dd_mm_yyy_to_weekday(i))+').'
|
1201
|
+
e
|
1202
|
+
selection.each_pair {|name_of_the_lecture, hash| index += 1
|
1203
|
+
vorbesprechungs_day = hash[use_this_key]
|
1204
|
+
if vorbesprechungs_day.is_a? Array
|
1205
|
+
vorbesprechungs_day = vorbesprechungs_day.first
|
1206
|
+
end
|
1207
|
+
colourized_and_padded_index =
|
1208
|
+
' '+colour_for_index_strings(index.to_s+')')
|
1209
|
+
e colourized_and_padded_index+' '+
|
1210
|
+
sfancy(name_of_the_lecture.ljust(@n_ljust+5))+
|
1211
|
+
colour_for_vorbesprechungs_termin(
|
1212
|
+
'['+vorbesprechungs_day+']'
|
1213
|
+
)
|
1214
|
+
}
|
1215
|
+
end
|
1216
|
+
e
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
# ========================================================================= #
|
1220
|
+
# === run
|
1221
|
+
# ========================================================================= #
|
1222
|
+
def run
|
1223
|
+
ensure_that_the_log_directory_exists # Make sure that the log dir exists.
|
1224
|
+
menu # Pass the commandline arguments into the menu() interface.
|
1225
|
+
@use_these_dates.each {|this_date|
|
1226
|
+
prepare_dataset_and_then_report_for_this_date(this_date)
|
1227
|
+
}
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
end; end
|
1231
|
+
|
1232
|
+
if __FILE__ == $PROGRAM_NAME
|
1233
|
+
Studium::ShowConflictingLvaLectures.new(ARGV)
|
1234
|
+
end # conflict 15.04.2018
|
1235
|
+
# conflict 20.04.2018 21.04.2018
|
1236
|
+
# conflict 19.06.2018
|
1237
|
+
# conflict --lva-dates-of=LVA_ID_HERE
|
1238
|
+
# conflict --lva-dates-of=301246
|