studium 0.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of studium might be problematic. Click here for more details.

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