studium 0.9.383

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 (894) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1651 -0
  3. data/bin/ask_question +7 -0
  4. data/bin/check_description_of_these_lectures +7 -0
  5. data/bin/curriculum_module_displayer +7 -0
  6. data/bin/d10 +7 -0
  7. data/bin/d100 +7 -0
  8. data/bin/d15 +7 -0
  9. data/bin/d20 +7 -0
  10. data/bin/d25 +7 -0
  11. data/bin/d3 +7 -0
  12. data/bin/d30 +7 -0
  13. data/bin/d5 +7 -0
  14. data/bin/determine_curricula +7 -0
  15. data/bin/exam_registration_at +7 -0
  16. data/bin/exam_statistics +7 -0
  17. data/bin/exams_per_month +9 -0
  18. data/bin/finished_exams_at_this_university +7 -0
  19. data/bin/flashcards +7 -0
  20. data/bin/mandatory_continuous_assessment +7 -0
  21. data/bin/mandatory_upcoming_courses +7 -0
  22. data/bin/n_exam_questions_already_answered +17 -0
  23. data/bin/nquestions +7 -0
  24. data/bin/nsolved +7 -0
  25. data/bin/open_last_exam_question_asked_file +7 -0
  26. data/bin/passed_pr/303/274fungsimmanente_courses +7 -0
  27. data/bin/return_n_ects_from_this_file +7 -0
  28. data/bin/show_lectures_on_the_commandline +7 -0
  29. data/bin/show_themes +7 -0
  30. data/bin/solved +9 -0
  31. data/bin/studienkennzahl +7 -0
  32. data/bin/studium +7 -0
  33. data/bin/studium_skeleton +7 -0
  34. data/bin/ufind +7 -0
  35. data/bin/upcoming_exams +7 -0
  36. data/doc/ECTS_CONSIDERATIONS.md +54 -0
  37. data/doc/HOW_TO_ADAPT_THIS_PROJECT.md +40 -0
  38. data/doc/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER.md +39 -0
  39. data/doc/README.gen +1634 -0
  40. data/doc/TODO_FOR_STUDIUM_GEM.md +119 -0
  41. data/doc/deprecated.md +18 -0
  42. data/doc/documentation_for_the_file_lecture_information.md +259 -0
  43. data/doc/elegant_colours.md +20 -0
  44. data/img/STUDIES.png +0 -0
  45. data/lib/studium.rb +5 -0
  46. data/lib/studium/autoinclude.rb +7 -0
  47. data/lib/studium/base/base.rb +108 -0
  48. data/lib/studium/base/cliner.rb +58 -0
  49. data/lib/studium/base/colours.rb +349 -0
  50. data/lib/studium/base/commandline_arguments.rb +46 -0
  51. data/lib/studium/base/constants.rb +32 -0
  52. data/lib/studium/base/curriculum.rb +304 -0
  53. data/lib/studium/base/directory_to_the_exam_topics.rb +23 -0
  54. data/lib/studium/base/editor.rb +20 -0
  55. data/lib/studium/base/encoding.rb +35 -0
  56. data/lib/studium/base/esystem.rb +24 -0
  57. data/lib/studium/base/minimal_prototype.rb +33 -0
  58. data/lib/studium/base/misc.rb +819 -0
  59. data/lib/studium/base/mode.rb +89 -0
  60. data/lib/studium/base/obtain.rb +144 -0
  61. data/lib/studium/base/opnn.rb +46 -0
  62. data/lib/studium/base/prototype.rb +102 -0
  63. data/lib/studium/base/readlines.rb +53 -0
  64. data/lib/studium/base/replace.rb +108 -0
  65. data/lib/studium/base/reset.rb +49 -0
  66. data/lib/studium/base/run.rb +17 -0
  67. data/lib/studium/base/src_dir_at_home.rb +20 -0
  68. data/lib/studium/base/time.rb +599 -0
  69. data/lib/studium/base/unicode.rb +92 -0
  70. data/lib/studium/base/word_wrap.rb +55 -0
  71. data/lib/studium/boku/README.md +4 -0
  72. data/lib/studium/boku/boku_/303/266ffnungszeiten.rb +29 -0
  73. data/lib/studium/boku/show_three_pillars_of_these_lectures.rb +107 -0
  74. data/lib/studium/boku/three_pillars.rb +245 -0
  75. data/lib/studium/check/README.md +7 -0
  76. data/lib/studium/check/check_curriculum_for_correct_separation_of_bachelor_and_master.rb +149 -0
  77. data/lib/studium/check/check_for_all_exam_topics_being_registered.rb +82 -0
  78. data/lib/studium/check/check_for_existing_description_of_this_lecture.rb +194 -0
  79. data/lib/studium/check/check_the_lecture_information_file.rb +168 -0
  80. data/lib/studium/colours/colours.rb +596 -0
  81. data/lib/studium/colours/sfancy.rb +38 -0
  82. data/lib/studium/colours/sfile.rb +35 -0
  83. data/lib/studium/colours/simp.rb +38 -0
  84. data/lib/studium/commandline/commandline.rb +121 -0
  85. data/lib/studium/commandline/fast_commandline_options.rb +994 -0
  86. data/lib/studium/commandline/help.rb +147 -0
  87. data/lib/studium/commandline/menu.rb +366 -0
  88. data/lib/studium/commandline/misc.rb +11 -0
  89. data/lib/studium/constants/boku_wien.rb +52 -0
  90. data/lib/studium/constants/constants.rb +30 -0
  91. data/lib/studium/constants/delay.rb +21 -0
  92. data/lib/studium/constants/editor.rb +25 -0
  93. data/lib/studium/constants/exam_topics.rb +161 -0
  94. data/lib/studium/constants/file_constants.rb +826 -0
  95. data/lib/studium/constants/image_constants.rb +217 -0
  96. data/lib/studium/constants/last_question_asked.rb +32 -0
  97. data/lib/studium/constants/lecture_types_that_are_mandatory_continuous_assessment.rb +47 -0
  98. data/lib/studium/constants/log_dir.rb +174 -0
  99. data/lib/studium/constants/misc.rb +200 -0
  100. data/lib/studium/constants/namespace.rb +14 -0
  101. data/lib/studium/constants/regexes.rb +32 -0
  102. data/lib/studium/constants/return_file_for_this_curriculum.rb +407 -0
  103. data/lib/studium/constants/roebe.rb +151 -0
  104. data/lib/studium/constants/time.rb +49 -0
  105. data/lib/studium/constants/tu_wien.rb +39 -0
  106. data/lib/studium/constants/uni_wien.rb +24 -0
  107. data/lib/studium/constants/unicode.rb +27 -0
  108. data/lib/studium/constants/week.rb +137 -0
  109. data/lib/studium/constants/www_constants.rb +23 -0
  110. data/lib/studium/curricula/curriculum.rb +187 -0
  111. data/lib/studium/curricula/curriculum_as_string.rb +279 -0
  112. data/lib/studium/curricula/curriculum_module_displayer/constants.rb +38 -0
  113. data/lib/studium/curricula/curriculum_module_displayer/curriculum_module_displayer.rb +421 -0
  114. data/lib/studium/curricula/curriculum_module_displayer/initialize.rb +25 -0
  115. data/lib/studium/curricula/curriculum_module_displayer/menu.rb +45 -0
  116. data/lib/studium/curricula/curriculum_module_displayer/reset.rb +77 -0
  117. data/lib/studium/curricula/curriculum_module_displayer/run.rb +20 -0
  118. data/lib/studium/curricula/curriculum_module_displayer/set_use_this_curriculum.rb +90 -0
  119. data/lib/studium/curricula/curriculum_module_displayer/show_and_report.rb +190 -0
  120. data/lib/studium/curricula/determine_curricula/constants.rb +16 -0
  121. data/lib/studium/curricula/determine_curricula/determine_curricula.rb +36 -0
  122. data/lib/studium/curricula/determine_curricula/help.rb +39 -0
  123. data/lib/studium/curricula/determine_curricula/initialize.rb +48 -0
  124. data/lib/studium/curricula/determine_curricula/menu.rb +138 -0
  125. data/lib/studium/curricula/determine_curricula/misc.rb +402 -0
  126. data/lib/studium/curricula/determine_curricula/report.rb +130 -0
  127. data/lib/studium/curricula/determine_curricula/reset.rb +62 -0
  128. data/lib/studium/curricula/determine_curricula/run.rb +19 -0
  129. data/lib/studium/curricula/determine_elective_courses_in_this_curriculum.rb +131 -0
  130. data/lib/studium/curricula/display_bachelor_curricula.rb +104 -0
  131. data/lib/studium/curricula/mitteilungsbl/303/244tter.rb +336 -0
  132. data/lib/studium/curricula/modules/display_on_the_commandline.rb +339 -0
  133. data/lib/studium/curricula/modules/return_n_ects_in_this_module.rb +72 -0
  134. data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +72 -0
  135. data/lib/studium/curricula/show_lectures_of_this_curriculum.rb +112 -0
  136. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/constants.rb +16 -0
  137. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/misc.rb +277 -0
  138. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/report.rb +140 -0
  139. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/reset.rb +65 -0
  140. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/show_lectures_of_this_curriculum_id.rb +37 -0
  141. data/lib/studium/curricula/show_solved_percentage_among_the_registered_curricula.rb +99 -0
  142. data/lib/studium/ects/boku_ects_splitter.rb +121 -0
  143. data/lib/studium/ects/ects_parser.rb +174 -0
  144. data/lib/studium/ects/ects_per_university.rb +137 -0
  145. data/lib/studium/ects/ects_scanner.rb +136 -0
  146. data/lib/studium/ects/ects_to_university_parser.rb +144 -0
  147. data/lib/studium/ects/erledigt.rb +129 -0
  148. data/lib/studium/ects/last_entry_is_curriculum.rb +144 -0
  149. data/lib/studium/ects/n_ects_in_these_lectures.rb +176 -0
  150. data/lib/studium/ects/n_ects_points_in_mandatory_presence_courses.rb +50 -0
  151. data/lib/studium/ects/noch_zu_absolvieren.rb +170 -0
  152. data/lib/studium/ects/return_n_ects_from_this_file.rb +58 -0
  153. data/lib/studium/ects/return_n_ects_from_this_url.rb +197 -0
  154. data/lib/studium/ects/search_for_n_ects.rb +535 -0
  155. data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +208 -0
  156. data/lib/studium/ects/show_passed_credits_per_curriculum.rb +241 -0
  157. data/lib/studium/ects/simple_total_ects_points.rb +143 -0
  158. data/lib/studium/ects/solved_ects/constants.rb +24 -0
  159. data/lib/studium/ects/solved_ects/solved_ects.rb +340 -0
  160. data/lib/studium/ects/solved_ects_per_university/solved_ects_per_university.rb +116 -0
  161. data/lib/studium/ects/still_missing.rb +125 -0
  162. data/lib/studium/ects/sum_of_ects.rb +147 -0
  163. data/lib/studium/encoding/encoding.rb +141 -0
  164. data/lib/studium/exam_topics/RNAi_siRNA_and_miRNA +79 -0
  165. data/lib/studium/exam_topics/abfall_als_ressource +86 -0
  166. data/lib/studium/exam_topics/advanced_biochemistry +762 -0
  167. data/lib/studium/exam_topics/advanced_biotechnology +192 -0
  168. data/lib/studium/exam_topics/advanced_cellbiology +24 -0
  169. data/lib/studium/exam_topics/advanced_chemistry +453 -0
  170. data/lib/studium/exam_topics/advanced_microbiology +44 -0
  171. data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +46 -0
  172. data/lib/studium/exam_topics/advanced_virology +52 -0
  173. data/lib/studium/exam_topics/ageing +101 -0
  174. data/lib/studium/exam_topics/agrar_ecology +61 -0
  175. data/lib/studium/exam_topics/agrarmarkt +71 -0
  176. data/lib/studium/exam_topics/agrarphysik +35 -0
  177. data/lib/studium/exam_topics/alcohols +29 -0
  178. data/lib/studium/exam_topics/algorithms +49 -0
  179. data/lib/studium/exam_topics/allergie +73 -0
  180. data/lib/studium/exam_topics/allgemeine_genetik +1006 -0
  181. data/lib/studium/exam_topics/allgemeine_mikrobiologie +855 -0
  182. data/lib/studium/exam_topics/aminoacids +417 -0
  183. data/lib/studium/exam_topics/analytische_chemie_1 +130 -0
  184. data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
  185. data/lib/studium/exam_topics/anatomie +248 -0
  186. data/lib/studium/exam_topics/anorganische_chemie +289 -0
  187. data/lib/studium/exam_topics/anthropologie +115 -0
  188. data/lib/studium/exam_topics/antibodies_and_antigens +747 -0
  189. data/lib/studium/exam_topics/apoptosis +35 -0
  190. data/lib/studium/exam_topics/archaea +41 -0
  191. data/lib/studium/exam_topics/architecture +8 -0
  192. data/lib/studium/exam_topics/artificial_intelligence +81 -0
  193. data/lib/studium/exam_topics/audio +10 -0
  194. data/lib/studium/exam_topics/bacteriophages +224 -0
  195. data/lib/studium/exam_topics/basic_biochemistry +1008 -0
  196. data/lib/studium/exam_topics/basic_biotechnology +1011 -0
  197. data/lib/studium/exam_topics/basic_chemistry +1007 -0
  198. data/lib/studium/exam_topics/basic_virology +949 -0
  199. data/lib/studium/exam_topics/bauwesen +6 -0
  200. data/lib/studium/exam_topics/betriebssysteme +125 -0
  201. data/lib/studium/exam_topics/betriebswirtschaftslehre +29 -0
  202. data/lib/studium/exam_topics/bioanalytik_und_biosensoren +381 -0
  203. data/lib/studium/exam_topics/biochips +78 -0
  204. data/lib/studium/exam_topics/bioelektrochemie +56 -0
  205. data/lib/studium/exam_topics/biofilms +22 -0
  206. data/lib/studium/exam_topics/bioinformatics +475 -0
  207. data/lib/studium/exam_topics/biological_therapeutics +152 -0
  208. data/lib/studium/exam_topics/biologie +134 -0
  209. data/lib/studium/exam_topics/biomarkers +106 -0
  210. data/lib/studium/exam_topics/biomaterials +46 -0
  211. data/lib/studium/exam_topics/biomembranes +6 -0
  212. data/lib/studium/exam_topics/bionik +65 -0
  213. data/lib/studium/exam_topics/biophysik +34 -0
  214. data/lib/studium/exam_topics/biopolymers +10 -0
  215. data/lib/studium/exam_topics/bioprozesstechnik +139 -0
  216. data/lib/studium/exam_topics/bioressourcenmanagement +78 -0
  217. data/lib/studium/exam_topics/bodenkunde +345 -0
  218. data/lib/studium/exam_topics/bodenmikrobiologie +40 -0
  219. data/lib/studium/exam_topics/cancerbiology +441 -0
  220. data/lib/studium/exam_topics/cell_cultures +154 -0
  221. data/lib/studium/exam_topics/cellbiology +962 -0
  222. data/lib/studium/exam_topics/cellular_transport_and_protein_secretion +27 -0
  223. data/lib/studium/exam_topics/chemische_technologie_anorganischer_stoffe +208 -0
  224. data/lib/studium/exam_topics/chemisches_labor +59 -0
  225. data/lib/studium/exam_topics/chemotaxis_and_motility_in_prokaryotes +74 -0
  226. data/lib/studium/exam_topics/citric_acid_cycle +70 -0
  227. data/lib/studium/exam_topics/clinical_microbiology +486 -0
  228. data/lib/studium/exam_topics/computer_graphics +5 -0
  229. data/lib/studium/exam_topics/computer_science +269 -0
  230. data/lib/studium/exam_topics/crispr +25 -0
  231. data/lib/studium/exam_topics/cyanobacteria +37 -0
  232. data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +506 -0
  233. data/lib/studium/exam_topics/databases_and_sql +105 -0
  234. data/lib/studium/exam_topics/dna_mutation_and_dna_repair +33 -0
  235. data/lib/studium/exam_topics/dna_replication +53 -0
  236. data/lib/studium/exam_topics/ecogenetics +27 -0
  237. data/lib/studium/exam_topics/ecological_agriculture +12 -0
  238. data/lib/studium/exam_topics/ecology +313 -0
  239. data/lib/studium/exam_topics/economy +210 -0
  240. data/lib/studium/exam_topics/elektronenmikroskopie +353 -0
  241. data/lib/studium/exam_topics/elektrophorese +88 -0
  242. data/lib/studium/exam_topics/elektrotechnik +8 -0
  243. data/lib/studium/exam_topics/elisa +54 -0
  244. data/lib/studium/exam_topics/embryologie_und_entwicklung +541 -0
  245. data/lib/studium/exam_topics/endospores_and_spores +92 -0
  246. data/lib/studium/exam_topics/enzymes_and_cofactors +327 -0
  247. data/lib/studium/exam_topics/epigenetik +177 -0
  248. data/lib/studium/exam_topics/ethik +125 -0
  249. data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +323 -0
  250. data/lib/studium/exam_topics/excel +7 -0
  251. data/lib/studium/exam_topics/fish +19 -0
  252. data/lib/studium/exam_topics/fluorescence_microscopy +7 -0
  253. data/lib/studium/exam_topics/food_microbiology_and_food_biotechnology +17 -0
  254. data/lib/studium/exam_topics/forensik +11 -0
  255. data/lib/studium/exam_topics/forstwirtschaft +52 -0
  256. data/lib/studium/exam_topics/fortgeschrittene_genetik +427 -0
  257. data/lib/studium/exam_topics/fortgeschrittene_gentechnik +189 -0
  258. data/lib/studium/exam_topics/fortgeschrittene_physik +6 -0
  259. data/lib/studium/exam_topics/fungi +78 -0
  260. data/lib/studium/exam_topics/genetische_krankheiten +150 -0
  261. data/lib/studium/exam_topics/genexpression +1008 -0
  262. data/lib/studium/exam_topics/genomics_and_metagenomics +205 -0
  263. data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +863 -0
  264. data/lib/studium/exam_topics/geochemistry +66 -0
  265. data/lib/studium/exam_topics/geography +5 -0
  266. data/lib/studium/exam_topics/geologie_und_mineralogie +610 -0
  267. data/lib/studium/exam_topics/geschichte +94 -0
  268. data/lib/studium/exam_topics/gluconeogenesis +34 -0
  269. data/lib/studium/exam_topics/glycolysis +94 -0
  270. data/lib/studium/exam_topics/glykomik +42 -0
  271. data/lib/studium/exam_topics/glyoxylatzyklus +23 -0
  272. data/lib/studium/exam_topics/grassland_cultivation +32 -0
  273. data/lib/studium/exam_topics/hormone +122 -0
  274. data/lib/studium/exam_topics/html +7 -0
  275. data/lib/studium/exam_topics/human_ecology +8 -0
  276. data/lib/studium/exam_topics/hygiene +191 -0
  277. data/lib/studium/exam_topics/imaging_and_microscopy +224 -0
  278. data/lib/studium/exam_topics/immunanalytik +88 -0
  279. data/lib/studium/exam_topics/immunologie +888 -0
  280. data/lib/studium/exam_topics/informatik +95 -0
  281. data/lib/studium/exam_topics/innate_immunity +20 -0
  282. data/lib/studium/exam_topics/insekten +30 -0
  283. data/lib/studium/exam_topics/insulin_and_diabetes +55 -0
  284. data/lib/studium/exam_topics/java +439 -0
  285. data/lib/studium/exam_topics/javascript +10 -0
  286. data/lib/studium/exam_topics/klima +6 -0
  287. data/lib/studium/exam_topics/landtechnik +27 -0
  288. data/lib/studium/exam_topics/lebensmittel +206 -0
  289. data/lib/studium/exam_topics/lebensmitteltechnologie +16 -0
  290. data/lib/studium/exam_topics/linux +5 -0
  291. data/lib/studium/exam_topics/lipids +95 -0
  292. data/lib/studium/exam_topics/macroeconomics +39 -0
  293. data/lib/studium/exam_topics/mathematics +173 -0
  294. data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +250 -0
  295. data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +397 -0
  296. data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
  297. data/lib/studium/exam_topics/metabolismus +431 -0
  298. data/lib/studium/exam_topics/microbial_ecology +35 -0
  299. data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +34 -0
  300. data/lib/studium/exam_topics/mikrobielle_physiologie +147 -0
  301. data/lib/studium/exam_topics/mixed +289 -0
  302. data/lib/studium/exam_topics/molecular_biology_of_plants +234 -0
  303. data/lib/studium/exam_topics/molekulare_medizin +129 -0
  304. data/lib/studium/exam_topics/nanotechnologie +302 -0
  305. data/lib/studium/exam_topics/nature_conservation_and_biodiversity +165 -0
  306. data/lib/studium/exam_topics/naturstoffe +9 -0
  307. data/lib/studium/exam_topics/netzwerke +32 -0
  308. data/lib/studium/exam_topics/neurobiology +266 -0
  309. data/lib/studium/exam_topics/nucleotide_sequencing +30 -0
  310. data/lib/studium/exam_topics/object_oriented_modeling +14 -0
  311. data/lib/studium/exam_topics/obstbau +234 -0
  312. data/lib/studium/exam_topics/organische_chemie +1007 -0
  313. data/lib/studium/exam_topics/organische_chemie_2 +72 -0
  314. data/lib/studium/exam_topics/paleobiology +33 -0
  315. data/lib/studium/exam_topics/parasitic_diseases_and_molecular_infection_biology +335 -0
  316. data/lib/studium/exam_topics/patent_law +55 -0
  317. data/lib/studium/exam_topics/pathologie +713 -0
  318. data/lib/studium/exam_topics/pcr +133 -0
  319. data/lib/studium/exam_topics/peroxisomes_glycosomes_and_lysosomes +54 -0
  320. data/lib/studium/exam_topics/pflanzenanatomie +239 -0
  321. data/lib/studium/exam_topics/pflanzenbau +24 -0
  322. data/lib/studium/exam_topics/pflanzenschutz +35 -0
  323. data/lib/studium/exam_topics/pflanzenwissenschaften +1010 -0
  324. data/lib/studium/exam_topics/pharmaceutical_biotechnology +250 -0
  325. data/lib/studium/exam_topics/physik +326 -0
  326. data/lib/studium/exam_topics/physikalische_chemie +85 -0
  327. data/lib/studium/exam_topics/physiology_and_histology +485 -0
  328. data/lib/studium/exam_topics/phytochemie +33 -0
  329. data/lib/studium/exam_topics/plant_biotechnology +127 -0
  330. data/lib/studium/exam_topics/plant_breeding +64 -0
  331. data/lib/studium/exam_topics/plant_development +50 -0
  332. data/lib/studium/exam_topics/populationsgenetik +136 -0
  333. data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +186 -0
  334. data/lib/studium/exam_topics/projektmanagement +218 -0
  335. data/lib/studium/exam_topics/prokaryote_genetics +470 -0
  336. data/lib/studium/exam_topics/proteomik +38 -0
  337. data/lib/studium/exam_topics/prozesstechnik +95 -0
  338. data/lib/studium/exam_topics/psychologie +9 -0
  339. data/lib/studium/exam_topics/python +350 -0
  340. data/lib/studium/exam_topics/quality_management +241 -0
  341. data/lib/studium/exam_topics/rechtsgrundlagen +114 -0
  342. data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
  343. data/lib/studium/exam_topics/rna_and_dna +360 -0
  344. data/lib/studium/exam_topics/rna_seq +11 -0
  345. data/lib/studium/exam_topics/ruby +126 -0
  346. data/lib/studium/exam_topics/ruby_on_rails +62 -0
  347. data/lib/studium/exam_topics/scientific_writing_and_publishing +38 -0
  348. data/lib/studium/exam_topics/semisynthese_von_proteinen_und_nukleotiden +120 -0
  349. data/lib/studium/exam_topics/sexualbiologie +59 -0
  350. data/lib/studium/exam_topics/signal_transduction_and_laser_systems +126 -0
  351. data/lib/studium/exam_topics/splicing_exons_and_introns +57 -0
  352. data/lib/studium/exam_topics/statistik +202 -0
  353. data/lib/studium/exam_topics/stemcells +87 -0
  354. data/lib/studium/exam_topics/structural_bioinformatics +54 -0
  355. data/lib/studium/exam_topics/strukturbiologie +319 -0
  356. data/lib/studium/exam_topics/system_biology_and_synthetic_biology +87 -0
  357. data/lib/studium/exam_topics/systematische_zoologie +430 -0
  358. data/lib/studium/exam_topics/technical_ecology +144 -0
  359. data/lib/studium/exam_topics/technische_chemie +193 -0
  360. data/lib/studium/exam_topics/technische_grundlagen_der_informatik +22 -0
  361. data/lib/studium/exam_topics/technische_mikrobiologie +403 -0
  362. data/lib/studium/exam_topics/technisches_zeichnen +5 -0
  363. data/lib/studium/exam_topics/the_bacterial_cell_wall +86 -0
  364. data/lib/studium/exam_topics/the_c_plus_plus_programming_language +488 -0
  365. data/lib/studium/exam_topics/the_c_programming_language +128 -0
  366. data/lib/studium/exam_topics/the_cellcycle +65 -0
  367. data/lib/studium/exam_topics/the_european_union +119 -0
  368. data/lib/studium/exam_topics/the_interferon_system +32 -0
  369. data/lib/studium/exam_topics/the_microbiome +163 -0
  370. data/lib/studium/exam_topics/the_universe +6 -0
  371. data/lib/studium/exam_topics/theoretische_chemie +5 -0
  372. data/lib/studium/exam_topics/theoretische_informatik +157 -0
  373. data/lib/studium/exam_topics/tierzucht +94 -0
  374. data/lib/studium/exam_topics/toxikologie +403 -0
  375. data/lib/studium/exam_topics/transcription +25 -0
  376. data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +138 -0
  377. data/lib/studium/exam_topics/umweltbiotechnologie +58 -0
  378. data/lib/studium/exam_topics/umweltchemie +232 -0
  379. data/lib/studium/exam_topics/urbanism_and_traffic +19 -0
  380. data/lib/studium/exam_topics/vaccines_and_vaccination +234 -0
  381. data/lib/studium/exam_topics/vectors_and_gene_therapy +237 -0
  382. data/lib/studium/exam_topics/verfahrenstechnik +32 -0
  383. data/lib/studium/exam_topics/veterinary_medicine +10 -0
  384. data/lib/studium/exam_topics/vitamine +19 -0
  385. data/lib/studium/exam_topics/wasserkunde +141 -0
  386. data/lib/studium/exam_topics/weinbau +59 -0
  387. data/lib/studium/exam_topics/wissenschaft +17 -0
  388. data/lib/studium/exam_topics/yeast +97 -0
  389. data/lib/studium/exam_topics/zoologie +329 -0
  390. data/lib/studium/exams/afterburn.rb +259 -0
  391. data/lib/studium/exams/ask_exam_from_the_upcoming_exams_pool.rb +166 -0
  392. data/lib/studium/exams/ask_exam_question/answer.rb +103 -0
  393. data/lib/studium/exams/ask_exam_question/ask_exam_question.rb +127 -0
  394. data/lib/studium/exams/ask_exam_question/class_methods.rb +32 -0
  395. data/lib/studium/exams/ask_exam_question/constants.rb +94 -0
  396. data/lib/studium/exams/ask_exam_question/help.rb +55 -0
  397. data/lib/studium/exams/ask_exam_question/initialize.rb +61 -0
  398. data/lib/studium/exams/ask_exam_question/menu.rb +306 -0
  399. data/lib/studium/exams/ask_exam_question/misc.rb +846 -0
  400. data/lib/studium/exams/ask_exam_question/question.rb +66 -0
  401. data/lib/studium/exams/ask_exam_question/reset.rb +69 -0
  402. data/lib/studium/exams/ask_exam_question/run.rb +37 -0
  403. data/lib/studium/exams/ask_exam_question/show.rb +257 -0
  404. data/lib/studium/exams/ask_exam_topic_question.rb +120 -0
  405. data/lib/studium/exams/ask_question_from_alias.rb +138 -0
  406. data/lib/studium/exams/ask_question_from_any_of_the_still_missing_lectures.rb +142 -0
  407. data/lib/studium/exams/ask_question_from_grouped_themes.rb +141 -0
  408. data/lib/studium/exams/ask_question_from_last_topic.rb +108 -0
  409. data/lib/studium/exams/autoinclude.rb +7 -0
  410. data/lib/studium/exams/best_months.rb +79 -0
  411. data/lib/studium/exams/class.rb +125 -0
  412. data/lib/studium/exams/csv/create_csv_passed_exams_file.rb +219 -0
  413. data/lib/studium/exams/cycle.rb +289 -0
  414. data/lib/studium/exams/dataset.rb +88 -0
  415. data/lib/studium/exams/exam_registration_at/constants.rb +49 -0
  416. data/lib/studium/exams/exam_registration_at/exam_registration_at.rb +247 -0
  417. data/lib/studium/exams/exam_registration_at/help.rb +46 -0
  418. data/lib/studium/exams/exam_registration_at/menu.rb +82 -0
  419. data/lib/studium/exams/exam_registration_at/report.rb +108 -0
  420. data/lib/studium/exams/exam_registration_at/reset.rb +49 -0
  421. data/lib/studium/exams/exam_statistics_from_this_file/exam_statistics_from_this_file.rb +137 -0
  422. data/lib/studium/exams/exam_topics.rb +205 -0
  423. data/lib/studium/exams/exams.rb +18 -0
  424. data/lib/studium/exams/exams_this_week.rb +177 -0
  425. data/lib/studium/exams/fix_exam_dates.rb +144 -0
  426. data/lib/studium/exams/last_exams.rb +369 -0
  427. data/lib/studium/exams/lectures_without_exam_entry.rb +164 -0
  428. data/lib/studium/exams/mandatory_continuous_assessment/compare.rb +144 -0
  429. data/lib/studium/exams/mandatory_continuous_assessment/constants.rb +18 -0
  430. data/lib/studium/exams/mandatory_continuous_assessment/help.rb +92 -0
  431. data/lib/studium/exams/mandatory_continuous_assessment/initialize.rb +46 -0
  432. data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1098 -0
  433. data/lib/studium/exams/mandatory_continuous_assessment/menu.rb +132 -0
  434. data/lib/studium/exams/mandatory_continuous_assessment/misc.rb +61 -0
  435. data/lib/studium/exams/mandatory_continuous_assessment/reset.rb +60 -0
  436. data/lib/studium/exams/mandatory_continuous_assessment/run.rb +33 -0
  437. data/lib/studium/exams/mandatory_continuous_assessment/set_title_of_the_curriculum.rb +180 -0
  438. data/lib/studium/exams/mandatory_continuous_assessment/show_and_report.rb +139 -0
  439. 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 +119 -0
  440. data/lib/studium/exams/n_exams_in_these_topics.rb +409 -0
  441. data/lib/studium/exams/new_questions_per_year.rb +136 -0
  442. data/lib/studium/exams/next_exam.rb +117 -0
  443. data/lib/studium/exams/next_exams.rb +375 -0
  444. data/lib/studium/exams/open_exam_associated_url.rb +149 -0
  445. data/lib/studium/exams/open_last_exam_question_asked_file/initialize.rb +29 -0
  446. data/lib/studium/exams/open_last_exam_question_asked_file/open_last_exam_question_asked_file.rb +120 -0
  447. data/lib/studium/exams/parse_question_answer.rb +315 -0
  448. data/lib/studium/exams/passed_exams.rb +46 -0
  449. data/lib/studium/exams/pruefung.rb +288 -0
  450. data/lib/studium/exams/push_solved_questions_on_top.rb +203 -0
  451. data/lib/studium/exams/question_answer/constants.rb +46 -0
  452. data/lib/studium/exams/question_answer/question_answer.rb +587 -0
  453. data/lib/studium/exams/questions_solved_from_day_to_day.rb +355 -0
  454. data/lib/studium/exams/repeat_last_question.rb +77 -0
  455. data/lib/studium/exams/show_all_passed_exams_of_this_university.rb +248 -0
  456. data/lib/studium/exams/show_backlog_of_exams.rb +140 -0
  457. data/lib/studium/exams/show_next_exams_for.rb +140 -0
  458. data/lib/studium/exams/show_themes/constants.rb +33 -0
  459. data/lib/studium/exams/show_themes/menu.rb +55 -0
  460. data/lib/studium/exams/show_themes/reset.rb +60 -0
  461. data/lib/studium/exams/show_themes/show_themes.rb +527 -0
  462. data/lib/studium/exams/show_upcoming_exams/consider_autogenerating_exam_aliases.rb +170 -0
  463. data/lib/studium/exams/show_upcoming_exams/constants.rb +82 -0
  464. data/lib/studium/exams/show_upcoming_exams/help.rb +33 -0
  465. data/lib/studium/exams/show_upcoming_exams/initialize.rb +71 -0
  466. data/lib/studium/exams/show_upcoming_exams/menu.rb +53 -0
  467. data/lib/studium/exams/show_upcoming_exams/report.rb +195 -0
  468. data/lib/studium/exams/show_upcoming_exams/reset.rb +38 -0
  469. data/lib/studium/exams/show_upcoming_exams/run.rb +20 -0
  470. data/lib/studium/exams/show_upcoming_exams/show_upcoming_exams.rb +488 -0
  471. data/lib/studium/exams/solve_all_questions_from_this_topic.rb +123 -0
  472. data/lib/studium/exams/solved/constants.rb +37 -0
  473. data/lib/studium/exams/solved/help.rb +23 -0
  474. data/lib/studium/exams/solved/menu.rb +36 -0
  475. data/lib/studium/exams/solved/solved.rb +316 -0
  476. data/lib/studium/exams/steop.rb +91 -0
  477. data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +181 -0
  478. data/lib/studium/exams/upcoming_exams/constants.rb +20 -0
  479. data/lib/studium/exams/upcoming_exams/help.rb +38 -0
  480. data/lib/studium/exams/upcoming_exams/initialize.rb +27 -0
  481. data/lib/studium/exams/upcoming_exams/menu.rb +79 -0
  482. data/lib/studium/exams/upcoming_exams/misc.rb +364 -0
  483. data/lib/studium/exams/upcoming_exams/reset.rb +37 -0
  484. data/lib/studium/exams/upcoming_exams/run.rb +25 -0
  485. data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +32 -0
  486. data/lib/studium/exams/upcoming_exams_at_the_boku/constants.rb +20 -0
  487. data/lib/studium/exams/upcoming_exams_at_the_boku/html.rb +66 -0
  488. data/lib/studium/exams/upcoming_exams_at_the_boku/upcoming_exams_at_the_boku.rb +186 -0
  489. data/lib/studium/exams/upcoming_exams_dataset.rb +243 -0
  490. data/lib/studium/exams/upload_exam_topics.rb +349 -0
  491. data/lib/studium/exams_per_month/colours.rb +81 -0
  492. data/lib/studium/exams_per_month/constants.rb +69 -0
  493. data/lib/studium/exams_per_month/dataset.rb +64 -0
  494. data/lib/studium/exams_per_month/exams_per_month.rb +303 -0
  495. data/lib/studium/exams_per_month/help.rb +72 -0
  496. data/lib/studium/exams_per_month/initialize.rb +39 -0
  497. data/lib/studium/exams_per_month/menu.rb +254 -0
  498. data/lib/studium/exams_per_month/open.rb +134 -0
  499. data/lib/studium/exams_per_month/requires.rb +13 -0
  500. data/lib/studium/exams_per_month/reset.rb +64 -0
  501. data/lib/studium/exams_per_month/run.rb +18 -0
  502. data/lib/studium/exams_per_month/sanitize.rb +129 -0
  503. data/lib/studium/exams_per_month/show_and_report.rb +1278 -0
  504. data/lib/studium/flashcards/flashcards.rb +95 -0
  505. data/lib/studium/graphviz/README.md +4 -0
  506. data/lib/studium/graphviz/bachelor_vector_based_strategies.dot +160 -0
  507. data/lib/studium/graphviz/master_vector_based_strategies.dot +46 -0
  508. data/lib/studium/gui/gtk2/constants.rb +52 -0
  509. data/lib/studium/gui/gtk2/exam_card.rb +199 -0
  510. data/lib/studium/gui/gtk2/flip_card.rb +8 -0
  511. data/lib/studium/gui/gtk2/frame.rb +314 -0
  512. data/lib/studium/gui/gtk2/main_box.rb +187 -0
  513. data/lib/studium/gui/gtk2/module_methods.rb +58 -0
  514. data/lib/studium/gui/gtk2/require_gtk_files.rb +25 -0
  515. data/lib/studium/gui/gtk2/run.rb +49 -0
  516. data/lib/studium/gui/gtk2/show_curriculum_entries.rb +187 -0
  517. data/lib/studium/gui/gtk2/simple_widget_question_answer.rb +186 -0
  518. data/lib/studium/gui/gtk2/vbox.rb +748 -0
  519. data/lib/studium/gui/gtk3/README.md +1 -0
  520. data/lib/studium/gui/gtk3/studium_panel.rb +54 -0
  521. data/lib/studium/lectures/show_lectures_on_the_commandline/constants.rb +22 -0
  522. data/lib/studium/lectures/show_lectures_on_the_commandline/determine.rb +630 -0
  523. data/lib/studium/lectures/show_lectures_on_the_commandline/help.rb +44 -0
  524. data/lib/studium/lectures/show_lectures_on_the_commandline/html.rb +599 -0
  525. data/lib/studium/lectures/show_lectures_on_the_commandline/initialize.rb +53 -0
  526. data/lib/studium/lectures/show_lectures_on_the_commandline/konsole.rb +32 -0
  527. data/lib/studium/lectures/show_lectures_on_the_commandline/menu.rb +466 -0
  528. data/lib/studium/lectures/show_lectures_on_the_commandline/misc.rb +599 -0
  529. data/lib/studium/lectures/show_lectures_on_the_commandline/reset.rb +120 -0
  530. data/lib/studium/lectures/show_lectures_on_the_commandline/run.rb +44 -0
  531. data/lib/studium/lectures/show_lectures_on_the_commandline/show.rb +106 -0
  532. data/lib/studium/lectures/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb +490 -0
  533. data/lib/studium/lectures/show_lectures_on_the_commandline/sorted_individual_curricula.rb +117 -0
  534. data/lib/studium/log/README.md +2 -0
  535. data/lib/studium/log/store_last_question_asked_into_file.rb +152 -0
  536. data/lib/studium/misc/return_remote_homepage_of_this_lecture.rb +8643 -0
  537. data/lib/studium/misc/return_remote_moodle_link_of_this_lecture.rb +1308 -0
  538. data/lib/studium/parsers/README.md +2 -0
  539. data/lib/studium/parsers/custom_exam_results_parser.rb +205 -0
  540. data/lib/studium/parsers/parse_lva_dates.rb +200 -0
  541. data/lib/studium/pdf/README.md +2 -0
  542. data/lib/studium/pdf/create_pdf_file_for_this_exam_topic.rb +258 -0
  543. data/lib/studium/project/project.rb +82 -0
  544. data/lib/studium/requires/base_class_and_common_popular_requires.rb +8 -0
  545. data/lib/studium/requires/common_external_requires.rb +10 -0
  546. data/lib/studium/requires/common_popular_requires.rb +43 -0
  547. data/lib/studium/requires/require_class_exams_solved.rb +7 -0
  548. data/lib/studium/requires/require_ects_scripts.rb +22 -0
  549. data/lib/studium/requires/require_encoding.rb +7 -0
  550. data/lib/studium/requires/require_exam_scripts.rb +32 -0
  551. data/lib/studium/requires/require_the_proper_yaml_engine.rb +7 -0
  552. data/lib/studium/requires/require_the_whole_studium_project.rb +53 -0
  553. data/lib/studium/requires/require_toplevel_methods.rb +25 -0
  554. data/lib/studium/requires/require_upcoming_exams.rb +7 -0
  555. data/lib/studium/requires/require_utility_scripts.rb +23 -0
  556. data/lib/studium/requires/with_GUI.rb +11 -0
  557. data/lib/studium/requires/www_mode.rb +17 -0
  558. data/lib/studium/sanitize/README.md +7 -0
  559. data/lib/studium/sanitize/sanitize_this_string_containing_the_lva_dates.rb +79 -0
  560. data/lib/studium/sinatra/app.rb +257 -0
  561. data/lib/studium/sinatra/misc.rb +40 -0
  562. data/lib/studium/statistics/README.md +4 -0
  563. data/lib/studium/statistics/curriculum_comparer.rb +344 -0
  564. data/lib/studium/statistics/determine_exam_statistics_from_this_file.rb +152 -0
  565. data/lib/studium/statistics/max_stats.rb +167 -0
  566. data/lib/studium/statistics/report_how_many_ects_points_per_curriculum_were_completed.rb +166 -0
  567. data/lib/studium/statistics/report_how_many_exam_questions_were_answered.rb +476 -0
  568. data/lib/studium/statistics/top_stats.rb +144 -0
  569. data/lib/studium/steop/README.md +4 -0
  570. data/lib/studium/steop/show_all_steop_lectures.rb +100 -0
  571. data/lib/studium/steop/steop_lectures_in_this_curriculum.rb +297 -0
  572. data/lib/studium/steop/steop_lva_dates.rb +116 -0
  573. data/lib/studium/toplevel_methods/all_passed_exams.rb +33 -0
  574. data/lib/studium/toplevel_methods/already_solved_this_lecture.rb +94 -0
  575. data/lib/studium/toplevel_methods/already_solved_this_lva_number.rb +226 -0
  576. data/lib/studium/toplevel_methods/available_curricula.rb +71 -0
  577. data/lib/studium/toplevel_methods/available_topics.rb +146 -0
  578. data/lib/studium/toplevel_methods/average_grade.rb +130 -0
  579. data/lib/studium/toplevel_methods/backup_this_exam_file.rb +35 -0
  580. data/lib/studium/toplevel_methods/calculate_pr/303/274fungsimmanente_lectures_from_this_file.rb +55 -0
  581. data/lib/studium/toplevel_methods/cd.rb +25 -0
  582. data/lib/studium/toplevel_methods/cd_stud.rb +133 -0
  583. data/lib/studium/toplevel_methods/copy_file.rb +22 -0
  584. data/lib/studium/toplevel_methods/copy_lecture_information_file_to_default_location.rb +52 -0
  585. data/lib/studium/toplevel_methods/create_file.rb +22 -0
  586. data/lib/studium/toplevel_methods/current_exams.rb +20 -0
  587. data/lib/studium/toplevel_methods/datum.rb +16 -0
  588. data/lib/studium/toplevel_methods/determine_local_directory_of_this_lecture.rb +72 -0
  589. data/lib/studium/toplevel_methods/does_this_course_require_mandatory_presence.rb +45 -0
  590. data/lib/studium/toplevel_methods/download_exam_dataset.rb +108 -0
  591. data/lib/studium/toplevel_methods/download_exam_topics.rb +62 -0
  592. data/lib/studium/toplevel_methods/e.rb +16 -0
  593. data/lib/studium/toplevel_methods/ects_from_lectures.rb +249 -0
  594. data/lib/studium/toplevel_methods/editor.rb +64 -0
  595. data/lib/studium/toplevel_methods/esystem.rb +20 -0
  596. data/lib/studium/toplevel_methods/exams_dataset.rb +45 -0
  597. data/lib/studium/toplevel_methods/file_cd_aliases.rb +26 -0
  598. data/lib/studium/toplevel_methods/file_read_with_proper_encoding.rb +28 -0
  599. data/lib/studium/toplevel_methods/filter_away_invalid_questions.rb +77 -0
  600. data/lib/studium/toplevel_methods/find_corresponding_exam_title.rb +707 -0
  601. data/lib/studium/toplevel_methods/find_corresponding_exam_topic.rb +1834 -0
  602. data/lib/studium/toplevel_methods/from_curriculum_id_to_university.rb +47 -0
  603. data/lib/studium/toplevel_methods/frozen.rb +32 -0
  604. data/lib/studium/toplevel_methods/handle_archive_of_the_exam_questions.rb +136 -0
  605. data/lib/studium/toplevel_methods/has_a_bachelor_curriculum.rb +24 -0
  606. data/lib/studium/toplevel_methods/has_a_master_curriculum.rb +69 -0
  607. data/lib/studium/toplevel_methods/has_this_lecture_been_already_passed_but_the_id_was_changed_lateron.rb +39 -0
  608. data/lib/studium/toplevel_methods/has_this_module_been_completed.rb +206 -0
  609. data/lib/studium/toplevel_methods/html_log_dir.rb +2 -0
  610. data/lib/studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb +33 -0
  611. data/lib/studium/toplevel_methods/is_on_roebe.rb +19 -0
  612. data/lib/studium/toplevel_methods/is_this_exam_topic_included.rb +37 -0
  613. data/lib/studium/toplevel_methods/is_this_homepage_registered.rb +31 -0
  614. data/lib/studium/toplevel_methods/is_this_lecture_a_practical_course.rb +100 -0
  615. data/lib/studium/toplevel_methods/is_this_lecture_part_of_the_vector_curriculum.rb +110 -0
  616. data/lib/studium/toplevel_methods/is_this_lecture_registered_in_upcoming_exams.rb +43 -0
  617. data/lib/studium/toplevel_methods/ja_oder_nein.rb +21 -0
  618. data/lib/studium/toplevel_methods/last_saved_into_which_file.rb +29 -0
  619. data/lib/studium/toplevel_methods/lecture_information.rb +22 -0
  620. data/lib/studium/toplevel_methods/lectures_without_attribution_to_any_curriculum.rb +40 -0
  621. data/lib/studium/toplevel_methods/main_dataset.rb +52 -0
  622. data/lib/studium/toplevel_methods/map_curriculum_number_to_curriculum_name.rb +96 -0
  623. data/lib/studium/toplevel_methods/map_meta_exam_theme_to_corresponding_exam_themes.rb +162 -0
  624. data/lib/studium/toplevel_methods/misc.rb +187 -0
  625. data/lib/studium/toplevel_methods/missing_priority_entry.rb +42 -0
  626. data/lib/studium/toplevel_methods/mkdir.rb +21 -0
  627. data/lib/studium/toplevel_methods/module_methods.rb +23 -0
  628. data/lib/studium/toplevel_methods/n_questions_available.rb +124 -0
  629. data/lib/studium/toplevel_methods/n_topics_available.rb +63 -0
  630. data/lib/studium/toplevel_methods/name_of_this_curriculum.rb +38 -0
  631. data/lib/studium/toplevel_methods/names_of_all_solved_exams.rb +71 -0
  632. data/lib/studium/toplevel_methods/no_file_exists_at.rb +19 -0
  633. data/lib/studium/toplevel_methods/note_down_the_start_time_and_how_many_exams_have_been_already_solved.rb +70 -0
  634. data/lib/studium/toplevel_methods/opnn.rb +22 -0
  635. data/lib/studium/toplevel_methods/passed_this_exam_on.rb +104 -0
  636. data/lib/studium/toplevel_methods/pristine.rb +59 -0
  637. data/lib/studium/toplevel_methods/read_dataset_from_a_curriculum_file.rb +133 -0
  638. data/lib/studium/toplevel_methods/read_delay_between_questions_from_file.rb +33 -0
  639. data/lib/studium/toplevel_methods/read_this_file_through_default_encoding.rb +26 -0
  640. data/lib/studium/toplevel_methods/regex_for_pwd_stud.rb +18 -0
  641. data/lib/studium/toplevel_methods/registered_for_this_exam.rb +62 -0
  642. data/lib/studium/toplevel_methods/remote_url.rb +57 -0
  643. data/lib/studium/toplevel_methods/remove_comments.rb +26 -0
  644. data/lib/studium/toplevel_methods/remove_exam_topics_that_were_already_answered.rb +27 -0
  645. data/lib/studium/toplevel_methods/remove_tags.rb +17 -0
  646. data/lib/studium/toplevel_methods/remove_weekday_names.rb +75 -0
  647. data/lib/studium/toplevel_methods/report_all_lectures_matching_this_lecture_type.rb +44 -0
  648. data/lib/studium/toplevel_methods/report_attributed_lectures_to_universities.rb +30 -0
  649. data/lib/studium/toplevel_methods/report_how_many_exam_questions_were_already_solved.rb +137 -0
  650. data/lib/studium/toplevel_methods/report_n_ects_per_university.rb +63 -0
  651. data/lib/studium/toplevel_methods/report_n_entries_in_the_file_lecture_information.rb +35 -0
  652. data/lib/studium/toplevel_methods/report_nquestions_of.rb +96 -0
  653. data/lib/studium/toplevel_methods/report_solved_topics.rb +55 -0
  654. data/lib/studium/toplevel_methods/return_all_exams_on_this_day.rb +66 -0
  655. data/lib/studium/toplevel_methods/return_curriculum_of_this_lva_number.rb +79 -0
  656. data/lib/studium/toplevel_methods/return_dataset_for_this_exam_topic.rb +41 -0
  657. data/lib/studium/toplevel_methods/return_dataset_from_this_curriculum_file.rb +150 -0
  658. data/lib/studium/toplevel_methods/return_directory_for.rb +66 -0
  659. data/lib/studium/toplevel_methods/return_div_timetable_of_upcoming_exams.rb +489 -0
  660. data/lib/studium/toplevel_methods/return_ects_from_this_lecture_stored_in_the_file_lecture_information.rb +194 -0
  661. data/lib/studium/toplevel_methods/return_hash_of_already_solved_lectures.rb +38 -0
  662. data/lib/studium/toplevel_methods/return_local_path_of_this_pwdstud.rb +61 -0
  663. data/lib/studium/toplevel_methods/return_location_to_this_exam_topic.rb +28 -0
  664. data/lib/studium/toplevel_methods/return_lva_number_of_this_curriculum.rb +74 -0
  665. data/lib/studium/toplevel_methods/return_lva_number_of_this_lecture.rb +486 -0
  666. data/lib/studium/toplevel_methods/return_lva_number_of_this_lecture_based_on_file_lecture_information.rb +58 -0
  667. data/lib/studium/toplevel_methods/return_n_percent_solved_from_this_topic.rb +75 -0
  668. data/lib/studium/toplevel_methods/return_n_questions_were_answered_for_this_topic.rb +37 -0
  669. data/lib/studium/toplevel_methods/return_proper_university_image.rb +79 -0
  670. data/lib/studium/toplevel_methods/return_question_answer_string_from_this_topic.rb +51 -0
  671. data/lib/studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb +124 -0
  672. data/lib/studium/toplevel_methods/return_theme_of_the_next_upcoming_exam.rb +36 -0
  673. data/lib/studium/toplevel_methods/return_this_curriculum_as_a_string.rb +26 -0
  674. data/lib/studium/toplevel_methods/return_title_from_this_curriculum_file.rb +86 -0
  675. data/lib/studium/toplevel_methods/rinstall2.rb +30 -0
  676. data/lib/studium/toplevel_methods/rti_conflict.rb +29 -0
  677. data/lib/studium/toplevel_methods/runmode.rb +81 -0
  678. data/lib/studium/toplevel_methods/sanitize_this_theme_topic.rb +120 -0
  679. data/lib/studium/toplevel_methods/sanitized_dataset_from_file_passed_exams_per_month.rb +44 -0
  680. data/lib/studium/toplevel_methods/save_all_registered_upcoming_exams.rb +60 -0
  681. data/lib/studium/toplevel_methods/save_file.rb +54 -0
  682. data/lib/studium/toplevel_methods/save_this_delay_between_questions_and_answers.rb +43 -0
  683. data/lib/studium/toplevel_methods/set_last_file_for_exam_questions.rb +64 -0
  684. data/lib/studium/toplevel_methods/set_this_cd_alias_to.rb +83 -0
  685. data/lib/studium/toplevel_methods/show_exam_statistics.rb +60 -0
  686. data/lib/studium/toplevel_methods/show_important_files.rb +34 -0
  687. data/lib/studium/toplevel_methods/show_passed_ects_in_the_individual_bachelor_and_master_curricula.rb +81 -0
  688. data/lib/studium/toplevel_methods/show_passed_exams_having_this_grade.rb +28 -0
  689. data/lib/studium/toplevel_methods/spacer.rb +16 -0
  690. data/lib/studium/toplevel_methods/time.rb +123 -0
  691. data/lib/studium/toplevel_methods/total_ects_points_passed.rb +72 -0
  692. data/lib/studium/toplevel_methods/try_to_guess_the_most_likely_lva_id.rb +57 -0
  693. data/lib/studium/toplevel_methods/try_to_report_exams_that_match_to_this_regexp.rb +82 -0
  694. data/lib/studium/toplevel_methods/try_to_return_the_expanded_name_of_this_lecture.rb +62 -0
  695. data/lib/studium/toplevel_methods/unfinished.rb +50 -0
  696. data/lib/studium/toplevel_methods/url.rb +54 -0
  697. data/lib/studium/toplevel_methods/verbose_truth.rb +18 -0
  698. data/lib/studium/toplevel_methods/when_was_this_lecture_passed.rb +51 -0
  699. data/lib/studium/tu_vienna/README.md +6 -0
  700. data/lib/studium/tu_vienna/tu_ferien.rb +34 -0
  701. data/lib/studium/tu_vienna/tu_/303/266ffnungszeiten.rb +29 -0
  702. data/lib/studium/utility_scripts/ask_random_question.rb +202 -0
  703. data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_boku_lecture_to_curriculum.rb +390 -0
  704. data/lib/studium/utility_scripts/attribute_lecture_to_curriculum/attribute_lecture_to_curriculum.rb +232 -0
  705. data/lib/studium/utility_scripts/attribute_lectures_to_university/attribute_lectures_to_university.rb +380 -0
  706. data/lib/studium/utility_scripts/audio_stats.rb +176 -0
  707. data/lib/studium/utility_scripts/auto_stud/auto_stud.rb +248 -0
  708. data/lib/studium/utility_scripts/auto_stud/constants.rb +20 -0
  709. data/lib/studium/utility_scripts/auto_stud/initialize.rb +20 -0
  710. data/lib/studium/utility_scripts/auto_stud/misc.rb +25 -0
  711. data/lib/studium/utility_scripts/autopurge_this_lecture_date.rb +116 -0
  712. data/lib/studium/utility_scripts/boku_biotechnology_all_master_lectures.rb +140 -0
  713. data/lib/studium/utility_scripts/calendar/README.md +2 -0
  714. data/lib/studium/utility_scripts/calendar/calendar.rb +240 -0
  715. data/lib/studium/utility_scripts/check_description_of_these_lectures.rb +223 -0
  716. data/lib/studium/utility_scripts/clean_up_lecture_date.rb +149 -0
  717. data/lib/studium/utility_scripts/current_lectures_belonging_to_both_bachelor_and_master_curriculum.rb +102 -0
  718. data/lib/studium/utility_scripts/currently_participating_in_these_lectures.rb +95 -0
  719. data/lib/studium/utility_scripts/display_lecture_url.rb +115 -0
  720. data/lib/studium/utility_scripts/expand_time_range.rb +400 -0
  721. data/lib/studium/utility_scripts/find_duplicate_lectures.rb +113 -0
  722. data/lib/studium/utility_scripts/finished_exams_at_this_university.rb +81 -0
  723. data/lib/studium/utility_scripts/foreign_language_percentage/constants.rb +28 -0
  724. data/lib/studium/utility_scripts/foreign_language_percentage/foreign_language_percentage.rb +156 -0
  725. data/lib/studium/utility_scripts/foreign_language_percentage/initialize.rb +25 -0
  726. data/lib/studium/utility_scripts/foreign_language_percentage/menu.rb +113 -0
  727. data/lib/studium/utility_scripts/foreign_language_percentage/report.rb +62 -0
  728. data/lib/studium/utility_scripts/foreign_language_percentage/reset.rb +57 -0
  729. data/lib/studium/utility_scripts/foreign_language_percentage/run.rb +19 -0
  730. data/lib/studium/utility_scripts/generate_regex.rb +296 -0
  731. data/lib/studium/utility_scripts/generate_regexes_for_the_available_moodle_links/generate_regexes_for_the_available_moodle_links.rb +54 -0
  732. data/lib/studium/utility_scripts/generate_regexes_for_the_registered_lectures/generate_regexes_for_the_registered_lectures.rb +48 -0
  733. data/lib/studium/utility_scripts/generate_spreadsheet.rb +370 -0
  734. data/lib/studium/utility_scripts/holidays.rb +135 -0
  735. data/lib/studium/utility_scripts/lecture_downloader.rb +114 -0
  736. data/lib/studium/utility_scripts/lectures_attributed_to_universities.rb +345 -0
  737. data/lib/studium/utility_scripts/mandatory_lectures_in_this_month.rb +310 -0
  738. data/lib/studium/utility_scripts/name_of_this_lva_id.rb +117 -0
  739. data/lib/studium/utility_scripts/new_stud.rb +320 -0
  740. data/lib/studium/utility_scripts/next_week.rb +111 -0
  741. data/lib/studium/utility_scripts/passed_ects_per_year.rb +172 -0
  742. data/lib/studium/utility_scripts/passed_pr/303/274fungsimmanente_courses/passed_pr/303/274fungsimmanente_courses.rb +172 -0
  743. data/lib/studium/utility_scripts/prepare_individual_curriculum.rb +179 -0
  744. data/lib/studium/utility_scripts/priority.rb +118 -0
  745. data/lib/studium/utility_scripts/priority_points.rb +263 -0
  746. data/lib/studium/utility_scripts/publish_my_exams.rb +185 -0
  747. data/lib/studium/utility_scripts/random_curriculum_creator.rb +173 -0
  748. data/lib/studium/utility_scripts/report_outdated_timetable_entries.rb +145 -0
  749. data/lib/studium/utility_scripts/report_total_amount_of_questions_and_answers_for.rb +114 -0
  750. data/lib/studium/utility_scripts/report_whether_this_lecture_is_registered_in_the_file_lecture_information.rb +120 -0
  751. data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/individual_resolve_practical_courses_date_conflicts.rb +255 -0
  752. data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/resolve_practical_courses_date_conflicts.rb +278 -0
  753. data/lib/studium/utility_scripts/scrape_remote_university_url.rb +137 -0
  754. data/lib/studium/utility_scripts/semester_schedule_creator/semester_container.rb +155 -0
  755. data/lib/studium/utility_scripts/semester_schedule_creator/semester_schedule_creator.rb +399 -0
  756. data/lib/studium/utility_scripts/semesterplaner.rb +275 -0
  757. data/lib/studium/utility_scripts/show_all_lectures.rb +407 -0
  758. data/lib/studium/utility_scripts/show_all_passed_master_lectures.rb +141 -0
  759. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/constants.rb +56 -0
  760. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/do_report_the_upcoming_exams.rb +60 -0
  761. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/help.rb +48 -0
  762. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/initialize.rb +28 -0
  763. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/menu.rb +54 -0
  764. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/misc.rb +214 -0
  765. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/report.rb +115 -0
  766. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/reset.rb +80 -0
  767. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/run.rb +22 -0
  768. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb +641 -0
  769. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/constants.rb +28 -0
  770. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/menu.rb +62 -0
  771. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/reset.rb +36 -0
  772. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/run.rb +35 -0
  773. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/show_descriptions_of_lectures_belonging_to_this_module.rb +145 -0
  774. data/lib/studium/utility_scripts/show_lecturers/show_lecturers.rb +164 -0
  775. data/lib/studium/utility_scripts/show_lectures/constants.rb +16 -0
  776. data/lib/studium/utility_scripts/show_lectures/help.rb +34 -0
  777. data/lib/studium/utility_scripts/show_lectures/initialize.rb +23 -0
  778. data/lib/studium/utility_scripts/show_lectures/menu.rb +106 -0
  779. data/lib/studium/utility_scripts/show_lectures/misc.rb +573 -0
  780. data/lib/studium/utility_scripts/show_lectures/reset.rb +92 -0
  781. data/lib/studium/utility_scripts/show_lectures/run.rb +27 -0
  782. data/lib/studium/utility_scripts/show_lectures/show_lectures.rb +48 -0
  783. data/lib/studium/utility_scripts/show_lectures_fitting_to_this_language.rb +129 -0
  784. data/lib/studium/utility_scripts/show_lectures_fitting_to_this_theme.rb +122 -0
  785. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/commandline.rb +43 -0
  786. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/constants.rb +26 -0
  787. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/help.rb +39 -0
  788. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/html.rb +95 -0
  789. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/initialize.rb +36 -0
  790. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/menu.rb +92 -0
  791. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/reset.rb +28 -0
  792. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/run.rb +21 -0
  793. data/lib/studium/utility_scripts/show_lectures_of_this_curriculum_as_table/show_lectures_of_this_curriculum_as_table.rb +205 -0
  794. data/lib/studium/utility_scripts/show_lectures_on_this_day.rb +152 -0
  795. data/lib/studium/utility_scripts/show_lva_dates_of_this_lecture.rb +175 -0
  796. data/lib/studium/utility_scripts/show_outdated_lva_dates.rb +218 -0
  797. data/lib/studium/utility_scripts/show_solved_english_lectures.rb +139 -0
  798. data/lib/studium/utility_scripts/show_the_associated_lectures_for_the_individual_curriculum.rb +286 -0
  799. data/lib/studium/utility_scripts/studienkennzahl.rb +104 -0
  800. data/lib/studium/utility_scripts/studium_skeleton.rb +221 -0
  801. data/lib/studium/utility_scripts/stundenplan.rb +605 -0
  802. data/lib/studium/utility_scripts/sync_studium_relevant_entries_one_level_downwards.rb +224 -0
  803. data/lib/studium/utility_scripts/ufind.rb +118 -0
  804. data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/constants.rb +28 -0
  805. data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/upcoming_mandatory_presence_courses.rb +182 -0
  806. data/lib/studium/utility_scripts/vorbesprechungen.rb +295 -0
  807. data/lib/studium/utility_scripts/week_parser/constants.rb +30 -0
  808. data/lib/studium/utility_scripts/week_parser/help.rb +30 -0
  809. data/lib/studium/utility_scripts/week_parser/menu.rb +56 -0
  810. data/lib/studium/utility_scripts/week_parser/misc.rb +73 -0
  811. data/lib/studium/utility_scripts/week_parser/reset.rb +39 -0
  812. data/lib/studium/utility_scripts/week_parser/run.rb +18 -0
  813. data/lib/studium/utility_scripts/week_parser/show.rb +240 -0
  814. data/lib/studium/utility_scripts/week_parser/week_parser.rb +359 -0
  815. data/lib/studium/utility_scripts/weekday_parser.rb +157 -0
  816. data/lib/studium/utility_scripts/weekly_schedule.rb +217 -0
  817. data/lib/studium/utility_scripts/wochenplanung.rb +275 -0
  818. data/lib/studium/version/version.rb +46 -0
  819. data/lib/studium/www/curricula_displayer.cgi +172 -0
  820. data/lib/studium/www/curriculum_displayer.rb +162 -0
  821. data/lib/studium/www/exams.cgi +50 -0
  822. data/lib/studium/www/statistics.cgi +53 -0
  823. data/lib/studium/yaml/allowed_themes_for_exams.yml +244 -0
  824. data/lib/studium/yaml/array_allowed_entries_for_the_file_lecture_information.yml +64 -0
  825. data/lib/studium/yaml/backlog_of_exams.yml +35 -0
  826. data/lib/studium/yaml/current_exams.yml +19 -0
  827. data/lib/studium/yaml/curricula.yml +530 -0
  828. data/lib/studium/yaml/curricula/README.md +3 -0
  829. data/lib/studium/yaml/curricula/bachelor_agrarwissenschaften_033255.yml +130 -0
  830. data/lib/studium/yaml/curricula/bachelor_biologie_basisblock_033630.yml +65 -0
  831. data/lib/studium/yaml/curricula/bachelor_biologie_botanik_033630.yml +84 -0
  832. data/lib/studium/yaml/curricula/bachelor_biologie_ecology_033630.yml +74 -0
  833. data/lib/studium/yaml/curricula/bachelor_biologie_mikrobiologie_und_genetik_033630.yml +120 -0
  834. data/lib/studium/yaml/curricula/bachelor_biologie_molekulare_biologie_033630.yml +104 -0
  835. data/lib/studium/yaml/curricula/bachelor_biologie_zoologie_033630.yml +87 -0
  836. data/lib/studium/yaml/curricula/bachelor_chemie_033662.yml +164 -0
  837. data/lib/studium/yaml/curricula/bachelor_dummy_curriculum.yml +135 -0
  838. data/lib/studium/yaml/curricula/bachelor_elektrotechnik_und_informationstechnik_033235.yml +13 -0
  839. data/lib/studium/yaml/curricula/bachelor_forstwirtschaft_033225.yml +105 -0
  840. data/lib/studium/yaml/curricula/bachelor_informatik_033521.yml +130 -0
  841. data/lib/studium/yaml/curricula/bachelor_informatik_und_molekulare_biologie.yml +1144 -0
  842. data/lib/studium/yaml/curricula/bachelor_ktww_033231.yml +84 -0
  843. data/lib/studium/yaml/curricula/bachelor_lmbt_033217.yml +108 -0
  844. data/lib/studium/yaml/curricula/bachelor_medizinische_informatik_033533.yml +200 -0
  845. data/lib/studium/yaml/curricula/bachelor_molekularbiologie_033665.yml +93 -0
  846. data/lib/studium/yaml/curricula/bachelor_nutrition_science_033638.yml +117 -0
  847. data/lib/studium/yaml/curricula/bachelor_pharmazie_033305.yml +170 -0
  848. data/lib/studium/yaml/curricula/bachelor_technische_chemie_033290.yml +129 -0
  849. data/lib/studium/yaml/curricula/bachelor_technische_informatik_033535.yml +23 -0
  850. data/lib/studium/yaml/curricula/bachelor_ubrm_033227.yml +140 -0
  851. data/lib/studium/yaml/curricula/bachelor_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +1157 -0
  852. data/lib/studium/yaml/curricula/bachelor_verfahrenstechnik_033273.yml +167 -0
  853. data/lib/studium/yaml/curricula/bachelor_wirtschaftsinformatik_033526.yml +29 -0
  854. data/lib/studium/yaml/curricula/master_bioinformatics_and_molecular_biotechnology_including_aspects_from_molecular_medicine.yml +438 -0
  855. data/lib/studium/yaml/curricula/master_bioinformatik_066875.yml +76 -0
  856. data/lib/studium/yaml/curricula/master_biologie_molekulare_mikrobiologie_mikrobielle_oekologie_und_immunbiologie_066830.yml +78 -0
  857. data/lib/studium/yaml/curricula/master_biologische_chemie_066863.yml +61 -0
  858. data/lib/studium/yaml/curricula/master_dummy_curriculum.yml +137 -0
  859. data/lib/studium/yaml/curricula/master_food_science_and_plant_biotechnology.yml +30 -0
  860. data/lib/studium/yaml/curricula/master_genetik_und_entwicklungsbiologie_066877.yml +90 -0
  861. data/lib/studium/yaml/curricula/master_lmbt_066418.yml +65 -0
  862. data/lib/studium/yaml/curricula/master_molekulare_biologie_066834.yml +142 -0
  863. data/lib/studium/yaml/curricula/master_pharmazie_066605.yml +170 -0
  864. data/lib/studium/yaml/curricula/master_technische_chemie_066490.yml +123 -0
  865. data/lib/studium/yaml/curricula/master_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +740 -0
  866. data/lib/studium/yaml/custom_colours.yml +17 -0
  867. data/lib/studium/yaml/daily_questions_solved.yml +909 -0
  868. data/lib/studium/yaml/default_delay.yml +4 -0
  869. data/lib/studium/yaml/default_encoding.yml +1 -0
  870. data/lib/studium/yaml/directory_to_the_exam_topics.yml +0 -0
  871. data/lib/studium/yaml/editor.yml +1 -0
  872. data/lib/studium/yaml/file_for_exam_questions.yml +1 -0
  873. data/lib/studium/yaml/german/README.md +2 -0
  874. data/lib/studium/yaml/german/german_to_english_month_names.yml +12 -0
  875. data/lib/studium/yaml/grouped_themes.yml +187 -0
  876. data/lib/studium/yaml/holidays.yml +177 -0
  877. data/lib/studium/yaml/important_exams.yml +192 -0
  878. data/lib/studium/yaml/inscription_dates_of_universities.yml +56 -0
  879. data/lib/studium/yaml/lecture_aliases.yml +108 -0
  880. data/lib/studium/yaml/lecture_information.yml +47796 -0
  881. data/lib/studium/yaml/log_dir.yml +1 -0
  882. data/lib/studium/yaml/main_topic.yml +11 -0
  883. data/lib/studium/yaml/max_stats.yml +227 -0
  884. data/lib/studium/yaml/mitteilungsbl/303/244tter.yml +315 -0
  885. data/lib/studium/yaml/n_total_questions.yml +1 -0
  886. data/lib/studium/yaml/participating_in_these_courses.yml +44 -0
  887. data/lib/studium/yaml/rename_konsole_tab.yml +1 -0
  888. data/lib/studium/yaml/show_topic.yml +1 -0
  889. data/lib/studium/yaml/statistics.yml +57 -0
  890. data/lib/studium/yaml/use_colours.yml +1 -0
  891. data/studium.gemspec +93 -0
  892. data/test/testing_studium.rb +243 -0
  893. data/test/testing_time_component.rb +29 -0
  894. metadata +1131 -0
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ module Studium
6
+
7
+ class ExamsPerMonth < Base # === Studium::ExamsPerMonth.new
8
+
9
+ # ========================================================================= #
10
+ # === run
11
+ # ========================================================================= #
12
+ def run
13
+ sanitize_dataset
14
+ check_against_menu
15
+ report if @shall_we_report
16
+ end
17
+
18
+ end; end
@@ -0,0 +1,129 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'studium/exams_per_month/sanitize.rb'
6
+ # =========================================================================== #
7
+ require 'studium/base/base.rb'
8
+
9
+ module Studium
10
+
11
+ class ExamsPerMonth < Base # === Studium::ExamsPerMonth
12
+
13
+ # ========================================================================= #
14
+ # === sanitize_dataset
15
+ #
16
+ # Purpose of this method is to give us a sorted hash with the specific
17
+ # entries. In order for this to work, simply pass in your dataset into
18
+ # this method. By default, we will use the dataset? object, which
19
+ # is essentially just the @dataset instance variable.
20
+ #
21
+ # The initial dataset should have 6 entries, thus 5 occurrences of '|'.
22
+ #
23
+ # Example for such a dataset/line:
24
+ #
25
+ # "06.07.2018 | 1.0 | 1.0 | 1 | UniWien | M | VO | 270073 | 2018S | Nukleinsäureanalytik-Genomics"
26
+ #
27
+ # ========================================================================= #
28
+ def sanitize_dataset(
29
+ i = dataset?,
30
+ modify_time_entry = true
31
+ )
32
+ @n_ects_points_belonging_to_mandatory_presence_courses = 0 # Reset it here.
33
+ case modify_time_entry
34
+ when :leave_time_entry_alone
35
+ modify_time_entry = false
36
+ end
37
+ # ======================================================================= #
38
+ # Re-assign the @dataset here.
39
+ # ======================================================================= #
40
+ @dataset = i.map {|entry|
41
+ if entry.is_a? Array
42
+ splitted = entry
43
+ else
44
+ # =================================================================== #
45
+ # Ensure that the encoding is proper here.
46
+ # =================================================================== #
47
+ encoding_to_use = ::Studium.encoding?
48
+ unless entry.encoding.to_s.include? encoding_to_use
49
+ entry = entry.force_encoding(encoding_to_use)
50
+ end
51
+ splitted = entry.split(' | ') # .reverse
52
+ end
53
+ if splitted.size <= 2 # Assume this to be an invalid entry.
54
+ splitted = nil
55
+ else
56
+ # =================================================================== #
57
+ # Modify the time-entry which is the first entry.
58
+ # We don't need the day, only the specific month. But this is not
59
+ # always wanted, so we also must honour an option passed into this
60
+ # method.
61
+ # =================================================================== #
62
+ if modify_time_entry
63
+ formatted_time = splitted[0].split('.')[1..-1].join('.') # This entry is now something such as "10.2001"
64
+ splitted[0] = formatted_time
65
+ end
66
+ # =================================================================== #
67
+ # === Compare only specific years
68
+ #
69
+ # If the user wants to compare only specific years, we enter
70
+ # the next section.
71
+ # =================================================================== #
72
+ if @compare_these_numbers and formatted_time
73
+ the_year = formatted_time.split('.').last.to_i
74
+ unless @compare_these_numbers.include? the_year
75
+ splitted = nil
76
+ end
77
+ end
78
+ end
79
+ splitted
80
+ }
81
+ @dataset.compact! # Weed out nil-values.
82
+ @n_exams_passed = 0
83
+ # ======================================================================= #
84
+ # Next we populate our hash, which is used to report stuff.
85
+ #
86
+ # We will store the amount of hours passed, the amount of ECTS points
87
+ # that were achieved, and count up for the amount of exams that were
88
+ # passed.
89
+ # ======================================================================= #
90
+ @dataset.each {|entry|
91
+ entry.map!(&:strip)
92
+ month_and_year = entry[0] # Month and Year is the first entry.
93
+ n_hours = entry[1].to_f # n hours is the second entry.
94
+ n_ects_points = entry[2].to_f # n ects points is the third entry.
95
+ # ===================================================================== #
96
+ # The grade is a bit problematic. It has to be kept as an Array.
97
+ # ===================================================================== #
98
+ grade = entry[3] # The grade, the fourth entry. Can be 1,2,3,4,5 or '+'.
99
+ university = entry[4].strip.downcase # The university at fifth position.
100
+ _curriculum_type = entry[5].strip # The curriculum type such as Bachelor or Master. Currently not used here.
101
+ lecture_type = entry[6].strip # The lecture type such as VO, UE, VU, SE.
102
+ if is_a_prüfungsimmanent_course?(lecture_type)
103
+ @n_ects_points_belonging_to_mandatory_presence_courses += n_ects_points
104
+ end
105
+ @n_exams_passed += 1
106
+ # ===================================================================== #
107
+ # === Put the dataset into the @hash instance variable next
108
+ # ===================================================================== #
109
+ if @hash.has_key? month_and_year
110
+ # =================================================================== #
111
+ # In this case, add it because we already did initialize it.
112
+ # =================================================================== #
113
+ new_n_hours = @hash[month_and_year][0]+n_hours
114
+ new_n_ects_points = @hash[month_and_year][1]+n_ects_points
115
+ array_grade = @hash[month_and_year][2] << grade
116
+ @hash[month_and_year] = [
117
+ new_n_hours, new_n_ects_points, array_grade, university, @n_exams_passed
118
+ ]
119
+ else # Else simply append it, as it is a new month.
120
+ @n_exams_passed = 0 # And reset it here again.
121
+ @n_exams_passed += 1 # Must be at least one.
122
+ @hash[month_and_year] = [
123
+ n_hours, n_ects_points, [grade], university, @n_exams_passed
124
+ ]
125
+ end
126
+ }
127
+ end
128
+
129
+ end; end
@@ -0,0 +1,1278 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'studium/exams_per_month/show_and_report.rb'
6
+ # =========================================================================== #
7
+ require 'studium/ects/n_ects_points_in_mandatory_presence_courses.rb'
8
+ require 'studium/ects/ects_per_university.rb'
9
+
10
+ module Studium
11
+
12
+ class ExamsPerMonth < Base # === Studium::ExamsPerMonth.new
13
+
14
+ # ========================================================================= #
15
+ # === calculate_the_average_amount_per_passed_exam
16
+ # ========================================================================= #
17
+ def calculate_the_average_amount_per_passed_exam
18
+ ects_per_exams_passed = # This is: total ects / n_exams
19
+ (
20
+ @n_ects_points_in_total.to_f / @n_exams_in_total_passed.to_f
21
+ ).round(2)
22
+ return ects_per_exams_passed
23
+ end
24
+
25
+ # ========================================================================= #
26
+ # === show_half_split_exams_per_year
27
+ #
28
+ # This method can be used to show how many exams were passed, per
29
+ # year, in each half of that year.
30
+ #
31
+ # Invocation example:
32
+ # emo --half-split
33
+ # ========================================================================= #
34
+ def show_half_split_exams_per_year
35
+ array_early_months = %w( 1 2 3 4 5 6 ).map(&:to_i)
36
+ array_late_months = %w( 7 8 9 10 11 12 ).map(&:to_i)
37
+ hash = {}
38
+ raw_dataset?.each {|this_line|
39
+ splitted = this_line.strip.split('|').map(&:strip)
40
+ first_element = splitted.first # e. g. '25.11.1997'
41
+ n_ects = splitted[2].to_f
42
+ year = first_element.split('.').last
43
+ hash[year] = {
44
+ :early_months => 0,
45
+ :late_months => 0
46
+ } unless hash.has_key? year
47
+ month = first_element.split('.')[1].to_i
48
+ if array_early_months.include? month
49
+ hash[year][:early_months] += n_ects
50
+ elsif array_late_months.include? month
51
+ hash[year][:late_months] += n_ects
52
+ end
53
+ }
54
+ # ======================================================================= #
55
+ # Next, we will display that Hash, but only if we have any ECTS
56
+ # points to report..
57
+ # ======================================================================= #
58
+ hash.each_pair {|year, value|
59
+ n_ljust = 28
60
+ first_half_ects_points = value[:early_months].to_f
61
+ second_half_ects_points = value[:late_months].to_f
62
+ unless ( (first_half_ects_points == 0) and (second_half_ects_points == 0) )
63
+ e slateblue(year+':')
64
+ e
65
+ if first_half_ects_points > 0
66
+ e (' Start of the year '+year+': ').ljust(n_ljust)+
67
+ orange(first_half_ects_points.to_s.rjust(4)+' ECTS points')
68
+ end
69
+ if second_half_ects_points > 0
70
+ e (' End of the year '+year+':').ljust(n_ljust)+
71
+ orange(second_half_ects_points.to_s.rjust(4)+' ECTS points')
72
+ end
73
+ e
74
+ end
75
+ }
76
+ end
77
+
78
+ # ========================================================================= #
79
+ # === do_show_only_this_year_here
80
+ #
81
+ # Use this method if you only want to show a specific year, such as
82
+ # 2013 or 2017 and so forth.
83
+ # ========================================================================= #
84
+ def do_show_only_this_year_here(i)
85
+ @show_only_this_year = i # This variable may also contain a '-' character.
86
+ # ======================================================================= #
87
+ # Next, select only these entries from the dataset that have
88
+ # a matching year entry.
89
+ # ======================================================================= #
90
+ _ = dataset?.select {|entry| # === emo --year=1997-2009
91
+ the_year = entry.first.strip.split('.').last.to_s
92
+ is_it_included = false
93
+ is_it_included = true if @show_only_this_year == the_year
94
+ # =================================================================== #
95
+ # === Range input
96
+ #
97
+ # First, handle '-' input given.
98
+ # =================================================================== #
99
+ if @show_only_this_year.include? '-'
100
+ # ================================================================= #
101
+ # Then we turn it into a range, in order to look whether the
102
+ # year is within that given Range.
103
+ # ================================================================= #
104
+ range = Range.new(*@show_only_this_year.split('-').map(&:to_i))
105
+ if range.include? the_year.to_i # Since we work with numbers past this point.
106
+ is_it_included = true
107
+ end
108
+ end
109
+ is_it_included
110
+ }
111
+ reset_main_hash # Empty @hash again.
112
+ sanitize_dataset(_, :leave_time_entry_alone)
113
+ end
114
+
115
+ # ========================================================================= #
116
+ # === show_only_exams_at_the_vetmed_uni
117
+ #
118
+ # Invoke this method like so:
119
+ # emo --vetmed
120
+ # ========================================================================= #
121
+ def show_only_exams_at_the_vetmed_uni
122
+ opnn; e 'Showing all exams passed at the Vetmed Uni.'
123
+ _ = dataset?.select {|entry|
124
+ name_of_university = entry[4]
125
+ (name_of_university.strip.downcase == 'vetmed')
126
+ }
127
+ reset_main_hash
128
+ sanitize_dataset(_, :leave_time_entry_alone)
129
+ end
130
+
131
+ # ========================================================================= #
132
+ # === show_numbered_exams
133
+ #
134
+ # This method will output the passed exams.
135
+ #
136
+ # To output this method, try this:
137
+ # emo --show-numbered-exams
138
+ # emo --reversed-nl
139
+ # ========================================================================= #
140
+ def show_numbered_exams(normal_or_reversed = :normal)
141
+ dataset = File.readlines(csv_file?).reject {|entry|
142
+ entry.start_with? '#'
143
+ }.reject {|entry|
144
+ entry.to_s.strip.empty?
145
+ }
146
+ size_of_the_dataset = dataset.size
147
+ e; dataset.each_with_index {|line, index|
148
+ index += 1
149
+ if normal_or_reversed == :reversed
150
+ index = (size_of_the_dataset - index)+1
151
+ end
152
+ e ' '+orange(index.to_s.rjust(4))+') '+simp(line.chomp)
153
+ }; e
154
+ end
155
+
156
+ # ========================================================================= #
157
+ # === show_only_exams_at_the_uniwien
158
+ #
159
+ # Invoke this method like so:
160
+ # emo --uniwien
161
+ # ========================================================================= #
162
+ def show_only_exams_at_the_uniwien
163
+ opnn; e 'Showing all exams passed at the UniWien.'
164
+ _ = dataset?.select {|entry|
165
+ name_of_university = entry[4]
166
+ (name_of_university.strip.downcase == 'uniwien')
167
+ }
168
+ reset_main_hash
169
+ sanitize_dataset(_, :leave_time_entry_alone)
170
+ end
171
+
172
+ # ========================================================================= #
173
+ # === show_only_exams_at_the_meduni
174
+ #
175
+ # Invoke this method like so:
176
+ # emo --meduni
177
+ # ========================================================================= #
178
+ def show_only_exams_at_the_meduni
179
+ opnn; e 'Showing all exams passed at the MedUni Wien.'
180
+ _ = dataset?.select {|entry|
181
+ name_of_university = entry[4]
182
+ (name_of_university.strip.downcase == 'meduni')
183
+ }
184
+ reset_main_hash
185
+ sanitize_dataset(_, :leave_time_entry_alone)
186
+ end
187
+
188
+ # ========================================================================= #
189
+ # === show_all_exams_from_this_month
190
+ #
191
+ # Use this method to show all exams from a given month only.
192
+ #
193
+ # We also support english names for the months, since as of April 2017.
194
+ #
195
+ # Usage example:
196
+ # emo --januar
197
+ # ========================================================================= #
198
+ def show_all_exams_from_this_month(i = 'januar')
199
+ i.delete!('-') if i.include? '-'
200
+ i.downcase!
201
+ # ======================================================================= #
202
+ # Next, sanitize the month.
203
+ # ======================================================================= #
204
+ case i # case tag
205
+ when 'januar','january'
206
+ i = '01'
207
+ when 'februar','february',/feb/
208
+ i = '02'
209
+ when 'märz','march'
210
+ i = '03'
211
+ when 'april'
212
+ i = '04'
213
+ when 'mai','may'
214
+ i = '05'
215
+ when 'juni','june'
216
+ i = '06'
217
+ when 'juli','july'
218
+ i = '07'
219
+ when 'august'
220
+ i = '08'
221
+ when 'september'
222
+ i = '09'
223
+ when 'oktober','october'
224
+ i = '10'
225
+ when 'november'
226
+ i = '11'
227
+ when 'dezember','december'
228
+ i = '12'
229
+ end
230
+ _ = dataset?.select {|inner_array|
231
+ month_and_year = inner_array.first
232
+ splitted = month_and_year.split('.')
233
+ month = splitted.first
234
+ month == i
235
+ }
236
+ reset_main_hash
237
+ sanitize_dataset(_, :leave_time_entry_alone)
238
+ end
239
+
240
+ # ========================================================================= #
241
+ # === show_only_practical_courses_that_were_passed_already
242
+ #
243
+ # Use this method if you wish to show only practical courses that
244
+ # were passed already.
245
+ #
246
+ # The currently acknowledged practical courses include UE, PR and LU.
247
+ #
248
+ # Invocation example:
249
+ # emo --übungen
250
+ # ========================================================================= #
251
+ def show_only_practical_courses_that_were_passed_already
252
+ @show_average_ects_passed_per_exam = false # This method won't report average amount of ECTS per exam.
253
+ _ = dataset?
254
+ _.select! {|entry|
255
+ type_of_lecture = entry[6].strip
256
+ type_of_lecture.include?('UE') or
257
+ type_of_lecture.include?('PR') or
258
+ type_of_lecture.include?('LU')
259
+ }
260
+ reset_main_hash
261
+ sanitize_dataset(_, :leave_time_entry_alone)
262
+ report_main_hash
263
+ end
264
+
265
+ # ========================================================================= #
266
+ # === show_exam_ects_points_passed_per_semester
267
+ # ========================================================================= #
268
+ def show_exam_ects_points_passed_per_semester
269
+ # ======================================================================= #
270
+ # First, we need a way to group months into "sommersemester" or
271
+ # "wintersemester.
272
+ # ======================================================================= #
273
+ hash = {}
274
+ _ = dataset?
275
+ opnn; e 'We will next show how many exams were passed in a given semester.'
276
+ # ======================================================================= #
277
+ # Each entry in the dataset looks like this:
278
+ # ["10.2001", "3.0"," xxx","4", "UniWien", " D ", " 898249 ","Allgemeine Biologie III"],
279
+ # SWS ECTS
280
+ # And it is already sorted.
281
+ # ======================================================================= #
282
+ _.each {|inner_array|
283
+ _n_wochenstunden = inner_array[1]
284
+ n_ects_points = inner_array[2]
285
+ _name_of_the_lecture = inner_array.last
286
+ month_year = inner_array.first
287
+ year = month_year.dup
288
+ if month_year.include? '.'
289
+ splitted = month_year.split('.')
290
+ month_year = splitted.first
291
+ year = splitted.last.to_i
292
+ end
293
+ sommersemester_or_wintersemester = is_this_sommersemester_or_wintersemester?(
294
+ month_year
295
+ )
296
+ # ======================================================================= #
297
+ # Note that the Wintersemester may be from the last year, so we
298
+ # may have to deduct 1. This will be the case only for January
299
+ # and February though.
300
+ # ======================================================================= #
301
+ month_as_number = month_year.split('.').first.to_i
302
+ if (sommersemester_or_wintersemester == 'WS') and
303
+ [1,2].include?(month_as_number)
304
+ year -= 1
305
+ end
306
+ # ======================================================================= #
307
+ # Every time a toggle from SS to WS happens, we populate it into
308
+ # another Hash. Note that we only care for when the exam was
309
+ # officially registered and simply count this as a "sommersemester"
310
+ # or "wintersemester" lecture.
311
+ # ======================================================================= #
312
+ hash_key_to_use = sommersemester_or_wintersemester+' '+year.to_s
313
+ if hash.has_key? hash_key_to_use # Then add to it.
314
+ hash[hash_key_to_use] = hash[hash_key_to_use]+n_ects_points.to_f
315
+ else
316
+ hash[hash_key_to_use] = n_ects_points.to_f
317
+ end
318
+ }
319
+ e 'We have determined these ECTS points per semester:'; e
320
+ hash.each_pair {|semester_and_year, n_ects_points|
321
+ e ' '+simp(semester_and_year.ljust(8))+' '+
322
+ sfancy(((n_ects_points.to_s.rjust(4))+' ECTS').rjust(8))
323
+ }
324
+ e; e 'Total ECTS points: '+simp(hash.values.sum.to_s)
325
+ end
326
+
327
+ # ========================================================================= #
328
+ # === show_only_exams_before_this_date
329
+ #
330
+ # The argument to this method should be the starting time, the day at
331
+ # which you wish to keep track of exams made BEFORE this date.
332
+ #
333
+ # To invoke this method, do:
334
+ # emo "before 10.01.2011"
335
+ # ========================================================================= #
336
+ def show_only_exams_before_this_date(this_date)
337
+ unless this_date.include? '.'
338
+ this_date.prepend('01.01.') # In this case, we assume this to mean the first January.
339
+ end
340
+ opnn; e 'Showing only passed exams before the date '+simp(this_date.to_s)+'.'
341
+ # ======================================================================= #
342
+ # Convert a String into a time object.
343
+ # ======================================================================= #
344
+ this_date = Time.parse(this_date) if this_date.is_a? String
345
+ a = this_date # Shorter to type. :)
346
+ _ = dataset?
347
+ new_array_with_matches = []
348
+ _.each {|entry|
349
+ date = Time.parse('01.'+entry.first.strip) # Must insert date here.
350
+ b = date
351
+ if a > b
352
+ new_array_with_matches << entry
353
+ end
354
+ }
355
+ reset_main_hash
356
+ sanitize_dataset(new_array_with_matches, :leave_time_entry_alone)
357
+ end
358
+
359
+ # ========================================================================= #
360
+ # === show_only_bachelor_exams
361
+ #
362
+ # Use this method to show only exams relevant for the Bachelor.
363
+ #
364
+ # Invocation example:
365
+ # emo --show-only-bachelor
366
+ # ========================================================================= #
367
+ def show_only_bachelor_exams
368
+ opnn; e 'Showing only Bachelor exams.'
369
+ _ = dataset?.select {|entry|
370
+ curriculum_type = entry[5].strip # The sixth entry is the bachelor/master distinction.
371
+ curriculum_type.include? 'B'
372
+ }
373
+ reset_main_hash
374
+ sanitize_dataset(_, :leave_time_entry_alone)
375
+ end
376
+
377
+ # ========================================================================= #
378
+ # === show_only_master_lectures
379
+ #
380
+ # This method is tasked to show only master lectures. For this purpose,
381
+ # we define a lecture to be a "master" lecture if it is part of at the
382
+ # least one master-curriculum. With this definition, a lecture that
383
+ # is registered in both a bachelor and a master curriculum, will
384
+ # satisfy this defintion and thus be listed.
385
+ #
386
+ # We will take the file passed_exams_per_month.csv for this.
387
+ #
388
+ # That file will have entries such as:
389
+ #
390
+ # 28.11.2016 | 3.0 | 6.0 | 1 | UniWien | M | 330011 | Zell- und Molekularbiologie
391
+ #
392
+ # So we can pick field number 6. If that field has an upcased 'M' then
393
+ # it qualifies.
394
+ #
395
+ # To invoke this method from the commandline, do:
396
+ # emo --show-only-master-lectures
397
+ # ========================================================================= #
398
+ def show_only_master_lectures
399
+ _ = @dataset.select {|array|
400
+ bachelor_or_master_curriculum = array[5].strip
401
+ bachelor_or_master_curriculum.include? 'M'
402
+ }
403
+ total_ects_points = 0
404
+ e
405
+ _.each_with_index {|lecture_data, index|
406
+ index += 1
407
+ n_ects = lecture_data[2]
408
+ total_ects_points += n_ects.to_f
409
+ name_of_the_lecture = lecture_data.last
410
+ leistung_erbracht_am = lecture_data.first
411
+ which_university = mediumturquoise(lecture_data[4])
412
+ show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
413
+ index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
414
+ )
415
+ }
416
+ report_total_amount_of_ects_points(total_ects_points, :master)
417
+ end
418
+
419
+ # ========================================================================= #
420
+ # === show_only_bachelor_lectures
421
+ #
422
+ # As the variant for master lectures, just for bachelor lectures.
423
+ #
424
+ # To invoke it, do:
425
+ # emo --show-only-bachelor-lectures
426
+ # ========================================================================= #
427
+ def show_only_bachelor_lectures
428
+ _ = @dataset.select {|array|
429
+ bachelor_or_master_curriculum = array[5].strip
430
+ bachelor_or_master_curriculum.include? 'B'
431
+ }
432
+ total_ects_points = 0
433
+ e
434
+ _.each_with_index {|lecture_data, index|
435
+ index += 1
436
+ n_ects = lecture_data[2]
437
+ total_ects_points += n_ects.to_f
438
+ name_of_the_lecture = lecture_data.last
439
+ leistung_erbracht_am = lecture_data.first
440
+ which_university = mediumturquoise(lecture_data[4])
441
+ show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
442
+ index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
443
+ )
444
+ }
445
+ report_total_amount_of_ects_points(total_ects_points, :bachelor)
446
+ end
447
+
448
+ # ========================================================================= #
449
+ # === report_total_amount_of_ects_points
450
+ # ========================================================================= #
451
+ def report_total_amount_of_ects_points(
452
+ total_ects_points,
453
+ bachelor_or_master = :bachelor,
454
+ ljust_to_use = 41 # Reason for this value is so that it aligns.
455
+ )
456
+ bachelor_or_master = bachelor_or_master.to_s.capitalize # Capitalization is nicer.
457
+ e
458
+ e 'Total ECTS points from '+bachelor_or_master+' lectures: '.
459
+ ljust(ljust_to_use)+
460
+ slateblue(total_ects_points.to_s+' ECTS')
461
+ e
462
+ end
463
+
464
+ # ========================================================================= #
465
+ # === show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university
466
+ #
467
+ # This long compound method is only used from within the following two
468
+ # methods:
469
+ #
470
+ # show_only_bachelor_lectures
471
+ # show_only_master_lectures
472
+ #
473
+ # ========================================================================= #
474
+ def show_number_then_name_of_the_lecture_then_n_ECTS_points_then_leistung_erbracht_then_which_university(
475
+ index, name_of_the_lecture, n_ects, leistung_erbracht_am, which_university
476
+ )
477
+ e lightgreen((index.to_s+')').rjust(6))+' '+
478
+ orange(name_of_the_lecture.ljust(74))+' '+
479
+ slateblue(n_ects.to_s+' ECTS')+crimson(
480
+ ' '+leistung_erbracht_am.to_s
481
+ )+' '+which_university
482
+ end
483
+
484
+ # ========================================================================= #
485
+ # === show_only_exams_past_this_date
486
+ #
487
+ # The argument to this method should be the starting time, the day at
488
+ # which you wish to keep track of exams made afterwards.
489
+ #
490
+ # To invoke this method, do:
491
+ # emo "since 10.02.2014"
492
+ # ========================================================================= #
493
+ def show_only_exams_past_this_date(this_date)
494
+ unless this_date.include? '.'
495
+ this_date.prepend('01.01.') # In this case, we assume this to mean the first January.
496
+ end
497
+ # ======================================================================= #
498
+ # The variable this_date will be something like "18.08.2013".
499
+ # ======================================================================= #
500
+ opnn; e 'Showing only passed exams past the date '+simp(this_date.to_s)+'.'
501
+ # ======================================================================= #
502
+ # Convert a String into a time object.
503
+ # ======================================================================= #
504
+ this_date = Time.parse(this_date) if this_date.is_a? String
505
+ a = this_date # Shorter to type. :)
506
+ _ = dataset?
507
+ new_array_with_matches = []
508
+ _.each {|entry|
509
+ # ======================================================================= #
510
+ # We simply assume the first day of the given month next.
511
+ # ======================================================================= #
512
+ first = '01.'+entry.first.strip
513
+ date = Time.parse(first) # Must insert date here.
514
+ b = date
515
+ if a < b
516
+ new_array_with_matches << entry # Only add entries that are relevant.
517
+ end
518
+ }
519
+ reset_main_hash # Reset for a clean state again.
520
+ sanitize_dataset(new_array_with_matches, :leave_time_entry_alone)
521
+ end
522
+
523
+ # ========================================================================= #
524
+ # === show_only_exams_at_the_tu
525
+ #
526
+ # Show only exams at the TU.
527
+ # ========================================================================= #
528
+ def show_only_exams_at_the_tu
529
+ opnn; e 'Showing all exams passed at the TU.'
530
+ _ = dataset?.select {|entry|
531
+ name_of_university = entry[4]
532
+ (name_of_university.strip.downcase.start_with? 'tu')
533
+ }
534
+ reset_main_hash
535
+ sanitize_dataset(_, :leave_time_entry_alone)
536
+ end
537
+
538
+ # ========================================================================= #
539
+ # === do_show_the_grades_statistics
540
+ #
541
+ # Show all grade statistics.
542
+ #
543
+ # Invocation example:
544
+ # emo --grades
545
+ # ========================================================================= #
546
+ def do_show_the_grades_statistics
547
+ _ = dataset?
548
+ # ======================================================================= #
549
+ # The dataset will have entries such as:
550
+ # ["05.1998","2.0"," xxx","4","UniWien"," D "," 854623 ","1998W","Biologische Physik II (Physik für Biologen II)"]
551
+ # So for our purpose, we are only interested in entry at position
552
+ # 2, 3 and 4.
553
+ # ======================================================================= #
554
+ hash_containing_the_relevant_entries = {}
555
+ # ======================================================================= #
556
+ # The following data structures are of interest:
557
+ # - How many exams were passed for this grade
558
+ # - The total amount of ECTS points passed
559
+ # - The total amount of hours passed
560
+ # ======================================================================= #
561
+ hash_containing_the_relevant_entries[1] = [0,0,0]
562
+ hash_containing_the_relevant_entries[2] = [0,0,0]
563
+ hash_containing_the_relevant_entries[3] = [0,0,0]
564
+ hash_containing_the_relevant_entries[4] = [0,0,0]
565
+ # ======================================================================= #
566
+ # Iterate over the dataset.
567
+ # ======================================================================= #
568
+ _.each {|line|
569
+ this_grade = line[3].to_i
570
+ if this_grade == 0
571
+ # pp 'DEBUG'; pp line # For entries that have a '+' evaluation rather.
572
+ else
573
+ n_ects_points = line[1].to_f
574
+ n_hours = line[2].to_f
575
+ array = hash_containing_the_relevant_entries[this_grade]
576
+ array[0] += 1
577
+ array[1] += n_ects_points # For ECTS points.
578
+ array[2] += n_hours # For Semesterwochenstunden.
579
+ hash_containing_the_relevant_entries[this_grade] = array
580
+ end
581
+ }
582
+ e
583
+ e lightgreen('The grades that were passed successfully, are as follows:')
584
+ e
585
+ average_grade = 0
586
+ average_grade_weighted_by_ects_points = 0
587
+ n_total_exams = hash_containing_the_relevant_entries.values.map {|array|
588
+ array.first
589
+ }.sum
590
+ hash_containing_the_relevant_entries.each_pair {|grade, array_dataset|
591
+ n_exams_passed = array_dataset.first
592
+ total_n_ects_points = array_dataset[1]
593
+ total_n_hours = array_dataset.last
594
+ n_percent = (n_exams_passed.to_i * 100 / n_total_exams).round(3).to_s
595
+ e "For the grade #{simp(grade)} #{crimson(n_exams_passed.to_s)} "\
596
+ "exams were passed successfully. (#{crimson(n_percent.to_s+'%')})"
597
+ e " n ECTS points: #{mediumorchid(total_n_ects_points.to_s.rjust(5))}"
598
+ e " n hours: #{mediumpurple(total_n_hours.to_s.rjust(5))}"
599
+ e
600
+ }
601
+ hash = hash_containing_the_relevant_entries
602
+ average_grade = (1 * hash[1][0]+
603
+ 2 * hash[2][0]+
604
+ 3 * hash[3][0]+
605
+ 4 * hash[4][0])
606
+ total_n_ects_points = hash[1][1].to_f+
607
+ hash[2][1].to_f+
608
+ hash[3][1].to_f+
609
+ hash[4][1].to_f
610
+ average_grade_weighted_by_ects_points = (
611
+ 1 * hash[1][1].to_f+
612
+ 2 * hash[2][1].to_f+
613
+ 3 * hash[3][1].to_f+
614
+ 4 * hash[4][1].to_f
615
+ )
616
+ average_grade_weighted_by_ects_points =
617
+ average_grade_weighted_by_ects_points.to_f / total_n_ects_points.to_f # Gesamtzahl an ECTS
618
+ average_grade = average_grade.to_f / (
619
+ hash[1][0]+
620
+ hash[2][0]+
621
+ hash[3][0]+
622
+ hash[4][0]
623
+ ) # Have to divide it by the amount of exams.
624
+ average_grade = average_grade.round(2)
625
+ # ======================================================================= #
626
+ # Next, show some statistics.
627
+ # ======================================================================= #
628
+ e 'This means that the average grade is: '+
629
+ slateblue(average_grade.to_s)
630
+ e 'And the average grade, weighted per single (1.0) ECTS point, is: '+
631
+ lightblue(average_grade_weighted_by_ects_points.round(2).to_s)
632
+ e
633
+ end
634
+
635
+ # ========================================================================= #
636
+ # === show_how_many_exams_we_have_passed_in_this_curriculum
637
+ #
638
+ # This method will show how many exams we have already passed for
639
+ # a given curriculum xyz.
640
+ #
641
+ # To invoke this, do:
642
+ #
643
+ # emo --agrarwissenschaften
644
+ #
645
+ # ========================================================================= #
646
+ def show_how_many_exams_we_have_passed_in_this_curriculum(i)
647
+ require 'studium/lectures/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb'
648
+ i = i.to_s.delete('_')
649
+ _ = ::Studium::ShowLecturesOnTheCommandline.new(
650
+ i, :do_not_run_yet
651
+ )
652
+ _.do_not_report_anything
653
+ _.iterate_over_the_lectures
654
+ _.report_how_many_exams_have_been_passed_already
655
+ end
656
+
657
+ # ========================================================================= #
658
+ # === show_ects_passed_per_university
659
+ # ========================================================================= #
660
+ def show_ects_passed_per_university
661
+ Studium::EctsPerUniversity.new
662
+ end
663
+
664
+ # ========================================================================= #
665
+ # === set_n_exams_in_total_passed
666
+ # ========================================================================= #
667
+ def set_n_exams_in_total_passed(i)
668
+ @n_exams_in_total_passed = i.to_f
669
+ end
670
+
671
+ # ========================================================================= #
672
+ # === set_n_ects_points_in_total
673
+ # ========================================================================= #
674
+ def set_n_ects_points_in_total(i)
675
+ @n_ects_points_in_total = i.to_f
676
+ end
677
+
678
+ # ========================================================================= #
679
+ # === determine_n_ects_points_in_total
680
+ #
681
+ # The main Hash will look like this:
682
+ #
683
+ # {"07.2018"=>[9.0, 14.0, ["+", "4", "1", "1"], "uniwien", 4]
684
+ #
685
+ # The relevant ECTS entries are in the value part, at the second
686
+ # position, so [1].
687
+ # ========================================================================= #
688
+ def determine_n_ects_points_in_total
689
+ n_ects_points = @hash.values.map {|entry| entry[1] }.sum
690
+ set_n_ects_points_in_total(n_ects_points)
691
+ end
692
+
693
+ # ========================================================================= #
694
+ # === determine_n_exams_in_total_were_passed
695
+ # ========================================================================= #
696
+ def determine_n_exams_in_total_were_passed
697
+ n_exams = @hash.values.map {|entry| entry.last }.sum
698
+ set_n_exams_in_total_passed(n_exams)
699
+ end
700
+
701
+ # ========================================================================= #
702
+ # === show_the_years_in_a_short_table_overview
703
+ #
704
+ # To invoke this method, do:
705
+ # emo --years
706
+ # ========================================================================= #
707
+ def show_the_years_in_a_short_table_overview
708
+ total_ects = 0
709
+ _ = dataset? # Prepare the dataset a bit.
710
+ _.map! {|inner_array|
711
+ n_ects_points = inner_array[2] # Grab the amount of ECTS of this exam.
712
+ [inner_array[0].split('.').last, n_ects_points]
713
+ }
714
+ # ======================================================================= #
715
+ # Determine the current year automatically.
716
+ # ======================================================================= #
717
+ current_year = Date.today.year # 2017
718
+ total_ects_points_in_that_year = 0
719
+ e
720
+ e steelblue('Year')+
721
+ sfancy(' n ECTS points')
722
+ show_colourized_line
723
+ _.each {|year, n_ects_points|
724
+ year = year.to_i
725
+ n_ects_points = n_ects_points.to_f
726
+ total_ects += n_ects_points
727
+ if current_year == year
728
+ total_ects_points_in_that_year += n_ects_points
729
+ else
730
+ e ' '+
731
+ steelblue(( (current_year.to_s+': ') ).ljust(15))+
732
+ sfancy(total_ects_points_in_that_year.to_s.rjust(5)+' ECTS points')
733
+ total_ects_points_in_that_year = 0
734
+ current_year = year
735
+ total_ects_points_in_that_year += n_ects_points
736
+ end
737
+ }
738
+ show_colourized_line
739
+ e (' ' * 16)+sfancy(total_ects.to_s+' ECTS points')
740
+ e
741
+ end
742
+
743
+ # ========================================================================= #
744
+ # === show_colourized_line
745
+ # ========================================================================= #
746
+ def show_colourized_line(n_times = 34)
747
+ e simp('-' * n_times)
748
+ end
749
+
750
+ # ========================================================================= #
751
+ # === show_best_months
752
+ #
753
+ # This method will show the best months, sorted. Best comes first.
754
+ #
755
+ # Invocation example:
756
+ #
757
+ # emo --show-best-months
758
+ #
759
+ # ========================================================================= #
760
+ def show_best_months(
761
+ do_show_n_months = @show_n_best_months
762
+ )
763
+ opnn; e 'Showing the '+slateblue(do_show_n_months.to_s)+' best '\
764
+ 'months next, sorted by n ECTS points passed:'
765
+ e
766
+ hash_month_statistics = {}
767
+ _ = @hash.sort_by {|key, inner_array|
768
+ n_ECTS_points = inner_array[1].to_f
769
+ n_ECTS_points
770
+ }.reverse
771
+ # ======================================================================= #
772
+ # Next we must determine the sub-array which we will display.
773
+ # ======================================================================= #
774
+ array_to_display = []
775
+ _.each {|month, inner_array|
776
+ array_to_display << [ month, inner_array[1].to_f ]
777
+ }
778
+ # ======================================================================= #
779
+ # How many months to analyze will be determined next:
780
+ # ======================================================================= #
781
+ array_to_display = array_to_display[0..(do_show_n_months - 1)]
782
+ # ======================================================================= #
783
+ # Now we have our dataset - array_to_display keeps track of it.
784
+ # ======================================================================= #
785
+ exam_number_n = 0 # <- Keep track of which exam is in use.
786
+ array_to_display.each {|month, n_ECTS_points_passed|
787
+ # ===================================================================== #
788
+ # The dataset may look like this:
789
+ #
790
+ # [["01.2017", 41.0],
791
+ # ["06.2015", 35.0],
792
+ #
793
+ # ===================================================================== #
794
+ exam_number_n += 1
795
+ left_pad = ((exam_number_n.to_s+')').rjust(5)).ljust(6)
796
+ # ======================================================================= #
797
+ # Report this to the user:
798
+ # ======================================================================= #
799
+ rounded_n_ECTS_points_passed = n_ECTS_points_passed.to_s.to_f.round(1)
800
+ e yellow(left_pad)+'In the month '+
801
+ sfancy(month)+', '+
802
+ violet(rounded_n_ECTS_points_passed.to_s.rjust(4))+
803
+ ' ECTS points were completed.'
804
+ # ======================================================================= #
805
+ # Also add to the hash that keeps track about the month-statistics.
806
+ # ======================================================================= #
807
+ this_month = month.split('.').first.to_i # <- Example input: "01.2017"
808
+ this_month = Studium::MONTH_NUMBER_TO_MONTH_NAME[this_month]
809
+ hash = {
810
+ :n_ects => n_ECTS_points_passed,
811
+ :n_times_mentioned => 1
812
+ }
813
+ if hash_month_statistics.has_key? this_month
814
+ hash_month_statistics[this_month][:n_ects] += n_ECTS_points_passed
815
+ hash_month_statistics[this_month][:n_times_mentioned] += 1
816
+ else
817
+ hash_month_statistics[this_month] = hash
818
+ end
819
+ }
820
+ e
821
+ # ======================================================================= #
822
+ # Next, we will also show some month statistics.
823
+ # ======================================================================= #
824
+ colourized_n_best_months = orange(do_show_n_months)
825
+ opnn; e "The best #{colourized_n_best_months} (top) months "\
826
+ "seem to be the following ones:"
827
+ e
828
+ _ = hash_month_statistics
829
+ # ======================================================================= #
830
+ # The variable name_of_the_month keeps track of the month at hand,
831
+ # e. g. "January" or "March".
832
+ # ======================================================================= #
833
+ _ = _.sort_by {|name_of_the_month, hash_containing_n_ects_and_n_times_mentioned|
834
+ n_ects = hash_containing_n_ects_and_n_times_mentioned[:n_ects]
835
+ n_ects
836
+ }.reverse
837
+ counter = 0
838
+ # ======================================================================= #
839
+ # Now we have the entry properly sorted. We will display only up to
840
+ # n times specified as above (e. g. 8 times right now).
841
+ # ======================================================================= #
842
+ _.each {|name_of_the_month, hash_containing_n_ects_and_n_times_mentioned|
843
+ next if counter > 7 # <- Sync it with the above value of 8.
844
+ n_ects = hash_containing_n_ects_and_n_times_mentioned[:n_ects]
845
+ n_times_mentioned = hash_containing_n_ects_and_n_times_mentioned[:n_times_mentioned]
846
+ counter += 1
847
+ e ' '+
848
+ sfancy((name_of_the_month+':').ljust(12))+
849
+ orange(n_times_mentioned.to_s.rjust(2))+ # <- n_times mentioned
850
+ olivedrab(' (ECTS in total: ')+
851
+ colourize_ects_points(n_ects.to_s.rjust(5))+
852
+ olivedrab('; average ECTS in that month: ')+
853
+ colourize_ects_points(
854
+ (n_ects.to_f / n_times_mentioned.to_i).round(1).to_s.rjust(4)
855
+ )+
856
+ olivedrab(')')
857
+ }
858
+ e
859
+ end
860
+
861
+ # ========================================================================= #
862
+ # === show_total_summary_for_year_hours_ects_n_exams
863
+ #
864
+ # This method will show the total summary for a given year.
865
+ # ========================================================================= #
866
+ def show_total_summary_for_year_hours_ects_n_exams(
867
+ last_year,
868
+ total_n_hours_passed_in_this_year,
869
+ total_n_ects_passed_in_this_year,
870
+ total_n_exams_passed_in_this_year,
871
+ optional_average_grade_per_exam = nil # The average grade per exam in a given year. Optional entr.y
872
+ )
873
+ if @show_only_this_year and
874
+ @show_only_this_year.include?('-') and
875
+ @show_only_this_year.split('-').last.to_i < last_year
876
+ # This is the case here when we show a range.
877
+ elsif @show_only_this_year and
878
+ (@show_only_this_year != last_year)
879
+ else
880
+ e # And a newline too.
881
+ result = 'Total Summary in '+sfancy(last_year.to_s)+': '+
882
+ # Add n_hours next.
883
+ colourize_hours(
884
+ total_n_hours_passed_in_this_year.to_s.rjust(4)
885
+ )+' '
886
+ # ======================================================================= #
887
+ # Add n_ECTS next.
888
+ # ======================================================================= #
889
+ if show_ects_points?
890
+ result << colourize_ects(
891
+ total_n_ects_passed_in_this_year.to_f.to_s.rjust(5)+
892
+ ' ECTS passed'
893
+ )
894
+ end
895
+ # ======================================================================= #
896
+ # We will use papayawhip here instead.
897
+ # ======================================================================= #
898
+ result << colourize_n_exams(' (n exams passed that year: '+
899
+ total_n_exams_passed_in_this_year.to_s.rjust(3)+')',
900
+ :mediumseagreen
901
+ )
902
+ e result
903
+ if @show_yearly_average_grades and optional_average_grade_per_exam
904
+ if block_given?
905
+ yielded = yield
906
+ if yielded.is_a? Hash
907
+ if yielded.has_key? :exclude_n_exams_from_the_grade_list
908
+ total_n_exams_passed_in_this_year -= yielded[:exclude_n_exams_from_the_grade_list].to_i
909
+ end
910
+ end
911
+ end
912
+ _ = (
913
+ optional_average_grade_per_exam.to_f / total_n_exams_passed_in_this_year.to_f
914
+ ).round(2)
915
+ _ = _.to_s.ljust(4,'0')
916
+ e 'The average grade of the exams passed in this year is: '+
917
+ sfancy(_)
918
+ end
919
+ end
920
+ end
921
+
922
+ # ========================================================================= #
923
+ # === show_only_exams_at_the_boku
924
+ #
925
+ # Show only exams at the BOKU.
926
+ # ========================================================================= #
927
+ def show_only_exams_at_the_boku
928
+ opnn; e 'Showing all exams passed at the BOKU.'
929
+ _ = dataset?.select {|entry|
930
+ name_of_university = entry[4]
931
+ (name_of_university.strip.downcase == 'boku')
932
+ }
933
+ reset_main_hash
934
+ sanitize_dataset(_, :leave_time_entry_alone)
935
+ end
936
+
937
+ # ========================================================================= #
938
+ # === show_n_exams_passed_per_month (report tag)
939
+ #
940
+ # This is the main report-method for this class.
941
+ #
942
+ # Make sure that the input to this method is correct.
943
+ # ========================================================================= #
944
+ def show_n_exams_passed_per_month(
945
+ i = @hash
946
+ )
947
+ month = 0
948
+ year = 0
949
+ n_hours = 0
950
+ n_ECTS = 0
951
+ grade = 0
952
+ # ======================================================================= #
953
+ # We must initialize some variables here.
954
+ # ======================================================================= #
955
+ n_exams_passed_in_this_month = 0
956
+ total_n_ects_passed_in_this_year = 0
957
+ total_n_hours_passed_in_this_year = 0
958
+ total_n_exams_passed_in_this_year = 0
959
+ total_grade_count_in_this_year = 0
960
+ exclude_n_exams_from_the_grade_list = 0
961
+
962
+ last_year = LAST_YEAR # Will point to the current year actually.
963
+ this_year = Time.now.year.to_i
964
+ # ======================================================================= #
965
+ # Check whether we shall only show certain grades.
966
+ # ======================================================================= #
967
+ if @show_only_grade_for
968
+ opnn; e "We will only show grades that are equal to "\
969
+ "#{simp(@show_only_grade_for.to_s)}."
970
+ end
971
+ e
972
+ opnn; e 'We will show how many hours / ECTS we passed per '\
973
+ 'given month and then year.'
974
+ e
975
+ spacer
976
+ # ======================================================================= #
977
+ # Header:
978
+ # ======================================================================= #
979
+ if @show_only_this_year and
980
+ @show_only_this_year.include?('-') and
981
+ @show_only_this_year.split('-').last.to_i < last_year
982
+ # ===================================================================== #
983
+ # In this case, do not show the last year.
984
+ # ===================================================================== #
985
+ elsif @show_only_this_year and
986
+ (@show_only_this_year != last_year) and
987
+ (this_year != last_year)
988
+ # ===================================================================== #
989
+ # In this case we will also not show the last year.
990
+ # ===================================================================== #
991
+ else # This here is the main clause - most conditions lead to this case.
992
+ output_colourized_year_and_colourized_hours(last_year)
993
+ end
994
+ # ======================================================================= #
995
+ # We iterate through our hash. Each entry processed through .each
996
+ # is the dataset for a whole month.
997
+ #
998
+ # The entries are:
999
+ #
1000
+ # - On the left side, the month.year entry.
1001
+ #
1002
+ # - On the right side, an Array with n hours, n ects points,
1003
+ # the grade, n exams passed and the university .
1004
+ # ======================================================================= #
1005
+ i.each {|month_year, n_hours_n_ECTS_grade_university_n_exams_passed|
1006
+ month, year = month_year.split('.').map(&:to_i)
1007
+ # ===================================================================== #
1008
+ # First we deconstruct the information stored in our Array:
1009
+ # n_hours | n_ECTS | grade | university | n_exams_passed
1010
+ # ===================================================================== #
1011
+ n_hours, n_ECTS, grade, _university, n_exams_passed_in_this_month =
1012
+ n_hours_n_ECTS_grade_university_n_exams_passed
1013
+ # ===================================================================== #
1014
+ # Currently, the grade is not output as it is not so important. It
1015
+ # can, however had, be used for showing the average grade per year.
1016
+ # ===================================================================== #
1017
+ # Next, the case will be handled when we only show exams that have a
1018
+ # specific grade.
1019
+ # ===================================================================== #
1020
+ if @show_only_grade_for
1021
+ next unless grade == @show_only_grade_for
1022
+ end
1023
+ # ===================================================================== #
1024
+ # Switch to another year in that event.
1025
+ # ===================================================================== #
1026
+ if year != last_year
1027
+ # =================================================================== #
1028
+ # Show the total summary per given year. The last entry showing the
1029
+ # average grade is optional.
1030
+ # =================================================================== #
1031
+ show_total_summary_for_year_hours_ects_n_exams(
1032
+ last_year, total_n_hours_passed_in_this_year,
1033
+ total_n_ects_passed_in_this_year,
1034
+ total_n_exams_passed_in_this_year,
1035
+ total_grade_count_in_this_year
1036
+ ) {{ exclude_n_exams_from_the_grade_list: exclude_n_exams_from_the_grade_list }}
1037
+ # =================================================================== #
1038
+ # Reset various variables next, in order to prepare for the dataset
1039
+ # from a new year.
1040
+ # =================================================================== #
1041
+ total_n_ects_passed_in_this_year = 0
1042
+ total_n_hours_passed_in_this_year = 0
1043
+ total_n_exams_passed_in_this_year = 0
1044
+ total_grade_count_in_this_year = 0
1045
+ exclude_n_exams_from_the_grade_list = 0
1046
+ # =================================================================== #
1047
+ # Show the spacer after the summary.
1048
+ # =================================================================== #
1049
+ spacer unless @show_only_this_year and (@show_only_this_year != last_year)
1050
+ # =================================================================== #
1051
+ # Red year.
1052
+ # =================================================================== #
1053
+ output_colourized_year_and_colourized_hours(year)
1054
+ # =================================================================== #
1055
+ # New year starts here. We will display end-of-year stuff,
1056
+ # before resetting other counters.
1057
+ # =================================================================== #
1058
+ last_year = year
1059
+ end
1060
+ total_n_hours_passed_in_this_year += n_hours
1061
+ @n_hours_passed_in_total += n_hours
1062
+ total_n_ects_passed_in_this_year += n_ECTS
1063
+ @n_ects_points_in_total += n_ECTS
1064
+ total_n_exams_passed_in_this_year += n_exams_passed_in_this_month
1065
+ @n_exams_in_total_passed += n_exams_passed_in_this_month.to_i
1066
+ # ===================================================================== #
1067
+ # Before we can add to the total grade count in this year, we must
1068
+ # first ensure that the input is not a '+', since this would mean
1069
+ # passing an exam without getting a grade such as 1, 2, 3, 4 or 5.
1070
+ #
1071
+ # Note that grade is an Array.
1072
+ # ===================================================================== #
1073
+ if grade.include? '+'
1074
+ exclude_n_exams_from_the_grade_list += grade.count('+')
1075
+ grade.reject! {|entry| entry == '+' }
1076
+ end
1077
+ # ===================================================================== #
1078
+ # Next, we can push it into the variable total_grade_count_in_this_year
1079
+ # ===================================================================== #
1080
+ add_this_number = grade.map(&:to_i).sum
1081
+ total_grade_count_in_this_year += add_this_number
1082
+ # ===================================================================== #
1083
+ # We can always display the dataset for the given month.
1084
+ # ===================================================================== #
1085
+ report_month_year_hours_ects_n_exams_passed_in_this_month(
1086
+ month, year, n_hours, n_ECTS, n_exams_passed_in_this_month
1087
+ )
1088
+ }
1089
+ # ======================================================================= #
1090
+ # Must display it one more time, for the last year:
1091
+ # ======================================================================= #
1092
+ show_total_summary_for_year_hours_ects_n_exams(
1093
+ last_year,
1094
+ total_n_hours_passed_in_this_year,
1095
+ total_n_ects_passed_in_this_year,
1096
+ total_n_exams_passed_in_this_year,
1097
+ total_grade_count_in_this_year
1098
+ ) {{ exclude_n_exams_from_the_grade_list: exclude_n_exams_from_the_grade_list }}
1099
+ # ======================================================================= #
1100
+ # Last but not least, we also say how many exams we have passed
1101
+ # in total, and how many ECTS points these are.
1102
+ # ======================================================================= #
1103
+ e
1104
+ ljust_it_n_times = :default
1105
+ report_how_many_exams_were_passed_in_total(@n_exams_in_total_passed, ljust_it_n_times)
1106
+ if show_ects_points? # We here will also assume that the user wants to show the amount of hours as well.
1107
+ # ===================================================================== #
1108
+ # Hours, total ects and ects-per-passed-exam:
1109
+ # ===================================================================== #
1110
+ ects_per_exams_passed = # This is: total ects / n_exams
1111
+ (
1112
+ @n_ects_points_in_total.to_f / @n_exams_in_total_passed.to_f
1113
+ ).round(2)
1114
+ report_how_many_hours_were_passed_in_total(
1115
+ @n_hours_passed_in_total, ljust_it_n_times
1116
+ )
1117
+ report_how_many_ects_points_have_been_gathered_so_far
1118
+ report_how_many_of_these_ects_points_required_mandatory_presence(
1119
+ @n_ects_points_belonging_to_mandatory_presence_courses
1120
+ )
1121
+ if @show_average_ects_passed_per_exam
1122
+ report_the_average_amount_of_ects_per_passed_exam(
1123
+ ects_per_exams_passed, ljust_it_n_times
1124
+ )
1125
+ end
1126
+ report_the_average_grade(ljust_it_n_times)
1127
+ end
1128
+ end; alias report_main_hash show_n_exams_passed_per_month # === report_main_hash
1129
+ alias report show_n_exams_passed_per_month # === report
1130
+
1131
+ # ========================================================================= #
1132
+ # === report_how_many_of_these_ects_points_required_mandatory_presence
1133
+ #
1134
+ # Report how many ECTS points have been passed that required a
1135
+ # mandatory presence (aka "prüfungsimmanent" in german).
1136
+ # ========================================================================= #
1137
+ def report_how_many_of_these_ects_points_required_mandatory_presence(
1138
+ n_ects_points_in_mandatory_presence_courses =
1139
+ Studium.n_ects_points_in_mandatory_presence_courses,
1140
+ n_ljust = 77
1141
+ )
1142
+ if n_ljust == :default
1143
+ n_ljust = 77
1144
+ end
1145
+ n_total_ects = @n_ects_points_in_total.to_f
1146
+ percentage_value = (
1147
+ n_ects_points_in_mandatory_presence_courses.to_f * 100
1148
+ ) / n_total_ects
1149
+ rounded_percentage_value = percentage_value.round(2)
1150
+ e (
1151
+ "Of these, #{slategray('n ECTS points')} are \"prüfungsimmanent\": "
1152
+ ).ljust(n_ljust)+
1153
+ sfancy(
1154
+ n_ects_points_in_mandatory_presence_courses.to_s.rjust(5)
1155
+ )+
1156
+ orange(' ('+rounded_percentage_value.to_s+'%)')
1157
+ end
1158
+
1159
+ # ========================================================================= #
1160
+ # === report_the_average_grade
1161
+ # ========================================================================= #
1162
+ def report_the_average_grade(
1163
+ n_ljust = 76,
1164
+ n_rjust = 4
1165
+ )
1166
+ if n_ljust == :default
1167
+ n_ljust = 76
1168
+ end
1169
+ e "The #{slategray('average grade')} for these exams is: ".ljust(n_ljust+3)+
1170
+ sfancy(
1171
+ average_grade.to_s.rjust(n_rjust)
1172
+ )
1173
+ end
1174
+
1175
+ # ========================================================================= #
1176
+ # === report_how_many_ects_points_have_been_gathered_so_far
1177
+ # ========================================================================= #
1178
+ def report_how_many_ects_points_have_been_gathered_so_far(
1179
+ n_ljust = 52
1180
+ )
1181
+ e "In total, #{slategray('n ECTS points')} have been "\
1182
+ "gathered so far: ".ljust(n_ljust)+
1183
+ "#{sfancy(@n_ects_points_in_total.to_s)}"
1184
+ end
1185
+
1186
+ # ========================================================================= #
1187
+ # === report_the_average_amount_of_ects_per_passed_exam
1188
+ # ========================================================================= #
1189
+ def report_the_average_amount_of_ects_per_passed_exam(
1190
+ ects_per_exams_passed = calculate_the_average_amount_per_passed_exam,
1191
+ ljust_n_times = 76,
1192
+ rjust_n_times = 12
1193
+ )
1194
+ if ljust_n_times == :default
1195
+ ljust_n_times = 76
1196
+ end
1197
+ left_padded_side = "On average, the "\
1198
+ "#{slategray('ECTS per passed exam')} "\
1199
+ "are: ".ljust(ljust_n_times)
1200
+ e left_padded_side+
1201
+ sfancy(
1202
+ (ects_per_exams_passed.to_s+' ECTS').rjust(rjust_n_times)
1203
+ )
1204
+ end
1205
+
1206
+ # ========================================================================= #
1207
+ # === show_the_summary
1208
+ #
1209
+ # To use this method from the commandline, do:
1210
+ #
1211
+ # emo --summary
1212
+ #
1213
+ # ========================================================================= #
1214
+ def show_the_summary
1215
+ determine_n_ects_points_in_total
1216
+ determine_n_exams_in_total_were_passed
1217
+ determine_n_hours_were_passed_in_total # <- How many hours were passed in total.
1218
+ # ======================================================================= #
1219
+ # Next report our findings:
1220
+ # ======================================================================= #
1221
+ report_how_many_exams_were_passed_in_total(@n_exams_in_total_passed)
1222
+ report_how_many_hours_were_passed_in_total
1223
+ report_how_many_ects_points_have_been_gathered_so_far
1224
+ if @show_average_ects_passed_per_exam
1225
+ report_the_average_amount_of_ects_per_passed_exam
1226
+ end
1227
+ report_the_average_grade
1228
+ end; alias show_only_the_summary show_the_summary # === show_only_the_summary
1229
+
1230
+ # ========================================================================= #
1231
+ # === determine_n_hours_were_passed_in_total
1232
+ # ========================================================================= #
1233
+ def determine_n_hours_were_passed_in_total
1234
+ i = @hash.values.map {|entry| entry[0].to_f }.sum.to_f
1235
+ @n_hours_passed_in_total = i
1236
+ end
1237
+
1238
+ # ========================================================================= #
1239
+ # === report_how_many_exams_were_passed_in_total
1240
+ # ========================================================================= #
1241
+ def report_how_many_exams_were_passed_in_total(
1242
+ i = @n_exams_in_total_passed,
1243
+ ljust_n_times = 76,
1244
+ n_rjust = 4
1245
+ )
1246
+ if ljust_n_times == :default
1247
+ ljust_n_times = 76
1248
+ end
1249
+ e (
1250
+ "In total, #{slategray('n exams')} have been passed:"
1251
+ ).ljust(ljust_n_times)+
1252
+ sfancy(i.to_s.rjust(n_rjust))
1253
+ end
1254
+
1255
+ # ========================================================================= #
1256
+ # === report_how_many_hours_were_passed_in_total
1257
+ #
1258
+ # This method will report how many hours were passed in total.
1259
+ # ========================================================================= #
1260
+ def report_how_many_hours_were_passed_in_total(
1261
+ i = @n_hours_passed_in_total,
1262
+ n_ljust = 76,
1263
+ n_rjust = 6
1264
+ )
1265
+ if n_ljust == :default
1266
+ n_ljust = 76
1267
+ end
1268
+ left_side_string = "In total, #{slategray('n hours')} were completed: ".ljust(n_ljust)
1269
+ # ======================================================================= #
1270
+ # Since as of 04.03.2020 the result is rounded, since otherwise the
1271
+ # display may include parts such as "00001", which we don't want here.
1272
+ # ======================================================================= #
1273
+ i = i.round(1) if i.is_a? Float
1274
+ e left_side_string+
1275
+ sfancy(i.to_s.rjust(n_rjust))
1276
+ end
1277
+
1278
+ end; end