studium 0.14.16

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

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