studium 0.16.9

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

Potentially problematic release.


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

Files changed (887) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +3211 -0
  3. data/bin/ask_exam_question +7 -0
  4. data/bin/check_description_of_these_lectures +7 -0
  5. data/bin/curriculum_module_displayer +7 -0
  6. data/bin/cycle +7 -0
  7. data/bin/d10 +7 -0
  8. data/bin/d100 +7 -0
  9. data/bin/d15 +7 -0
  10. data/bin/d20 +7 -0
  11. data/bin/d25 +7 -0
  12. data/bin/d3 +7 -0
  13. data/bin/d30 +7 -0
  14. data/bin/d5 +7 -0
  15. data/bin/determine_curricula +7 -0
  16. data/bin/display_lecture_url +7 -0
  17. data/bin/exam_registration_at +7 -0
  18. data/bin/exam_statistics +7 -0
  19. data/bin/exams_per_month +9 -0
  20. data/bin/finished_exams_at_this_university +7 -0
  21. data/bin/flashcards +7 -0
  22. data/bin/from_curriculum_id_to_university +9 -0
  23. data/bin/location_to_this_exam_topic.rb +7 -0
  24. data/bin/mandatory_continuous_assessment +7 -0
  25. data/bin/mandatory_upcoming_courses +10 -0
  26. data/bin/n_ECTS +7 -0
  27. data/bin/n_exam_questions_already_answered +16 -0
  28. data/bin/nquestions +7 -0
  29. data/bin/nsolved +7 -0
  30. data/bin/open_last_exam_question_asked_file +7 -0
  31. data/bin/passed_exams +7 -0
  32. data/bin/passed_pr/303/274fungsimmanente_courses +7 -0
  33. data/bin/pdf_for +7 -0
  34. data/bin/random_exam_topic +7 -0
  35. data/bin/report_solved_topics +7 -0
  36. data/bin/return_n_ects_from_this_file +7 -0
  37. data/bin/return_n_questions_solved_in_total +7 -0
  38. data/bin/rti_conflict +7 -0
  39. data/bin/search_for_n_ects +7 -0
  40. data/bin/show_lectures_on_the_commandline +7 -0
  41. data/bin/show_passed_exams_having_this_grade +7 -0
  42. data/bin/show_themes +7 -0
  43. data/bin/solved +9 -0
  44. data/bin/solved_ects +7 -0
  45. data/bin/studienkennzahl +7 -0
  46. data/bin/studium +7 -0
  47. data/bin/studium_skeleton +7 -0
  48. data/bin/ufind +7 -0
  49. data/bin/upcoming_exams +7 -0
  50. data/bin/week_parser +7 -0
  51. data/doc/ECTS_CONSIDERATIONS/ECTS_CONSIDERATIONS.md +82 -0
  52. data/doc/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER/HOW_TO_DETERMINE_WHICH_PART_IS_THE_QUESTION_AND_WHICH_PART_IS_THE_ANSWER.md +44 -0
  53. data/doc/README.gen +3164 -0
  54. data/doc/SQL_database_specification/SQL_database_specification.md +46 -0
  55. data/doc/deprecated_components/deprecated_components.md +46 -0
  56. data/doc/documentation_for_the_file_lecture_information/documentation_for_the_file_lecture_information.md +311 -0
  57. data/doc/elegant_colours/elegant_colours.md +21 -0
  58. data/doc/statistics/yearly_statistics.md +8 -0
  59. data/doc/todo/todo_for_the_graphical_parts_of_the_studium_gem_including_www_related_aspects.md +92 -0
  60. data/doc/todo/todo_for_the_studium_gem.md +55 -0
  61. data/img/STUDIES.png +0 -0
  62. data/lib/studium/autoinclude.rb +7 -0
  63. data/lib/studium/base/base.rb +3229 -0
  64. data/lib/studium/base/colours.rb +246 -0
  65. data/lib/studium/base/commandline_arguments_module/commandline_arguments_module.rb +115 -0
  66. data/lib/studium/base/prototype/prototype.rb +230 -0
  67. data/lib/studium/base/runmode_module/runmode_module.rb +103 -0
  68. data/lib/studium/c/README.md +2 -0
  69. data/lib/studium/c/a.out +0 -0
  70. data/lib/studium/c/obtain_random_entry.c +11 -0
  71. data/lib/studium/check_and_sanitize/README.md +15 -0
  72. data/lib/studium/check_and_sanitize/check_curriculum_for_correct_separation_of_bachelor_and_master.rb +141 -0
  73. data/lib/studium/check_and_sanitize/check_for_all_exam_topics_being_registered.rb +118 -0
  74. data/lib/studium/check_and_sanitize/check_for_correct_themes_of_each_course.rb +100 -0
  75. data/lib/studium/check_and_sanitize/check_for_existing_description_of_this_lecture.rb +194 -0
  76. data/lib/studium/check_and_sanitize/check_important_exams.rb +132 -0
  77. data/lib/studium/check_and_sanitize/check_the_lecture_information_file.rb +166 -0
  78. data/lib/studium/check_and_sanitize/find_duplicate_lectures.rb +124 -0
  79. data/lib/studium/check_and_sanitize/missing_priority_entry.rb +44 -0
  80. data/lib/studium/check_and_sanitize/sanitize_lecture_information.rb +427 -0
  81. data/lib/studium/check_and_sanitize/sanitize_this_string_containing_the_lva_dates.rb +79 -0
  82. data/lib/studium/colours/colours.rb +587 -0
  83. data/lib/studium/colours/sfancy.rb +49 -0
  84. data/lib/studium/colours/sfile.rb +39 -0
  85. data/lib/studium/colours/simp.rb +40 -0
  86. data/lib/studium/colours/use_colours.rb +39 -0
  87. data/lib/studium/colours/use_this_colour_for_exam_questions_and_exam_answers.rb +80 -0
  88. data/lib/studium/commandline/commandline.rb +1839 -0
  89. data/lib/studium/constants/colours.rb +16 -0
  90. data/lib/studium/constants/constants.rb +533 -0
  91. data/lib/studium/constants/curricula_related_constants.rb +504 -0
  92. data/lib/studium/constants/exam_topics.rb +156 -0
  93. data/lib/studium/constants/file_lecture_information.rb +55 -0
  94. data/lib/studium/constants/image_constants.rb +272 -0
  95. data/lib/studium/constants/regexes.rb +58 -0
  96. data/lib/studium/constants/roebe_specific_constants.rb +216 -0
  97. data/lib/studium/constants/standalone_constants.rb +372 -0
  98. data/lib/studium/constants/web_constants.rb +28 -0
  99. data/lib/studium/css/project.css +267 -0
  100. data/lib/studium/curricula/attribute_lecture_to_curriculum/attribute_boku_lecture_to_curriculum.rb +384 -0
  101. data/lib/studium/curricula/attribute_lecture_to_curriculum/attribute_lecture_to_curriculum.rb +238 -0
  102. data/lib/studium/curricula/curricula_from_this_website/curricula_from_this_website.rb +141 -0
  103. data/lib/studium/curricula/curriculum.rb +213 -0
  104. data/lib/studium/curricula/curriculum_as_string.rb +280 -0
  105. data/lib/studium/curricula/curriculum_module_displayer/constants.rb +33 -0
  106. data/lib/studium/curricula/curriculum_module_displayer/curriculum_module_displayer.rb +417 -0
  107. data/lib/studium/curricula/curriculum_module_displayer/initialize.rb +25 -0
  108. data/lib/studium/curricula/curriculum_module_displayer/menu.rb +45 -0
  109. data/lib/studium/curricula/curriculum_module_displayer/reset.rb +74 -0
  110. data/lib/studium/curricula/curriculum_module_displayer/run.rb +20 -0
  111. data/lib/studium/curricula/curriculum_module_displayer/set_use_this_curriculum.rb +93 -0
  112. data/lib/studium/curricula/curriculum_module_displayer/show_and_report.rb +190 -0
  113. data/lib/studium/curricula/determine_curricula/constants.rb +11 -0
  114. data/lib/studium/curricula/determine_curricula/determine_curricula.rb +36 -0
  115. data/lib/studium/curricula/determine_curricula/help.rb +39 -0
  116. data/lib/studium/curricula/determine_curricula/initialize.rb +48 -0
  117. data/lib/studium/curricula/determine_curricula/menu.rb +151 -0
  118. data/lib/studium/curricula/determine_curricula/misc.rb +403 -0
  119. data/lib/studium/curricula/determine_curricula/report.rb +143 -0
  120. data/lib/studium/curricula/determine_curricula/reset.rb +59 -0
  121. data/lib/studium/curricula/determine_curricula/run.rb +19 -0
  122. data/lib/studium/curricula/determine_elective_courses_in_this_curriculum.rb +112 -0
  123. data/lib/studium/curricula/display_bachelor_curricula.rb +90 -0
  124. data/lib/studium/curricula/handle_curricula/README.md +9 -0
  125. data/lib/studium/curricula/handle_curricula/handle_curricula.rb +100 -0
  126. data/lib/studium/curricula/handle_curricula/misc.rb +798 -0
  127. data/lib/studium/curricula/mitteilungsbl/303/244tter/mitteilungsbl/303/244tter.rb +323 -0
  128. data/lib/studium/curricula/modules/display_on_the_commandline.rb +319 -0
  129. data/lib/studium/curricula/modules/return_n_ects_in_this_module.rb +75 -0
  130. data/lib/studium/curricula/n_percent_solved_in_this_curriculum.rb +75 -0
  131. data/lib/studium/curricula/prepare_individual_curriculum.rb +304 -0
  132. data/lib/studium/curricula/random_curriculum_creator/random_curriculum_creator.rb +164 -0
  133. data/lib/studium/curricula/show_all_unfinished_courses_of_this_curriculum/show_all_unfinished_courses_of_this_curriculum.rb +116 -0
  134. data/lib/studium/curricula/show_lectures_of_this_curriculum.rb +114 -0
  135. data/lib/studium/curricula/show_lectures_of_this_curriculum_id/show_lectures_of_this_curriculum_id.rb +554 -0
  136. data/lib/studium/curricula/show_solved_percentage_among_the_registered_curricula.rb +87 -0
  137. data/lib/studium/curricula/sorted_individual_curricula.rb +121 -0
  138. data/lib/studium/ects/boku_ects_splitter.rb +128 -0
  139. data/lib/studium/ects/ects_per_university/ects_per_university.rb +179 -0
  140. data/lib/studium/ects/ects_scanner.rb +141 -0
  141. data/lib/studium/ects/ects_to_university_parser.rb +142 -0
  142. data/lib/studium/ects/last_entry_is_curriculum.rb +150 -0
  143. data/lib/studium/ects/n_ects_in_these_lectures.rb +196 -0
  144. data/lib/studium/ects/n_ects_points_in_mandatory_presence_courses.rb +50 -0
  145. data/lib/studium/ects/return_n_ects_from_this_file.rb +59 -0
  146. data/lib/studium/ects/return_n_ects_from_this_url.rb +197 -0
  147. data/lib/studium/ects/search_for_n_ects/OLD_search_for_n_ects.rb +0 -0
  148. data/lib/studium/ects/search_for_n_ects/search_for_n_ects.rb +719 -0
  149. data/lib/studium/ects/show_completed_ects_in_all_curricula.rb +232 -0
  150. data/lib/studium/ects/show_passed_credits_per_curriculum.rb +276 -0
  151. data/lib/studium/ects/simple_total_ects_points.rb +135 -0
  152. data/lib/studium/ects/solved_ects/constants.rb +19 -0
  153. data/lib/studium/ects/solved_ects/reset.rb +51 -0
  154. data/lib/studium/ects/solved_ects/solved_ects.rb +325 -0
  155. data/lib/studium/ects/solved_ects_per_university/reset.rb +25 -0
  156. data/lib/studium/ects/solved_ects_per_university/solved_ects_per_university.rb +106 -0
  157. data/lib/studium/ects/still_missing.rb +129 -0
  158. data/lib/studium/ects/sum_of_ects.rb +144 -0
  159. data/lib/studium/encoding/encoding.rb +109 -0
  160. data/lib/studium/exam_topics/RNAi_siRNA_and_miRNA +100 -0
  161. data/lib/studium/exam_topics/abfall_als_ressource +86 -0
  162. data/lib/studium/exam_topics/advanced_biochemistry +927 -0
  163. data/lib/studium/exam_topics/advanced_biotechnology +234 -0
  164. data/lib/studium/exam_topics/advanced_cellbiology +219 -0
  165. data/lib/studium/exam_topics/advanced_chemistry +527 -0
  166. data/lib/studium/exam_topics/advanced_immunology +152 -0
  167. data/lib/studium/exam_topics/advanced_microbiology +44 -0
  168. data/lib/studium/exam_topics/advanced_topics_in_plant_sciences +109 -0
  169. data/lib/studium/exam_topics/advanced_virology +245 -0
  170. data/lib/studium/exam_topics/ageing +153 -0
  171. data/lib/studium/exam_topics/agrar_ecology +67 -0
  172. data/lib/studium/exam_topics/agrarmarkt +73 -0
  173. data/lib/studium/exam_topics/agrarphysik +35 -0
  174. data/lib/studium/exam_topics/alcohols +31 -0
  175. data/lib/studium/exam_topics/algorithms +77 -0
  176. data/lib/studium/exam_topics/allergie +76 -0
  177. data/lib/studium/exam_topics/allgemeine_genetik +1006 -0
  178. data/lib/studium/exam_topics/allgemeine_mikrobiologie +1008 -0
  179. data/lib/studium/exam_topics/aminoacids +464 -0
  180. data/lib/studium/exam_topics/analytische_chemie_1 +133 -0
  181. data/lib/studium/exam_topics/analytische_chemie_2 +31 -0
  182. data/lib/studium/exam_topics/anatomie +295 -0
  183. data/lib/studium/exam_topics/anorganische_chemie +350 -0
  184. data/lib/studium/exam_topics/anthropologie +138 -0
  185. data/lib/studium/exam_topics/antibodies_and_antigens +791 -0
  186. data/lib/studium/exam_topics/apoptosis +35 -0
  187. data/lib/studium/exam_topics/archaea +112 -0
  188. data/lib/studium/exam_topics/archaeo_viruses +7 -0
  189. data/lib/studium/exam_topics/architecture +8 -0
  190. data/lib/studium/exam_topics/artificial_intelligence +89 -0
  191. data/lib/studium/exam_topics/atomemissionsspektrometrie +6 -0
  192. data/lib/studium/exam_topics/audio +11 -0
  193. data/lib/studium/exam_topics/bacteriophages +266 -0
  194. data/lib/studium/exam_topics/basic_biochemistry +1008 -0
  195. data/lib/studium/exam_topics/basic_biotechnology +1011 -0
  196. data/lib/studium/exam_topics/basic_chemistry +1007 -0
  197. data/lib/studium/exam_topics/basic_virology +1007 -0
  198. data/lib/studium/exam_topics/bauwesen +6 -0
  199. data/lib/studium/exam_topics/betriebssysteme +128 -0
  200. data/lib/studium/exam_topics/betriebswirtschaftslehre +29 -0
  201. data/lib/studium/exam_topics/bioanalytik_und_biosensoren +391 -0
  202. data/lib/studium/exam_topics/biochips +79 -0
  203. data/lib/studium/exam_topics/bioelektrochemie +57 -0
  204. data/lib/studium/exam_topics/biofilms +54 -0
  205. data/lib/studium/exam_topics/bioinformatics +511 -0
  206. data/lib/studium/exam_topics/biological_therapeutics +156 -0
  207. data/lib/studium/exam_topics/biologie +149 -0
  208. data/lib/studium/exam_topics/biomarkers +137 -0
  209. data/lib/studium/exam_topics/biomaterials +90 -0
  210. data/lib/studium/exam_topics/biomembranes +6 -0
  211. data/lib/studium/exam_topics/bionik +65 -0
  212. data/lib/studium/exam_topics/biophysik +34 -0
  213. data/lib/studium/exam_topics/biopolymers +10 -0
  214. data/lib/studium/exam_topics/bioprozesstechnik +149 -0
  215. data/lib/studium/exam_topics/bioressourcenmanagement +78 -0
  216. data/lib/studium/exam_topics/birds +5 -0
  217. data/lib/studium/exam_topics/bodenkunde +384 -0
  218. data/lib/studium/exam_topics/bodenmikrobiologie +40 -0
  219. data/lib/studium/exam_topics/cancerbiology +484 -0
  220. data/lib/studium/exam_topics/cell_cultures +229 -0
  221. data/lib/studium/exam_topics/cellbiology +1011 -0
  222. data/lib/studium/exam_topics/cellular_transport_and_protein_secretion +27 -0
  223. data/lib/studium/exam_topics/cellular_vesicles +11 -0
  224. data/lib/studium/exam_topics/cellulose +6 -0
  225. data/lib/studium/exam_topics/chemische_technologie_anorganischer_stoffe +209 -0
  226. data/lib/studium/exam_topics/chemische_technologie_organischer_stoffe +25 -0
  227. data/lib/studium/exam_topics/chemisches_labor +60 -0
  228. data/lib/studium/exam_topics/chemokines_and_cytokines +45 -0
  229. data/lib/studium/exam_topics/chemotaxis_quorum_sensing_and_motility_in_prokaryotes +116 -0
  230. data/lib/studium/exam_topics/citric_acid_cycle +84 -0
  231. data/lib/studium/exam_topics/clinical_microbiology +516 -0
  232. data/lib/studium/exam_topics/computer_science +308 -0
  233. data/lib/studium/exam_topics/computer_vision_and_computer_graphics +13 -0
  234. data/lib/studium/exam_topics/crispr +51 -0
  235. data/lib/studium/exam_topics/cyanobacteria +44 -0
  236. data/lib/studium/exam_topics/cytogenetics_and_chromosome_biology +579 -0
  237. data/lib/studium/exam_topics/databases_and_sql +126 -0
  238. data/lib/studium/exam_topics/dna_mutation_and_dna_repair +70 -0
  239. data/lib/studium/exam_topics/dna_replication +67 -0
  240. data/lib/studium/exam_topics/ecogenetics +26 -0
  241. data/lib/studium/exam_topics/ecological_agriculture +12 -0
  242. data/lib/studium/exam_topics/ecology +330 -0
  243. data/lib/studium/exam_topics/economy +218 -0
  244. data/lib/studium/exam_topics/electron_microscopy +7 -0
  245. data/lib/studium/exam_topics/elektronenmikroskopie +356 -0
  246. data/lib/studium/exam_topics/elektrophorese +132 -0
  247. data/lib/studium/exam_topics/elektrotechnik_und_elektrizit/303/244t +42 -0
  248. data/lib/studium/exam_topics/elisa +55 -0
  249. data/lib/studium/exam_topics/embryologie_und_entwicklung +650 -0
  250. data/lib/studium/exam_topics/endospores_and_spores +104 -0
  251. data/lib/studium/exam_topics/enzymes_and_cofactors +393 -0
  252. data/lib/studium/exam_topics/epigenetik +187 -0
  253. data/lib/studium/exam_topics/erste_hilfe +174 -0
  254. data/lib/studium/exam_topics/ethik +143 -0
  255. data/lib/studium/exam_topics/evolution_and_evolutionary_genetics +367 -0
  256. data/lib/studium/exam_topics/excel +7 -0
  257. data/lib/studium/exam_topics/fish +19 -0
  258. data/lib/studium/exam_topics/fluorescence_microscopy +10 -0
  259. data/lib/studium/exam_topics/food_microbiology_and_food_biotechnology +92 -0
  260. data/lib/studium/exam_topics/forensik +11 -0
  261. data/lib/studium/exam_topics/forstwirtschaft +53 -0
  262. data/lib/studium/exam_topics/fortgeschrittene_genetik +643 -0
  263. data/lib/studium/exam_topics/fortgeschrittene_gentechnik +218 -0
  264. data/lib/studium/exam_topics/fortgeschrittene_physik +6 -0
  265. data/lib/studium/exam_topics/fungi +119 -0
  266. data/lib/studium/exam_topics/genetische_krankheiten +198 -0
  267. data/lib/studium/exam_topics/genexpression +1008 -0
  268. data/lib/studium/exam_topics/genomics_and_metagenomics +280 -0
  269. data/lib/studium/exam_topics/gentechnik_und_praktische_biochemie +954 -0
  270. data/lib/studium/exam_topics/geochemistry +67 -0
  271. data/lib/studium/exam_topics/geography +9 -0
  272. data/lib/studium/exam_topics/geologie_und_mineralogie +624 -0
  273. data/lib/studium/exam_topics/geometrie +56 -0
  274. data/lib/studium/exam_topics/geschichte +95 -0
  275. data/lib/studium/exam_topics/gluconeogenesis +72 -0
  276. data/lib/studium/exam_topics/glycogen +45 -0
  277. data/lib/studium/exam_topics/glycolysis +118 -0
  278. data/lib/studium/exam_topics/glykomik +121 -0
  279. data/lib/studium/exam_topics/glyoxylatzyklus +31 -0
  280. data/lib/studium/exam_topics/grassland_cultivation +32 -0
  281. data/lib/studium/exam_topics/hormone +148 -0
  282. data/lib/studium/exam_topics/html +8 -0
  283. data/lib/studium/exam_topics/human_ecology +8 -0
  284. data/lib/studium/exam_topics/hygiene +224 -0
  285. data/lib/studium/exam_topics/imaging_and_microscopy +267 -0
  286. data/lib/studium/exam_topics/immunanalytik +94 -0
  287. data/lib/studium/exam_topics/immunologie +1011 -0
  288. data/lib/studium/exam_topics/informatik +117 -0
  289. data/lib/studium/exam_topics/innate_immunity +42 -0
  290. data/lib/studium/exam_topics/insekten +64 -0
  291. data/lib/studium/exam_topics/insulin_and_diabetes +57 -0
  292. data/lib/studium/exam_topics/java +618 -0
  293. data/lib/studium/exam_topics/javascript +20 -0
  294. data/lib/studium/exam_topics/klima +6 -0
  295. data/lib/studium/exam_topics/kryptographie +9 -0
  296. data/lib/studium/exam_topics/landtechnik +26 -0
  297. data/lib/studium/exam_topics/lebensmittel_und_getr/303/244nke +223 -0
  298. data/lib/studium/exam_topics/lebensmitteltechnologie +16 -0
  299. data/lib/studium/exam_topics/light_microscopy +19 -0
  300. data/lib/studium/exam_topics/linux_and_unix +36 -0
  301. data/lib/studium/exam_topics/lipids +141 -0
  302. data/lib/studium/exam_topics/macroeconomics +39 -0
  303. data/lib/studium/exam_topics/marketing +7 -0
  304. data/lib/studium/exam_topics/mathematics +297 -0
  305. data/lib/studium/exam_topics/medizin_und_biomedizinische_technik +254 -0
  306. data/lib/studium/exam_topics/medizinische_chemie_und_pharmazie +437 -0
  307. data/lib/studium/exam_topics/messtechnik_und_regeltechnik +104 -0
  308. data/lib/studium/exam_topics/metabolismus +478 -0
  309. data/lib/studium/exam_topics/meteorologie_und_atmosph/303/244re +120 -0
  310. data/lib/studium/exam_topics/microbial_ecology +36 -0
  311. data/lib/studium/exam_topics/microcontrollers +11 -0
  312. data/lib/studium/exam_topics/mikrobielle_lebensgemeinschaften +54 -0
  313. data/lib/studium/exam_topics/mikrobielle_physiologie +285 -0
  314. data/lib/studium/exam_topics/mitochondria +40 -0
  315. data/lib/studium/exam_topics/mixed +287 -0
  316. data/lib/studium/exam_topics/molecular_biology_of_plants +272 -0
  317. data/lib/studium/exam_topics/molekulare_medizin +133 -0
  318. data/lib/studium/exam_topics/nanotechnologie +453 -0
  319. data/lib/studium/exam_topics/nature_conservation_and_biodiversity +244 -0
  320. data/lib/studium/exam_topics/naturstoffe +9 -0
  321. data/lib/studium/exam_topics/netzwerke +63 -0
  322. data/lib/studium/exam_topics/neurobiology +307 -0
  323. data/lib/studium/exam_topics/nucleotide_sequencing +41 -0
  324. data/lib/studium/exam_topics/nutztierethologie +11 -0
  325. data/lib/studium/exam_topics/object_oriented_modeling +14 -0
  326. data/lib/studium/exam_topics/obstbau +249 -0
  327. data/lib/studium/exam_topics/organische_chemie +1007 -0
  328. data/lib/studium/exam_topics/organische_chemie_2 +136 -0
  329. data/lib/studium/exam_topics/paleobiology +39 -0
  330. data/lib/studium/exam_topics/parasitic_diseases_and_molecular_infection_biology +336 -0
  331. data/lib/studium/exam_topics/patent_law +55 -0
  332. data/lib/studium/exam_topics/pathologie +731 -0
  333. data/lib/studium/exam_topics/pcr +155 -0
  334. data/lib/studium/exam_topics/pentosephosphatweg +61 -0
  335. data/lib/studium/exam_topics/peroxisomes_glycosomes_and_lysosomes +66 -0
  336. data/lib/studium/exam_topics/pflanzenanatomie +261 -0
  337. data/lib/studium/exam_topics/pflanzenbau +24 -0
  338. data/lib/studium/exam_topics/pflanzenschutz +35 -0
  339. data/lib/studium/exam_topics/pflanzenwissenschaften +1009 -0
  340. data/lib/studium/exam_topics/pharmaceutical_biotechnology +251 -0
  341. data/lib/studium/exam_topics/physik +446 -1
  342. data/lib/studium/exam_topics/physikalische_chemie +79 -0
  343. data/lib/studium/exam_topics/physiology_and_histology +536 -0
  344. data/lib/studium/exam_topics/phytochemie +33 -0
  345. data/lib/studium/exam_topics/plant_biotechnology +131 -0
  346. data/lib/studium/exam_topics/plant_breeding +64 -0
  347. data/lib/studium/exam_topics/plant_development +50 -0
  348. data/lib/studium/exam_topics/populationsgenetik +138 -0
  349. data/lib/studium/exam_topics/posttranslationale_modifikation_von_proteinen +197 -0
  350. data/lib/studium/exam_topics/projektmanagement +220 -0
  351. data/lib/studium/exam_topics/prokaryote_genetics +562 -0
  352. data/lib/studium/exam_topics/protein_engineering +35 -0
  353. data/lib/studium/exam_topics/proteolyse +38 -0
  354. data/lib/studium/exam_topics/proteomik +41 -0
  355. data/lib/studium/exam_topics/protozoans +24 -0
  356. data/lib/studium/exam_topics/prozesstechnik +95 -0
  357. data/lib/studium/exam_topics/psychologie +18 -0
  358. data/lib/studium/exam_topics/python +372 -0
  359. data/lib/studium/exam_topics/quality_management +266 -0
  360. data/lib/studium/exam_topics/rechtsgrundlagen +123 -0
  361. data/lib/studium/exam_topics/research_topics_in_immunobiology +42 -0
  362. data/lib/studium/exam_topics/rna_and_dna +519 -0
  363. data/lib/studium/exam_topics/rna_seq +13 -0
  364. data/lib/studium/exam_topics/robotics +12 -0
  365. data/lib/studium/exam_topics/ruby +238 -0
  366. data/lib/studium/exam_topics/ruby_on_rails +63 -0
  367. data/lib/studium/exam_topics/scientific_writing_and_publishing +38 -0
  368. data/lib/studium/exam_topics/semisynthese_von_proteinen_und_nukleotiden +120 -0
  369. data/lib/studium/exam_topics/sexualbiologie +183 -0
  370. data/lib/studium/exam_topics/signal_transduction_and_laser_systems +212 -0
  371. data/lib/studium/exam_topics/sozialbiologie +9 -0
  372. data/lib/studium/exam_topics/splicing_exons_and_introns +65 -0
  373. data/lib/studium/exam_topics/statistik +268 -0
  374. data/lib/studium/exam_topics/stemcells +181 -0
  375. data/lib/studium/exam_topics/stickstofffixierung +91 -0
  376. data/lib/studium/exam_topics/structural_bioinformatics +54 -0
  377. data/lib/studium/exam_topics/strukturbiologie +423 -0
  378. data/lib/studium/exam_topics/system_biology_and_synthetic_biology +108 -0
  379. data/lib/studium/exam_topics/systematische_zoologie +439 -0
  380. data/lib/studium/exam_topics/technical_ecology +144 -0
  381. data/lib/studium/exam_topics/technische_chemie +208 -0
  382. data/lib/studium/exam_topics/technische_grundlagen_der_informatik +39 -0
  383. data/lib/studium/exam_topics/technische_mikrobiologie +393 -0
  384. data/lib/studium/exam_topics/technisches_zeichnen +5 -0
  385. data/lib/studium/exam_topics/the_bacterial_cell_wall +98 -0
  386. data/lib/studium/exam_topics/the_c_plus_plus_programming_language +531 -0
  387. data/lib/studium/exam_topics/the_c_programming_language +133 -0
  388. data/lib/studium/exam_topics/the_cellcycle +98 -0
  389. data/lib/studium/exam_topics/the_european_union +121 -0
  390. data/lib/studium/exam_topics/the_interferon_system +39 -0
  391. data/lib/studium/exam_topics/the_microbiome +164 -0
  392. data/lib/studium/exam_topics/the_universe +31 -0
  393. data/lib/studium/exam_topics/theoretische_chemie +5 -0
  394. data/lib/studium/exam_topics/theoretische_informatik +161 -0
  395. data/lib/studium/exam_topics/thermodynamics +21 -0
  396. data/lib/studium/exam_topics/tierzucht +139 -0
  397. data/lib/studium/exam_topics/toxikologie +453 -0
  398. data/lib/studium/exam_topics/transcription +185 -0
  399. data/lib/studium/exam_topics/translation_ribosomes_and_translational_control +154 -0
  400. data/lib/studium/exam_topics/umweltbiotechnologie +64 -0
  401. data/lib/studium/exam_topics/umweltchemie +233 -0
  402. data/lib/studium/exam_topics/urbanism_and_traffic +19 -0
  403. data/lib/studium/exam_topics/urea_cycle +56 -0
  404. data/lib/studium/exam_topics/vaccines_and_vaccination +250 -0
  405. data/lib/studium/exam_topics/vectors_and_gene_therapy +247 -0
  406. data/lib/studium/exam_topics/verfahrenstechnik +37 -0
  407. data/lib/studium/exam_topics/verhaltensbiologie +56 -0
  408. data/lib/studium/exam_topics/veterinary_medicine +10 -0
  409. data/lib/studium/exam_topics/vitamine +32 -0
  410. data/lib/studium/exam_topics/wasserkunde +138 -0
  411. data/lib/studium/exam_topics/weinbau +86 -0
  412. data/lib/studium/exam_topics/wissenschaft +20 -0
  413. data/lib/studium/exam_topics/yeast +104 -0
  414. data/lib/studium/exam_topics/zoologie +334 -0
  415. data/lib/studium/exams/afterburn/afterburn.rb +304 -0
  416. data/lib/studium/exams/ask_exam_from_the_upcoming_exams_pool.rb +150 -0
  417. data/lib/studium/exams/ask_exam_question/ask_exam_question.rb +2757 -0
  418. data/lib/studium/exams/ask_exam_topic_question.rb +112 -0
  419. data/lib/studium/exams/ask_question_from_alias.rb +141 -0
  420. data/lib/studium/exams/ask_question_from_any_of_the_still_missing_lectures.rb +130 -0
  421. data/lib/studium/exams/ask_question_from_grouped_themes.rb +141 -0
  422. data/lib/studium/exams/ask_question_from_last_topic.rb +91 -0
  423. data/lib/studium/exams/ask_random_question.rb +195 -0
  424. data/lib/studium/exams/autoinclude.rb +7 -0
  425. data/lib/studium/exams/average_grade/average_grade.rb +402 -0
  426. data/lib/studium/exams/csv/create_csv_passed_exams_file.rb +217 -0
  427. data/lib/studium/exams/cycle.rb +291 -0
  428. data/lib/studium/exams/dataset/dataset.rb +128 -0
  429. data/lib/studium/exams/designate_ten_random_exam_topics/designate_ten_random_exam_topics.rb +88 -0
  430. data/lib/studium/exams/exam/exam.rb +130 -0
  431. data/lib/studium/exams/exam_bubble/exam_bubble.rb +445 -0
  432. data/lib/studium/exams/exam_bubble/menu_for_the_main_loop.rb +111 -0
  433. data/lib/studium/exams/exam_question/README.md +3 -0
  434. data/lib/studium/exams/exam_question/exam_question.rb +427 -0
  435. data/lib/studium/exams/exam_registration_at/constants.rb +49 -0
  436. data/lib/studium/exams/exam_registration_at/exam_registration_at.rb +242 -0
  437. data/lib/studium/exams/exam_registration_at/help.rb +46 -0
  438. data/lib/studium/exams/exam_registration_at/menu.rb +81 -0
  439. data/lib/studium/exams/exam_registration_at/report_and_show.rb +133 -0
  440. data/lib/studium/exams/exam_registration_at/reset.rb +54 -0
  441. data/lib/studium/exams/exam_statistics_from_this_file/exam_statistics_from_this_file.rb +119 -0
  442. data/lib/studium/exams/exam_topics.rb +194 -0
  443. data/lib/studium/exams/exams.rb +20 -0
  444. data/lib/studium/exams/exams_per_month/exams_per_month.rb +2429 -0
  445. data/lib/studium/exams/exams_this_week.rb +182 -0
  446. data/lib/studium/exams/fix_exam_dates.rb +121 -0
  447. data/lib/studium/exams/frozen.rb +36 -0
  448. data/lib/studium/exams/last_exams/last_exams.rb +398 -0
  449. data/lib/studium/exams/lectures_without_exam_entry.rb +137 -0
  450. data/lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb +1359 -0
  451. data/lib/studium/exams/move_all_unsolved_exam_questions_to_the_top_of_the_file.rb +173 -0
  452. data/lib/studium/exams/move_the_last_exam_question_to_the_top_of_the_file/move_the_last_exam_question_to_the_top_of_the_file.rb +111 -0
  453. data/lib/studium/exams/n_exams_in_these_topics.rb +477 -0
  454. data/lib/studium/exams/next_exam.rb +107 -0
  455. data/lib/studium/exams/next_exams.rb +378 -0
  456. data/lib/studium/exams/open_exam_associated_url/open_exam_associated_url.rb +154 -0
  457. data/lib/studium/exams/open_last_exam_question_asked_file/constants.rb +15 -0
  458. data/lib/studium/exams/open_last_exam_question_asked_file/initialize.rb +29 -0
  459. data/lib/studium/exams/open_last_exam_question_asked_file/open_last_exam_question_asked_file.rb +110 -0
  460. data/lib/studium/exams/push_solved_questions_on_top.rb +180 -0
  461. data/lib/studium/exams/questions_solved_from_day_to_day/questions_solved_from_day_to_day.rb +374 -0
  462. data/lib/studium/exams/remote_ftp_url.rb +52 -0
  463. data/lib/studium/exams/repeat_last_question.rb +78 -0
  464. data/lib/studium/exams/report_total_amount_of_questions_and_answers_for.rb +116 -0
  465. data/lib/studium/exams/show_all_passed_exams_of_this_university.rb +252 -0
  466. data/lib/studium/exams/show_backlog_of_exams/show_backlog_of_exams.rb +116 -0
  467. data/lib/studium/exams/show_next_exams_for.rb +133 -0
  468. data/lib/studium/exams/show_themes/constants.rb +28 -0
  469. data/lib/studium/exams/show_themes/menu.rb +61 -0
  470. data/lib/studium/exams/show_themes/misc.rb +537 -0
  471. data/lib/studium/exams/show_themes/reset.rb +62 -0
  472. data/lib/studium/exams/show_themes/show_themes.rb +27 -0
  473. data/lib/studium/exams/show_upcoming_exams/show_upcoming_exams.rb +1375 -0
  474. data/lib/studium/exams/solve_all_questions_from_this_topic.rb +114 -0
  475. data/lib/studium/exams/solved/constants.rb +32 -0
  476. data/lib/studium/exams/solved/help.rb +24 -0
  477. data/lib/studium/exams/solved/initialize.rb +55 -0
  478. data/lib/studium/exams/solved/menu.rb +41 -0
  479. data/lib/studium/exams/solved/reset.rb +28 -0
  480. data/lib/studium/exams/solved/solved.rb +326 -0
  481. data/lib/studium/exams/timetable/constants.rb +142 -0
  482. data/lib/studium/exams/timetable/timetable.rb +450 -0
  483. data/lib/studium/exams/unsolve_all_questions_from_this_topic.rb +163 -0
  484. data/lib/studium/exams/upcoming_exams/upcoming_exams.rb +556 -0
  485. data/lib/studium/exams/upcoming_exams_at_the_boku/constants.rb +23 -0
  486. data/lib/studium/exams/upcoming_exams_at_the_boku/html.rb +64 -0
  487. data/lib/studium/exams/upcoming_exams_at_the_boku/upcoming_exams_at_the_boku.rb +194 -0
  488. data/lib/studium/exams/upcoming_exams_dataset.rb +247 -0
  489. data/lib/studium/exams/upcoming_registered_exams/upcoming_registered_exams.rb +257 -0
  490. data/lib/studium/exams/upload_exam_topics.rb +360 -0
  491. data/lib/studium/graphviz/README.md +4 -0
  492. data/lib/studium/graphviz/bachelor_vector_based_strategies.dot +160 -0
  493. data/lib/studium/graphviz/master_vector_based_strategies.dot +46 -0
  494. data/lib/studium/gui/gtk3/README.md +1 -0
  495. data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.config +6 -0
  496. data/lib/studium/gui/gtk3/ask_exam_question/ask_exam_question.rb +760 -0
  497. data/lib/studium/gui/gtk3/ask_exam_question/manifest.yml +12 -0
  498. data/lib/studium/gui/gtk3/control_panel/control_panel.rb +39 -0
  499. data/lib/studium/gui/gtk3/curriculum_viewer/curriculum_viewer.rb +513 -0
  500. data/lib/studium/gui/gtk3/ects_per_university/ects_per_university.rb +217 -0
  501. data/lib/studium/gui/gtk3/exam_question_widget/exam_question_widget.rb +1889 -0
  502. data/lib/studium/gui/gtk3/expand_time_range/expand_time_range.rb +34 -0
  503. data/lib/studium/gui/gtk3/information_about_a_lecture/information_about_a_lecture.rb +34 -0
  504. data/lib/studium/gui/gtk3/lecture_information/lecture_information.rb +200 -0
  505. data/lib/studium/gui/gtk3/show_upcoming_exams/show_upcoming_exams.rb +34 -0
  506. data/lib/studium/gui/java/exam_question/ExamQuestion$1.class +0 -0
  507. data/lib/studium/gui/java/exam_question/ExamQuestion.class +0 -0
  508. data/lib/studium/gui/java/exam_question/ExamQuestion.java +215 -0
  509. data/lib/studium/gui/javafx/exam_question_widget/exam_question_widget.rb +58 -0
  510. data/lib/studium/gui/jruby/exam_question_widget/exam_question_widget.rb +317 -0
  511. data/lib/studium/gui/libui/ask_exam_question/ask_exam_question.rb +349 -0
  512. data/lib/studium/gui/shared_code/control_panel/control_panel_module.rb +314 -0
  513. data/lib/studium/gui/shared_code/exam_question_widget/exam_question_widget_module.rb +39 -0
  514. data/lib/studium/gui/shared_code/expand_time_range/expand_time_range.css +0 -0
  515. data/lib/studium/gui/shared_code/expand_time_range/expand_time_range_module.rb +190 -0
  516. data/lib/studium/gui/shared_code/information_about_a_lecture/information_about_a_lecture_module.rb +180 -0
  517. data/lib/studium/gui/shared_code/show_upcoming_exams/show_upcoming_exams_module.rb +206 -0
  518. data/lib/studium/images/libui_ask_exam_question.png +0 -0
  519. data/lib/studium/images/outdated.png +0 -0
  520. data/lib/studium/images/small_logos/DNA.png +0 -0
  521. data/lib/studium/images/small_logos/README.md +2 -0
  522. data/lib/studium/images/small_logos/solved.png +0 -0
  523. data/lib/studium/images/studies_favicon.png +0 -0
  524. data/lib/studium/java/README.md +5 -0
  525. data/lib/studium/java/studium/AskExamQuestion.java +461 -0
  526. data/lib/studium/java/studium/Base.java +123 -0
  527. data/lib/studium/java/studium/Constants.java +122 -0
  528. data/lib/studium/java/studium/EnsureThatTheLogDirectoryExists.java +57 -0
  529. data/lib/studium/java/studium/Mkdir.java +13 -0
  530. data/lib/studium/java/studium/OpenLastExamQuestionurlLinkViaTheBrowser.java +90 -0
  531. data/lib/studium/java/studium/ReturnNQuestionsSolvedInTotal.java +69 -0
  532. data/lib/studium/java/studium/Solved.java +112 -0
  533. data/lib/studium/java/studium/Test.java +60 -0
  534. data/lib/studium/java/studium/studium/AskExamQuestion.class +0 -0
  535. data/lib/studium/java/studium/studium/Base.class +0 -0
  536. data/lib/studium/java/studium/studium/Constants.class +0 -0
  537. data/lib/studium/java/studium/studium/EnsureThatTheLogDirectoryExists.class +0 -0
  538. data/lib/studium/java/studium/studium/Mkdir.class +0 -0
  539. data/lib/studium/java/studium/studium/OpenLastExamQuestionurlLinkViaTheBrowser.class +0 -0
  540. data/lib/studium/java/studium/studium/ReturnNQuestionsSolvedInTotal.class +0 -0
  541. data/lib/studium/java/studium/studium/Solved.class +0 -0
  542. data/lib/studium/java/studium/studium/Test.class +0 -0
  543. data/lib/studium/jobs/jobs.rb +80 -0
  544. data/lib/studium/logging/README.md +2 -0
  545. data/lib/studium/logging/ensure_that_the_log_directory_exists.rb +58 -0
  546. data/lib/studium/logging/html_log_directory.rb +42 -0
  547. data/lib/studium/logging/log_directory.rb +112 -0
  548. data/lib/studium/logging/store_last_question_asked_into_file.rb +137 -0
  549. data/lib/studium/parsers/README.md +2 -0
  550. data/lib/studium/parsers/custom_exam_results_parser.rb +209 -0
  551. data/lib/studium/parsers/parse_lva_dates.rb +233 -0
  552. data/lib/studium/parsers/parse_remote_lecture.rb +331 -0
  553. data/lib/studium/project/project.rb +88 -0
  554. data/lib/studium/requires/common_popular_requires.rb +37 -0
  555. data/lib/studium/requires/commonly_used_requires.rb +14 -0
  556. data/lib/studium/requires/require_class_exams_solved.rb +7 -0
  557. data/lib/studium/requires/require_ects_scripts.rb +27 -0
  558. data/lib/studium/requires/require_encoding.rb +7 -0
  559. data/lib/studium/requires/require_the_check_and_sanitize_files.rb +31 -0
  560. data/lib/studium/requires/require_the_curricula_files.rb +28 -0
  561. data/lib/studium/requires/require_the_exam_question_class.rb +7 -0
  562. data/lib/studium/requires/require_the_exams_files.rb +46 -0
  563. data/lib/studium/requires/require_the_logging_files.rb +23 -0
  564. data/lib/studium/requires/require_the_parsers.rb +28 -0
  565. data/lib/studium/requires/require_the_studium_constants.rb +10 -0
  566. data/lib/studium/requires/require_the_studium_project.rb +70 -0
  567. data/lib/studium/requires/require_the_toplevel_methods.rb +27 -0
  568. data/lib/studium/requires/require_the_utility_scripts.rb +34 -0
  569. data/lib/studium/requires/require_upcoming_exams.rb +7 -0
  570. data/lib/studium/requires/require_yaml.rb +7 -0
  571. data/lib/studium/requires/return_remote_homepage_of_this_lecture.rb +7 -0
  572. data/lib/studium/requires/with_GUI.rb +13 -0
  573. data/lib/studium/requires/www_mode.rb +17 -0
  574. data/lib/studium/statistics/README.md +4 -0
  575. data/lib/studium/statistics/best_exam_months.rb +92 -0
  576. data/lib/studium/statistics/curriculum_comparer/curriculum_comparer.rb +386 -0
  577. data/lib/studium/statistics/determine_exam_statistics_from_this_file.rb +142 -0
  578. data/lib/studium/statistics/exam_topics_that_are_about_to_be_completed.rb +119 -0
  579. data/lib/studium/statistics/max_stats.rb +170 -0
  580. data/lib/studium/statistics/new_questions_per_year.rb +147 -0
  581. data/lib/studium/statistics/report_how_many_ects_points_per_curriculum_were_completed.rb +167 -0
  582. data/lib/studium/statistics/report_how_many_exam_questions_were_answered.rb +474 -0
  583. data/lib/studium/statistics/show_exam_statistics.rb +66 -0
  584. data/lib/studium/statistics/show_which_courses_are_in_a_bachelor_or_master_curriculum_respectively.rb +104 -0
  585. data/lib/studium/statistics/top_stats.rb +127 -0
  586. data/lib/studium/toplevel_methods/all_passed_exams.rb +37 -0
  587. data/lib/studium/toplevel_methods/already_solved_this_lecture.rb +101 -0
  588. data/lib/studium/toplevel_methods/available_topics.rb +161 -0
  589. data/lib/studium/toplevel_methods/calculate_pr/303/274fungsimmanente_lectures_from_this_file.rb +55 -0
  590. data/lib/studium/toplevel_methods/copy_the_last_backup_of_file_lecture_information.rb +34 -0
  591. data/lib/studium/toplevel_methods/curriculum_related_code.rb +1038 -0
  592. data/lib/studium/toplevel_methods/does_this_course_require_mandatory_presence.rb +52 -0
  593. data/lib/studium/toplevel_methods/download.rb +161 -0
  594. data/lib/studium/toplevel_methods/e.rb +16 -0
  595. data/lib/studium/toplevel_methods/ects_from_lectures.rb +250 -0
  596. data/lib/studium/toplevel_methods/editor.rb +67 -0
  597. data/lib/studium/toplevel_methods/esystem.rb +29 -0
  598. data/lib/studium/toplevel_methods/filter_away_invalid_questions.rb +77 -0
  599. data/lib/studium/toplevel_methods/find_exam_topic_and_exam_title.rb +3807 -0
  600. data/lib/studium/toplevel_methods/has_this_lecture_been_already_passed_but_the_id_was_changed_lateron.rb +42 -0
  601. data/lib/studium/toplevel_methods/has_this_module_been_completed.rb +208 -0
  602. data/lib/studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb +32 -0
  603. data/lib/studium/toplevel_methods/is_on_roebe.rb +27 -0
  604. data/lib/studium/toplevel_methods/is_this_exam_topic_included.rb +46 -0
  605. data/lib/studium/toplevel_methods/is_this_homepage_registered.rb +32 -0
  606. data/lib/studium/toplevel_methods/is_this_lecture_a_practical_course.rb +93 -0
  607. data/lib/studium/toplevel_methods/is_this_lecture_registered_in_upcoming_exams.rb +45 -0
  608. data/lib/studium/toplevel_methods/java.rb +32 -0
  609. data/lib/studium/toplevel_methods/lecture_information.rb +108 -0
  610. data/lib/studium/toplevel_methods/lva_numbers.rb +358 -0
  611. data/lib/studium/toplevel_methods/main_dataset.rb +73 -0
  612. data/lib/studium/toplevel_methods/map_input_to_this_curriculum_filename.rb +607 -0
  613. data/lib/studium/toplevel_methods/methods_related_to_files_and_directories.rb +481 -0
  614. data/lib/studium/toplevel_methods/misc.rb +580 -0
  615. data/lib/studium/toplevel_methods/n_questions_available.rb +141 -0
  616. data/lib/studium/toplevel_methods/n_topics_available.rb +63 -0
  617. data/lib/studium/toplevel_methods/names_of_all_solved_exams.rb +77 -0
  618. data/lib/studium/toplevel_methods/note_down_the_start_time_and_how_many_exams_have_been_already_solved.rb +69 -0
  619. data/lib/studium/toplevel_methods/opnn.rb +27 -0
  620. data/lib/studium/toplevel_methods/passed_this_exam_on.rb +105 -0
  621. data/lib/studium/toplevel_methods/read_delay_between_questions_from_file.rb +36 -0
  622. data/lib/studium/toplevel_methods/regexes.rb +90 -0
  623. data/lib/studium/toplevel_methods/registered_for_this_exam.rb +83 -0
  624. data/lib/studium/toplevel_methods/remove_comments.rb +27 -0
  625. data/lib/studium/toplevel_methods/remove_exam_topics_that_were_already_answered.rb +27 -0
  626. data/lib/studium/toplevel_methods/remove_tags.rb +35 -0
  627. data/lib/studium/toplevel_methods/report.rb +439 -0
  628. data/lib/studium/toplevel_methods/return_all_exams_on_this_day.rb +69 -0
  629. data/lib/studium/toplevel_methods/return_dataset_for_this_exam_topic.rb +45 -0
  630. data/lib/studium/toplevel_methods/return_ects_from_this_lecture_stored_in_the_file_lecture_information.rb +194 -0
  631. data/lib/studium/toplevel_methods/return_hash_of_already_solved_lectures.rb +46 -0
  632. data/lib/studium/toplevel_methods/return_last_exam_question.rb +34 -0
  633. data/lib/studium/toplevel_methods/return_lva_number_of_this_lecture.rb +72 -0
  634. data/lib/studium/toplevel_methods/return_n_percent_solved_from_this_topic.rb +90 -0
  635. data/lib/studium/toplevel_methods/return_n_questions_were_answered_for_this_topic.rb +62 -0
  636. data/lib/studium/toplevel_methods/return_proper_university_image.rb +86 -0
  637. data/lib/studium/toplevel_methods/return_question_answer_string_from_this_topic.rb +63 -0
  638. data/lib/studium/toplevel_methods/return_remote_homepage_of_this_lecture.rb +11311 -0
  639. data/lib/studium/toplevel_methods/return_remote_moodle_link_of_this_lecture.rb +2405 -0
  640. data/lib/studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb +110 -0
  641. data/lib/studium/toplevel_methods/return_theme_of_the_next_upcoming_exam.rb +40 -0
  642. data/lib/studium/toplevel_methods/runmode.rb +97 -0
  643. data/lib/studium/toplevel_methods/sanitized_dataset_from_file_passed_exams_per_month.rb +53 -0
  644. data/lib/studium/toplevel_methods/set_last_file_for_exam_questions.rb +64 -0
  645. data/lib/studium/toplevel_methods/set_this_cd_alias_to.rb +92 -0
  646. data/lib/studium/toplevel_methods/spacer.rb +18 -0
  647. data/lib/studium/toplevel_methods/time.rb +297 -0
  648. data/lib/studium/toplevel_methods/total_ects_points_passed.rb +73 -0
  649. data/lib/studium/toplevel_methods/try_to_guess_the_most_likely_lva_id.rb +58 -0
  650. data/lib/studium/toplevel_methods/try_to_return_the_expanded_name_of_this_lecture.rb +64 -0
  651. data/lib/studium/toplevel_methods/unfinished.rb +51 -0
  652. data/lib/studium/toplevel_methods/url.rb +106 -0
  653. data/lib/studium/toplevel_methods/verbose_truth.rb +36 -0
  654. data/lib/studium/toplevel_methods/when_was_this_lecture_passed.rb +54 -0
  655. data/lib/studium/toplevel_methods/word_wrap.rb +56 -0
  656. data/lib/studium/toplevel_methods/write_into_file_related_functionality.rb +197 -0
  657. data/lib/studium/toplevel_methods/yes_or_no_ja_oder_nein.rb +33 -0
  658. data/lib/studium/universities_in_austria/README.md +2 -0
  659. data/lib/studium/universities_in_austria/boku/README.md +4 -0
  660. data/lib/studium/universities_in_austria/boku/boku_/303/266ffnungszeiten.rb +28 -0
  661. data/lib/studium/universities_in_austria/boku/show_three_pillars_of_these_lectures.rb +110 -0
  662. data/lib/studium/universities_in_austria/boku/three_pillars.rb +237 -0
  663. data/lib/studium/universities_in_austria/tu_vienna/README.md +6 -0
  664. data/lib/studium/universities_in_austria/tu_vienna/tu_ferien.rb +42 -0
  665. data/lib/studium/universities_in_austria/tu_vienna/tu_/303/266ffnungszeiten.rb +34 -0
  666. data/lib/studium/university_course/university_course.rb +409 -0
  667. data/lib/studium/utility_scripts/attribute_lectures_to_university/attribute_lectures_to_university.rb +375 -0
  668. data/lib/studium/utility_scripts/audio_stats.rb +171 -0
  669. data/lib/studium/utility_scripts/auto_stud/auto_stud.rb +252 -0
  670. data/lib/studium/utility_scripts/auto_stud/constants.rb +18 -0
  671. data/lib/studium/utility_scripts/auto_stud/initialize.rb +23 -0
  672. data/lib/studium/utility_scripts/auto_stud/misc.rb +18 -0
  673. data/lib/studium/utility_scripts/autopurge_this_lecture_date.rb +93 -0
  674. data/lib/studium/utility_scripts/average_grade_of_this_curriculum.rb +155 -0
  675. data/lib/studium/utility_scripts/blocked_courses.rb +146 -0
  676. data/lib/studium/utility_scripts/calendar/README.md +2 -0
  677. data/lib/studium/utility_scripts/calendar/calendar.rb +251 -0
  678. data/lib/studium/utility_scripts/calendar/misc.rb +35 -0
  679. data/lib/studium/utility_scripts/check_description_of_these_lectures.rb +221 -0
  680. data/lib/studium/utility_scripts/course_registrations/course_registrations.rb +98 -0
  681. data/lib/studium/utility_scripts/courses/courses.rb +177 -0
  682. data/lib/studium/utility_scripts/create/README.md +2 -0
  683. data/lib/studium/utility_scripts/create/webpage_of_university.rb +129 -0
  684. data/lib/studium/utility_scripts/create/webpage_of_university_BOKU.rb +61 -0
  685. data/lib/studium/utility_scripts/create/webpage_of_university_TU.rb +60 -0
  686. data/lib/studium/utility_scripts/create/webpage_of_university_UniWien.rb +60 -0
  687. data/lib/studium/utility_scripts/create_database/create_database.rb +106 -0
  688. data/lib/studium/utility_scripts/current_lectures_belonging_to_both_bachelor_and_master_curriculum.rb +113 -0
  689. data/lib/studium/utility_scripts/currently_participating_in_these_lectures/currently_participating_in_these_lectures.rb +104 -0
  690. data/lib/studium/utility_scripts/display_lecture_url/display_lecture_url.rb +176 -0
  691. data/lib/studium/utility_scripts/expand_time_range/expand_time_range.rb +521 -0
  692. data/lib/studium/utility_scripts/finished_exams_at_this_university/finished_exams_at_this_university.rb +173 -0
  693. data/lib/studium/utility_scripts/foreign_language_percentage/constants.rb +23 -0
  694. data/lib/studium/utility_scripts/foreign_language_percentage/foreign_language_percentage.rb +149 -0
  695. data/lib/studium/utility_scripts/foreign_language_percentage/help.rb +31 -0
  696. data/lib/studium/utility_scripts/foreign_language_percentage/initialize.rb +25 -0
  697. data/lib/studium/utility_scripts/foreign_language_percentage/menu.rb +158 -0
  698. data/lib/studium/utility_scripts/foreign_language_percentage/report.rb +62 -0
  699. data/lib/studium/utility_scripts/foreign_language_percentage/reset.rb +50 -0
  700. data/lib/studium/utility_scripts/foreign_language_percentage/run.rb +19 -0
  701. data/lib/studium/utility_scripts/generate_spreadsheet/generate_spreadsheet.rb +354 -0
  702. data/lib/studium/utility_scripts/generate_spreadsheet/misc.rb +144 -0
  703. data/lib/studium/utility_scripts/holidays/holidays.rb +156 -0
  704. data/lib/studium/utility_scripts/homepage_of_these_courses/homepage_of_these_courses.rb +125 -0
  705. data/lib/studium/utility_scripts/lectures_attributed_to_universities/lectures_attributed_to_universities.rb +336 -0
  706. data/lib/studium/utility_scripts/lva_dates_of_the_important_courses.rb +111 -0
  707. data/lib/studium/utility_scripts/lva_nummer/lva_nummer.rb +431 -0
  708. data/lib/studium/utility_scripts/mandatory_lectures_in_this_month/mandatory_lectures_in_this_month.rb +316 -0
  709. data/lib/studium/utility_scripts/moodle/moodle.rb +213 -0
  710. data/lib/studium/utility_scripts/name_of_this_lva_id/name_of_this_lva_id.rb +110 -0
  711. data/lib/studium/utility_scripts/new_stud.rb +324 -0
  712. data/lib/studium/utility_scripts/next_week/next_week.rb +103 -0
  713. data/lib/studium/utility_scripts/not_yet_registered/not_yet_registered.rb +120 -0
  714. data/lib/studium/utility_scripts/open_last_exam_question_url_link_via_the_browser.rb +76 -0
  715. data/lib/studium/utility_scripts/passed_ects_per_year/passed_ects_per_year.rb +313 -0
  716. data/lib/studium/utility_scripts/passed_pr/303/274fungsimmanente_courses/passed_pr/303/274fungsimmanente_courses.rb +181 -0
  717. data/lib/studium/utility_scripts/pdf/README.md +2 -0
  718. data/lib/studium/utility_scripts/pdf/create_pdf_file_for_this_exam_topic.rb +355 -0
  719. data/lib/studium/utility_scripts/pdf/hexapdf_support.rb +50 -0
  720. data/lib/studium/utility_scripts/preparatory_meetings/preparatory_meetings.rb +317 -0
  721. data/lib/studium/utility_scripts/priority/priority.rb +164 -0
  722. data/lib/studium/utility_scripts/priority_points/priority_points.rb +263 -0
  723. data/lib/studium/utility_scripts/publish_my_exams/publish_my_exams.rb +174 -0
  724. data/lib/studium/utility_scripts/regexes/README.md +1 -0
  725. data/lib/studium/utility_scripts/regexes/generate_regex.rb +314 -0
  726. data/lib/studium/utility_scripts/regexes/generate_regexes_for_the_available_moodle_links.rb +55 -0
  727. data/lib/studium/utility_scripts/regexes/generate_regexes_for_the_registered_lectures.rb +48 -0
  728. data/lib/studium/utility_scripts/report_outdated_timetable_entries/report_outdated_timetable_entries.rb +142 -0
  729. data/lib/studium/utility_scripts/report_whether_this_lecture_is_registered_in_the_file_lecture_information/report_whether_this_lecture_is_registered_in_the_file_lecture_information.rb +128 -0
  730. data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/individual_resolve_practical_courses_date_conflicts.rb +254 -0
  731. data/lib/studium/utility_scripts/resolve_practical_courses_date_conflicts/resolve_practical_courses_date_conflicts.rb +265 -0
  732. data/lib/studium/utility_scripts/scrape_remote_university_url.rb +138 -0
  733. data/lib/studium/utility_scripts/semester_schedule_creator/semester_container.rb +144 -0
  734. data/lib/studium/utility_scripts/semester_schedule_creator/semester_schedule_creator.rb +374 -0
  735. data/lib/studium/utility_scripts/semesterplaner/semesterplaner.rb +311 -0
  736. data/lib/studium/utility_scripts/set_aliases_based_on_this_file.rb +97 -0
  737. data/lib/studium/utility_scripts/show_all_passed_master_lectures/show_all_passed_master_lectures.rb +126 -0
  738. data/lib/studium/utility_scripts/show_conflicting_lva_lectures/show_conflicting_lva_lectures.rb +1385 -0
  739. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/constants.rb +23 -0
  740. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/menu.rb +63 -0
  741. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/reset.rb +33 -0
  742. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/run.rb +50 -0
  743. data/lib/studium/utility_scripts/show_descriptions_of_lectures_belonging_to_this_module/show_descriptions_of_lectures_belonging_to_this_module.rb +145 -0
  744. data/lib/studium/utility_scripts/show_lecturers/show_lecturers.rb +147 -0
  745. data/lib/studium/utility_scripts/show_lectures/show_lectures.rb +910 -0
  746. data/lib/studium/utility_scripts/show_lectures_fitting_to_this_language/show_lectures_fitting_to_this_language.rb +121 -0
  747. data/lib/studium/utility_scripts/show_lectures_fitting_to_this_theme/show_lectures_fitting_to_this_theme.rb +105 -0
  748. data/lib/studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb +3167 -0
  749. data/lib/studium/utility_scripts/show_lectures_on_this_day/show_lectures_on_this_day.rb +150 -0
  750. data/lib/studium/utility_scripts/show_lva_dates_of_this_lecture/show_lva_dates_of_this_lecture.rb +182 -0
  751. data/lib/studium/utility_scripts/show_mixed_bachelor_master_courses/show_mixed_bachelor_master_courses.rb +92 -0
  752. data/lib/studium/utility_scripts/show_outdated_lva_dates/show_outdated_lva_dates.rb +214 -0
  753. data/lib/studium/utility_scripts/show_passed_exams_having_this_grade/show_passed_exams_having_this_grade.rb +91 -0
  754. data/lib/studium/utility_scripts/show_solved_english_lectures/show_solved_english_lectures.rb +139 -0
  755. data/lib/studium/utility_scripts/steop/README.md +4 -0
  756. data/lib/studium/utility_scripts/steop/show_all_steop_lectures.rb +93 -0
  757. data/lib/studium/utility_scripts/steop/steop_lectures_in_this_curriculum.rb +284 -0
  758. data/lib/studium/utility_scripts/steop/steop_lva_dates.rb +119 -0
  759. data/lib/studium/utility_scripts/studienkennzahl/studienkennzahl.rb +116 -0
  760. data/lib/studium/utility_scripts/studium_skeleton/studium_skeleton.rb +242 -0
  761. data/lib/studium/utility_scripts/stundenplan.rb +600 -0
  762. data/lib/studium/utility_scripts/sync_studium_relevant_entries_one_level_downwards.rb +217 -0
  763. data/lib/studium/utility_scripts/ufind/ufind.rb +106 -0
  764. data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/constants.rb +26 -0
  765. data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/run.rb +20 -0
  766. data/lib/studium/utility_scripts/upcoming_mandatory_presence_courses/upcoming_mandatory_presence_courses.rb +187 -0
  767. data/lib/studium/utility_scripts/video_lecture_downloader/video_lecture_downloader.rb +107 -0
  768. data/lib/studium/utility_scripts/week_parser/constants.rb +23 -0
  769. data/lib/studium/utility_scripts/week_parser/help.rb +32 -0
  770. data/lib/studium/utility_scripts/week_parser/menu.rb +59 -0
  771. data/lib/studium/utility_scripts/week_parser/misc.rb +373 -0
  772. data/lib/studium/utility_scripts/week_parser/reset.rb +65 -0
  773. data/lib/studium/utility_scripts/week_parser/run.rb +18 -0
  774. data/lib/studium/utility_scripts/week_parser/show.rb +236 -0
  775. data/lib/studium/utility_scripts/week_parser/week_parser.rb +49 -0
  776. data/lib/studium/utility_scripts/weekday_parser.rb +155 -0
  777. data/lib/studium/utility_scripts/weekly_schedule.rb +198 -0
  778. data/lib/studium/utility_scripts/wochenplanung/wochenplanung.rb +267 -0
  779. data/lib/studium/version/version.rb +46 -0
  780. data/lib/studium/www/exams/exams.cgi +54 -0
  781. data/lib/studium/www/fast_ask_exam_question/fast_ask_exam_question.cgi +156 -0
  782. data/lib/studium/www/handle_curricula/handle_curricula.cgi +154 -0
  783. data/lib/studium/www/next_generation_exam_question_trainer/next_generation_exam_question_trainer.cgi +112 -0
  784. data/lib/studium/www/next_generation_exam_question_trainer/solved.cgi +26 -0
  785. data/lib/studium/www/sinatra/app.rb +231 -0
  786. data/lib/studium/www/sinatra/curriculum_displayer/curriculum_displayer.rb +162 -0
  787. data/lib/studium/www/sinatra/misc.rb +115 -0
  788. data/lib/studium/www/statistics/statistics.cgi +82 -0
  789. data/lib/studium/www/upcoming_exams/upcoming_exams.cgi +36 -0
  790. data/lib/studium/yaml/ad_hoc_trainer/README.md +2 -0
  791. data/lib/studium/yaml/ad_hoc_trainer/exam_topics.md +22 -0
  792. data/lib/studium/yaml/allowed_themes_for_courses/allowed_themes_for_courses.yml +348 -0
  793. data/lib/studium/yaml/array_allowed_entries_for_the_file_lecture_information/array_allowed_entries_for_the_file_lecture_information.yml +71 -0
  794. data/lib/studium/yaml/available_exam_topics/available_exam_topics.yml +234 -0
  795. data/lib/studium/yaml/backlog_of_exams.yml +37 -0
  796. data/lib/studium/yaml/colours/custom_colours.yml +50 -0
  797. data/lib/studium/yaml/colours/use_colours.yml +1 -0
  798. data/lib/studium/yaml/current_exams.yml +30 -0
  799. data/lib/studium/yaml/curricula/README.md +39 -0
  800. data/lib/studium/yaml/curricula/bachelor/bachelor_agrarwissenschaften_033255.yml +147 -0
  801. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_basisblock_033630.yml +71 -0
  802. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_botanik_033630.yml +100 -0
  803. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_ecology_033630.yml +74 -0
  804. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_mikrobiologie_und_genetik_033630.yml +122 -0
  805. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_molekulare_biologie_033630.yml +106 -0
  806. data/lib/studium/yaml/curricula/bachelor/bachelor_biologie_zoologie_033630.yml +87 -0
  807. data/lib/studium/yaml/curricula/bachelor/bachelor_chemie_033662.yml +165 -0
  808. data/lib/studium/yaml/curricula/bachelor/bachelor_dummy_curriculum.yml +182 -0
  809. data/lib/studium/yaml/curricula/bachelor/bachelor_elektrotechnik_und_informationstechnik_033235.yml +13 -0
  810. data/lib/studium/yaml/curricula/bachelor/bachelor_forstwirtschaft_033225.yml +115 -0
  811. data/lib/studium/yaml/curricula/bachelor/bachelor_informatik_033521.yml +136 -0
  812. data/lib/studium/yaml/curricula/bachelor/bachelor_ktww_033231.yml +84 -0
  813. data/lib/studium/yaml/curricula/bachelor/bachelor_lmbt_033217.yml +121 -0
  814. data/lib/studium/yaml/curricula/bachelor/bachelor_medizinische_informatik_033533.yml +283 -0
  815. data/lib/studium/yaml/curricula/bachelor/bachelor_molekularbiologie_033665.yml +95 -0
  816. data/lib/studium/yaml/curricula/bachelor/bachelor_nutrition_science_033638.yml +119 -0
  817. data/lib/studium/yaml/curricula/bachelor/bachelor_pharmazie_033305.yml +170 -0
  818. data/lib/studium/yaml/curricula/bachelor/bachelor_technische_chemie_033290.yml +131 -0
  819. data/lib/studium/yaml/curricula/bachelor/bachelor_technische_informatik_033535.yml +23 -0
  820. data/lib/studium/yaml/curricula/bachelor/bachelor_ubrm_033227.yml +142 -0
  821. data/lib/studium/yaml/curricula/bachelor/bachelor_verfahrenstechnik_033273.yml +167 -0
  822. data/lib/studium/yaml/curricula/bachelor/bachelor_wirtschaftsinformatik_033526.yml +29 -0
  823. data/lib/studium/yaml/curricula/experimental/bachelor_informatik_in_den_lebenswissenschaften.yml +137 -0
  824. data/lib/studium/yaml/curricula/individual/bachelor_formale_logik.yml +88 -0
  825. data/lib/studium/yaml/curricula/individual/bachelor_informatik_und_molekulare_biologie.yml +1161 -0
  826. data/lib/studium/yaml/curricula/individual/bachelor_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +1157 -0
  827. data/lib/studium/yaml/curricula/individual/master_bioinformatics_and_nanobiotechnology_in_molecular_medicine.yml +306 -0
  828. data/lib/studium/yaml/curricula/individual/master_vector_based_strategies_in_life_sciences_molecular_medicine_and_biotechnology.yml +741 -0
  829. data/lib/studium/yaml/curricula/master/master_bioinformatik_066875.yml +75 -0
  830. data/lib/studium/yaml/curricula/master/master_biologie_molekulare_mikrobiologie_mikrobielle_oekologie_und_immunbiologie_066830.yml +78 -0
  831. data/lib/studium/yaml/curricula/master/master_biologische_chemie_066863.yml +66 -0
  832. data/lib/studium/yaml/curricula/master/master_dummy_curriculum.yml +197 -0
  833. data/lib/studium/yaml/curricula/master/master_genetik_und_entwicklungsbiologie_066877.yml +89 -0
  834. data/lib/studium/yaml/curricula/master/master_lmbt_066418.yml +112 -0
  835. data/lib/studium/yaml/curricula/master/master_molecular_biology_066865.yml +72 -0
  836. data/lib/studium/yaml/curricula/master/master_molekulare_biologie_066834.yml +151 -0
  837. data/lib/studium/yaml/curricula/master/master_pharmazie_066605.yml +176 -0
  838. data/lib/studium/yaml/curricula/master/master_technische_chemie_066490.yml +123 -0
  839. data/lib/studium/yaml/curricula/outdated/master_bioinformatics_and_molecular_biotechnology_including_aspects_from_molecular_medicine.yml +438 -0
  840. data/lib/studium/yaml/curricula/outdated/master_food_science_and_plant_biotechnology.yml +31 -0
  841. data/lib/studium/yaml/curricula.yml +562 -0
  842. data/lib/studium/yaml/daily_questions_solved/daily_questions_solved.yml +1849 -0
  843. data/lib/studium/yaml/default_delay.yml +4 -0
  844. data/lib/studium/yaml/default_encoding.yml +1 -0
  845. data/lib/studium/yaml/directory_to_the_exam_topics.yml +0 -0
  846. data/lib/studium/yaml/editor.yml +1 -0
  847. data/lib/studium/yaml/exams/next_exams_to_do.md +9 -0
  848. data/lib/studium/yaml/file_for_exam_questions.yml +1 -0
  849. data/lib/studium/yaml/german/README.md +2 -0
  850. data/lib/studium/yaml/german/german_to_english_month_names.yml +16 -0
  851. data/lib/studium/yaml/grouped_themes/grouped_themes.yml +258 -0
  852. data/lib/studium/yaml/holidays/holidays.yml +201 -0
  853. data/lib/studium/yaml/important_exams.yml +274 -0
  854. data/lib/studium/yaml/inscription_dates_of_universities.yml +60 -0
  855. data/lib/studium/yaml/lecture_aliases.yml +138 -0
  856. data/lib/studium/yaml/lecture_information/lecture_information.yml +63818 -0
  857. data/lib/studium/yaml/log_dir.yml +1 -0
  858. data/lib/studium/yaml/main_topic/main_topic.yml +11 -0
  859. data/lib/studium/yaml/max_stats.yml +256 -0
  860. data/lib/studium/yaml/meta_themes +1 -0
  861. data/lib/studium/yaml/mitbelegung/README.md +4 -0
  862. data/lib/studium/yaml/mitbelegung/mitbelegung.yml +21 -0
  863. data/lib/studium/yaml/mitteilungsbl/303/244tter/mitteilungsbl/303/244tter.yml +363 -0
  864. data/lib/studium/yaml/n_total_questions.yml +1 -0
  865. data/lib/studium/yaml/rename_konsole_tab.yml +1 -0
  866. data/lib/studium/yaml/semester_planner/README.md +4 -0
  867. data/lib/studium/yaml/semester_planner/semester_planner.yml +189 -0
  868. data/lib/studium/yaml/show_topic.yml +1 -0
  869. data/lib/studium/yaml/statistics/lecture_information.yml +1 -0
  870. data/lib/studium/yaml/statistics/max_stats.yml +239 -0
  871. data/lib/studium/yaml/statistics/statistics.yml +77 -0
  872. data/lib/studium/yaml/week/01_monday.yml +25 -0
  873. data/lib/studium/yaml/week/02_tuesday.yml +68 -0
  874. data/lib/studium/yaml/week/03_wednesday.yml +63 -0
  875. data/lib/studium/yaml/week/04_thursday.yml +20 -0
  876. data/lib/studium/yaml/week/05_friday.yml +31 -0
  877. data/lib/studium/yaml/week/06_saturday.yml +16 -0
  878. data/lib/studium/yaml/week/07_sunday.yml +0 -0
  879. data/lib/studium/yaml/week/README.md +10 -0
  880. data/lib/studium.rb +5 -0
  881. data/studium.gemspec +82 -0
  882. data/test/testing_colourized_question_and_answer.rb +18 -0
  883. data/test/testing_studium.rb +244 -0
  884. data/test/testing_studium_base_class.rb +31 -0
  885. data/test/testing_the_file_lecture_information.rb +18 -0
  886. data/test/testing_time_component.rb +29 -0
  887. metadata +1101 -0
@@ -0,0 +1,3167 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Studium::ShowLecturesOnTheCommandline
6
+ #
7
+ # This class will show the lectures that belong to a particular curriuclum.
8
+ # It will also show how many exams have been solved already so far in
9
+ # the given curriculum at hand.
10
+ #
11
+ # For now, we only work on the bachelor-curriculum.
12
+ # =========================================================================== #
13
+ # require 'studium/utility_scripts/show_lectures_on_the_commandline/show_lectures_on_the_commandline.rb'
14
+ # =========================================================================== #
15
+ require 'studium/base/base.rb'
16
+
17
+ module Studium
18
+
19
+ class ShowLecturesOnTheCommandline < Base
20
+
21
+ require 'studium/constants/web_constants.rb'
22
+ include Studium::WebConstants
23
+
24
+ require 'studium/toplevel_methods/has_this_module_been_completed.rb'
25
+ require 'studium/toplevel_methods/install_the_project_on_the_given_hostsystem.rb'
26
+ require 'studium/toplevel_methods/lva_numbers.rb'
27
+ require 'studium/toplevel_methods/curriculum_related_code.rb'
28
+ require 'studium/toplevel_methods/return_sanitized_dataset_from_the_file_lecture_information.rb'
29
+ require 'studium/toplevel_methods/return_proper_university_image.rb'
30
+ require 'studium/toplevel_methods/curriculum_related_code.rb'
31
+ require 'studium/utility_scripts/lectures_attributed_to_universities/lectures_attributed_to_universities.rb'
32
+ require 'studium/curricula/modules/return_n_ects_in_this_module.rb'
33
+ require 'studium/curricula/sorted_individual_curricula.rb'
34
+
35
+ begin
36
+ require 'html_tags'
37
+ rescue LoadError; end
38
+
39
+ begin
40
+ require 'open'
41
+ rescue LoadError; end
42
+
43
+ begin
44
+ require 'studium/toplevel_methods/return_remote_homepage_of_this_lecture.rb'
45
+ rescue LoadError; end
46
+
47
+ # ========================================================================= #
48
+ # === ALSO_SHOW_URL
49
+ #
50
+ # If this constant is set to true then this class will also show
51
+ # the URL to the target course.
52
+ # ========================================================================= #
53
+ ALSO_SHOW_URL = true
54
+
55
+ # ========================================================================= #
56
+ # === determine_from_which_files_to_read
57
+ #
58
+ # This method will also assign towards the instance variables
59
+ # @read_from_these_files.
60
+ #
61
+ # The available curricula are stored within file_constants.rb in the
62
+ # studium/constants/ subdirectory.
63
+ # ========================================================================= #
64
+ def determine_from_which_files_to_read(
65
+ i = FILE_MASTER_VEKTORX, # Default entry comes here.
66
+ type_of_the_curriculum = :bachelor
67
+ )
68
+ # ======================================================================= #
69
+ # The following case/when menu describes where we can find the
70
+ # curriculum file and what "type", e. g. bachelor or master,
71
+ # it is.
72
+ # ======================================================================= #
73
+ case i # case tag
74
+ # ======================================================================= #
75
+ # === :master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
76
+ # ======================================================================= #
77
+ when :master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
78
+ i = return_and_check_file_for_this_curriculum(i)
79
+ is_master_curriculum
80
+ do_show_lecture_attribution_to_universities
81
+ # ======================================================================= #
82
+ # === :master_dummy_curriculum
83
+ #
84
+ # This refers to any dummy curriculum that we may want to test,
85
+ # for master-curricula.
86
+ # ======================================================================= #
87
+ when :master_dummy_curriculum
88
+ i = return_and_check_file_for_this_curriculum(i)
89
+ is_master_curriculum
90
+ do_show_lecture_attribution_to_universities
91
+ # ======================================================================= #
92
+ # === :bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
93
+ # ======================================================================= #
94
+ when :bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte,
95
+ :bachelor_boku_individuell,
96
+ :indi2
97
+ i = return_and_check_file_for_this_curriculum(i)
98
+ is_bachelor_curriculum
99
+ is_an_individual_curriculum
100
+ do_show_lecture_attribution_to_universities
101
+ # ======================================================================= #
102
+ # === :bachelor_dummy_curriculum
103
+ #
104
+ # This refers to any dummy curriculum that we may want to test.
105
+ # ======================================================================= #
106
+ when :bachelor_dummy_curriculum,
107
+ :dummy
108
+ i = return_and_check_file_for_this_curriculum(i)
109
+ is_bachelor_curriculum
110
+ do_show_lecture_attribution_to_universities
111
+ # ======================================================================= #
112
+ # === :bachelor_individual_bachelor_informatik_und_molekulare_biologie
113
+ # ======================================================================= #
114
+ when :bachelor_individual_bachelor_informatik_und_molekulare_biologie
115
+ i = return_and_check_file_for_this_curriculum(i)
116
+ is_bachelor_curriculum
117
+ is_an_individual_curriculum
118
+ do_show_lecture_attribution_to_universities
119
+ # ======================================================================= #
120
+ # === :bachelor_forstwirtschaft
121
+ # ======================================================================= #
122
+ when :bachelor_forstwirtschaft
123
+ i = return_and_check_file_for_this_curriculum(i)
124
+ is_bachelor_curriculum
125
+ do_show_lecture_attribution_to_universities
126
+ # ======================================================================= #
127
+ # === :bachelor_informatik_und_molekulare_biologie
128
+ # ======================================================================= #
129
+ when :bachelor_informatik_und_molekulare_biologie,
130
+ :bachelor_biologische_informatik,
131
+ :indi3
132
+ i = return_and_check_file_for_this_curriculum(i)
133
+ is_bachelor_curriculum
134
+ is_an_individual_curriculum
135
+ do_show_lecture_attribution_to_universities
136
+ # ======================================================================= #
137
+ # === :master_bioinformatics_and_molecular_biotechnology
138
+ #
139
+ # This refers to the indi4 curriculum.
140
+ # ======================================================================= #
141
+ when :master_bioinformatics_and_molecular_biotechnology,
142
+ :indi4
143
+ i = return_and_check_file_for_this_curriculum(i)
144
+ is_master_curriculum
145
+ is_an_individual_curriculum
146
+ do_show_lecture_attribution_to_universities
147
+ # ======================================================================= #
148
+ # === :bachelor_vektor_curriculum
149
+ # ======================================================================= #
150
+ when :bachelor_vektor_curriculum,
151
+ :bachelor_vektorx_curriculum,
152
+ :indi1
153
+ i = return_and_check_file_for_this_curriculum(i)
154
+ is_bachelor_curriculum
155
+ is_an_individual_curriculum
156
+ do_show_lecture_attribution_to_universities
157
+ # ======================================================================= #
158
+ # === :master_vektoren_curriculum
159
+ # ======================================================================= #
160
+ when :master_vektoren_curriculum
161
+ i = return_and_check_file_for_this_curriculum(i)
162
+ is_master_curriculum
163
+ is_an_individual_curriculum
164
+ do_show_lecture_attribution_to_universities
165
+ # ======================================================================= #
166
+ # === :bachelor_bioinformatik_und_biotechnologie
167
+ # ======================================================================= #
168
+ when :bachelor_bioinformatik_und_biotechnologie
169
+ i = return_and_check_file_for_this_curriculum(i)
170
+ is_bachelor_curriculum
171
+ is_an_individual_curriculum
172
+ do_show_lecture_attribution_to_universities
173
+ # ======================================================================= #
174
+ # === :bachelor_mikrobiologie_individuelles_curriculum
175
+ #
176
+ # Removed as of 29.02.2020.
177
+ # ======================================================================= #
178
+ # when :bachelor_mikrobiologie_individuelles_curriculum,
179
+ # :bachelor_mikrobiologie_curriculum,
180
+ # :bachelor_mikrobiologie,
181
+ # :mikrobiologie
182
+ # i = return_and_check_file_for_this_curriculum(i)
183
+ # is_bachelor_curriculum
184
+ # ======================================================================= #
185
+ # === :bachelor_molekularbiologie_graz
186
+ # ======================================================================= #
187
+ when :bachelor_molekularbiologie_graz,
188
+ :bachelor_molekularbiologie_graz_curriculum,
189
+ :bachelor_molekularbiologie,
190
+ :bachelor_molekularbiologie_curriculum
191
+ i = return_and_check_file_for_this_curriculum(i)
192
+ is_bachelor_curriculum
193
+ # ======================================================================= #
194
+ # === :bachelor_ernährung_curriculum
195
+ # ======================================================================= #
196
+ when :bachelor_ernährung_curriculum
197
+ i = return_and_check_file_for_this_curriculum(i)
198
+ is_bachelor_curriculum
199
+ # ======================================================================= #
200
+ # === :bachelor_verfahrenstechnik_curriculum
201
+ # ======================================================================= #
202
+ when :bachelor_verfahrenstechnik_curriculum,
203
+ :verfahrenstechnik_curriculum,
204
+ :verfahrenstechnik
205
+ i = return_and_check_file_for_this_curriculum(i)
206
+ is_bachelor_curriculum
207
+ # ======================================================================= #
208
+ # === :bachelor_genetik_curriculum
209
+ # ======================================================================= #
210
+ when :bachelor_genetik_curriculum,
211
+ :genetik_curriculum
212
+ i = return_and_check_file_for_this_curriculum(i)
213
+ is_bachelor_curriculum
214
+ # ======================================================================= #
215
+ # === :master_genetik_und_entwicklungsbiologie_curriculum
216
+ # ======================================================================= #
217
+ when :master_genetik_und_entwicklungsbiologie_curriculum
218
+ i = return_and_check_file_for_this_curriculum(i)
219
+ is_master_curriculum
220
+ # ======================================================================= #
221
+ # === :master_pharmazie_curriculum
222
+ # ======================================================================= #
223
+ when :master_pharmazie_curriculum,
224
+ :master_pharmazie
225
+ i = return_and_check_file_for_this_curriculum(i)
226
+ is_master_curriculum
227
+ # ======================================================================= #
228
+ # === :bachelor_pharmazie_curriculum
229
+ # ======================================================================= #
230
+ when :bachelor_pharmazie_curriculum
231
+ i = return_and_check_file_for_this_curriculum(i)
232
+ is_bachelor_curriculum
233
+ # ======================================================================= #
234
+ # === :master_biologische_chemie_curriculum
235
+ # ======================================================================= #
236
+ when :master_biologische_chemie_curriculum,
237
+ :master_biologische_chemie
238
+ i = return_and_check_file_for_this_curriculum(i)
239
+ is_master_curriculum
240
+ # ======================================================================= #
241
+ # === :master_lmbt_curriculum
242
+ # ======================================================================= #
243
+ when :master_lmbt_curriculum
244
+ i = return_and_check_file_for_this_curriculum(i)
245
+ is_master_curriculum
246
+ # ======================================================================= #
247
+ # === :bachelor_boku_lmbt_curriculum
248
+ # ======================================================================= #
249
+ when :bachelor_boku_lmbt_curriculum
250
+ i = return_and_check_file_for_this_curriculum(i)
251
+ is_bachelor_curriculum
252
+ # ======================================================================= #
253
+ # === :technical_chemistry_curriculum
254
+ # ======================================================================= #
255
+ when :bachelor_technical_chemistry_curriculum,
256
+ :technical_chemistry_curriculum
257
+ i = return_and_check_file_for_this_curriculum(i)
258
+ is_bachelor_curriculum
259
+ do_show_lecture_attribution_to_universities
260
+ # ======================================================================= #
261
+ # === :bachelor_informatik_curriculum
262
+ # ======================================================================= #
263
+ when :bachelor_informatik_curriculum,
264
+ :bachelor_informatik,
265
+ :binformatik
266
+ i = return_and_check_file_for_this_curriculum(i)
267
+ is_bachelor_curriculum
268
+ # ======================================================================= #
269
+ # === :bachelor_ktww_curriculum
270
+ # ======================================================================= #
271
+ when :bachelor_ktww_curriculum,
272
+ :bachelor_boku_ktww_curriculum
273
+ i = return_and_check_file_for_this_curriculum(i)
274
+ is_bachelor_curriculum
275
+ # ======================================================================= #
276
+ # === :bachelor_agrarwissenschaften_curriculum
277
+ # ======================================================================= #
278
+ when :bachelor_agrarwissenschaften_curriculum
279
+ i = return_and_check_file_for_this_curriculum(i)
280
+ is_bachelor_curriculum
281
+ # ======================================================================= #
282
+ # === :bachelor_medizinische_informatik_curriculum
283
+ # ======================================================================= #
284
+ when :bachelor_medizinische_informatik_curriculum
285
+ i = return_and_check_file_for_this_curriculum(i)
286
+ is_bachelor_curriculum
287
+ # ======================================================================= #
288
+ # === :bachelor_botanik_curriculum
289
+ # ======================================================================= #
290
+ when :bachelor_botanik_curriculum,
291
+ :bachelor_botanik
292
+ i = return_and_check_file_for_this_curriculum(i)
293
+ is_bachelor_curriculum
294
+ # ======================================================================= #
295
+ # === :master_bioinformatik_curriculum
296
+ # ======================================================================= #
297
+ when :master_bioinformatik_curriculum
298
+ i = return_and_check_file_for_this_curriculum(i)
299
+ is_master_curriculum
300
+ # ======================================================================= #
301
+ # === :bachelor_ökologie_curriculum
302
+ # ======================================================================= #
303
+ when :bachelor_ökologie_curriculum
304
+ i = return_and_check_file_for_this_curriculum(i)
305
+ is_bachelor_curriculum
306
+ # ======================================================================= #
307
+ # === :bachelor_master_tu_wien
308
+ # ======================================================================= #
309
+ when :bachelor_master_tu_wien
310
+ i = return_and_check_file_for_this_curriculum(i)
311
+ is_bachelor_master_curriculum
312
+ # ======================================================================= #
313
+ # === :master_molbio_curriculum
314
+ # ======================================================================= #
315
+ when :master_molbio_curriculum
316
+ i = return_and_check_file_for_this_curriculum(i)
317
+ is_master_curriculum
318
+ # ======================================================================= #
319
+ # === :master_immunobiology_curriculum
320
+ # ======================================================================= #
321
+ when :master_immunobiology_curriculum
322
+ i = return_and_check_file_for_this_curriculum(i)
323
+ is_master_curriculum
324
+ # ======================================================================= #
325
+ # === :bachelor_chemie_curriculum
326
+ # ======================================================================= #
327
+ when :bachelor_chemie_curriculum
328
+ i = return_and_check_file_for_this_curriculum(i)
329
+ is_bachelor_curriculum
330
+ # ======================================================================= #
331
+ # === :bachelor_boku_ubrm_curriculum
332
+ # ======================================================================= #
333
+ when :bachelor_boku_ubrm_curriculum
334
+ i = return_and_check_file_for_this_curriculum(i)
335
+ is_bachelor_curriculum
336
+ # ======================================================================= #
337
+ # === :master_tu_vienna_biotechnology_curriculum
338
+ # ======================================================================= #
339
+ when :master_tu_vienna_biotechnology_curriculum
340
+ i = return_and_check_file_for_this_curriculum(i)
341
+ is_master_curriculum
342
+ # ======================================================================= #
343
+ # === :bachelor_molekulare_biologie_curriculum
344
+ # ======================================================================= #
345
+ when :bachelor_molekulare_biologie_curriculum
346
+ i = return_and_check_file_for_this_curriculum(i)
347
+ is_bachelor_curriculum
348
+ # ======================================================================= #
349
+ # === :bachelor_basisblock_biologie
350
+ # ======================================================================= #
351
+ when :bachelor_basisblock_biologie
352
+ i = return_and_check_file_for_this_curriculum(i)
353
+ is_bachelor_curriculum
354
+ else
355
+ if is_on_roebe? and i.is_a?(String) and !File.exist?(i)
356
+ e 'Warning: input '+i.to_s+' is not registered in this menu().'
357
+ end
358
+ end
359
+ if i.include? 'master_individuelles_' # This must be a master-lecture then.
360
+ type_of_the_curriculum = :master
361
+ end if i.is_a? String
362
+ # ======================================================================= #
363
+ # We must work on Arrays past this point.
364
+ # ======================================================================= #
365
+ unless i.is_a? Array
366
+ i = [i]
367
+ end
368
+ i.flatten! # Keep this important Array flat.
369
+ @read_from_these_files = i
370
+ end; alias determine_from_which_file_to_read determine_from_which_files_to_read # === determine_from_which_file_to_read
371
+
372
+ # ========================================================================= #
373
+ # === use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
374
+ # ========================================================================= #
375
+ def use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
376
+ determine_from_which_file_to_read(:master_bioinformatics_and_nanobiotechnology_in_molecular_medicine)
377
+ end
378
+
379
+ # ========================================================================= #
380
+ # === use_master_dummy_curriculum
381
+ # ========================================================================= #
382
+ def use_master_dummy_curriculum
383
+ determine_from_which_file_to_read(:master_dummy_curriculum)
384
+ end
385
+
386
+ # ========================================================================= #
387
+ # === use_bachelor_dummy_curriculum
388
+ # ========================================================================= #
389
+ def use_bachelor_dummy_curriculum
390
+ determine_from_which_file_to_read(:bachelor_dummy_curriculum)
391
+ end
392
+
393
+ # ========================================================================= #
394
+ # === use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
395
+ # ========================================================================= #
396
+ def use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
397
+ determine_from_which_file_to_read(:bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte)
398
+ end
399
+
400
+ # ========================================================================= #
401
+ # === use_priority_points
402
+ #
403
+ # This will use priority_points as dataset.
404
+ #
405
+ # Invocation example:
406
+ #
407
+ # ShowLecturesOnTheCommandline --priority-points
408
+ #
409
+ # ========================================================================= #
410
+ def use_priority_points
411
+ _ = main_dataset?
412
+ _.select! {|a,b|
413
+ b.has_key? :priority_points
414
+ }
415
+ is_master_curriculum # ← Hardcoded for now.
416
+ do_not_read_in_from_a_file
417
+ set_title 'Custom individual curriculum based on priority points'
418
+ # ======================================================================= #
419
+ # We only need to use the names of the lectures, hence why we will
420
+ # use the method .keys().
421
+ # ======================================================================= #
422
+ set_all_lectures(_.keys)
423
+ end
424
+
425
+ # ========================================================================= #
426
+ # === determine_the_type_of_the_curriculum (type tag)
427
+ #
428
+ # The allowed types are currently:
429
+ #
430
+ # :bachelor
431
+ # :master
432
+ # :bachelor_and_master
433
+ #
434
+ # The default will be towards :bachelor.
435
+ # ========================================================================= #
436
+ def determine_the_type_of_the_curriculum(
437
+ i = :bachelor
438
+ )
439
+ case i
440
+ when :bachelor_master
441
+ i = :bachelor_and_master # Slight sanitize-operation here.
442
+ end
443
+ @type_of_the_curriculum = i
444
+ end
445
+
446
+ # ========================================================================= #
447
+ # === use_bachelor_ernährung_curriculum
448
+ # ========================================================================= #
449
+ def use_bachelor_ernährung_curriculum
450
+ determine_from_which_file_to_read(:bachelor_ernährung_curriculum)
451
+ end
452
+
453
+ # ========================================================================= #
454
+ # === use_bachelor_pharmazie_curriculum
455
+ # ========================================================================= #
456
+ def use_bachelor_pharmazie_curriculum
457
+ determine_from_which_file_to_read(:bachelor_pharmazie_curriculum)
458
+ end
459
+
460
+ # ========================================================================= #
461
+ # === use_bachelor_molekularbiologie_curriculum
462
+ # ========================================================================= #
463
+ def use_bachelor_molekularbiologie_curriculum
464
+ determine_from_which_file_to_read(:bachelor_molekularbiologie_graz_curriculum)
465
+ end; alias use_bachelor_molekularbiologie_graz_curriculum use_bachelor_molekularbiologie_curriculum # === use_bachelor_molekularbiologie_graz_curriculum
466
+
467
+ # ========================================================================= #
468
+ # === use_master_biologische_chemie_curriculum
469
+ # ========================================================================= #
470
+ def use_master_biologische_chemie_curriculum
471
+ determine_from_which_file_to_read(:master_biologische_chemie_curriculum)
472
+ end
473
+
474
+ # ========================================================================= #
475
+ # === use_master_lmbt_curriculum
476
+ # ========================================================================= #
477
+ def use_master_lmbt_curriculum
478
+ determine_from_which_file_to_read(:master_lmbt_curriculum)
479
+ end
480
+
481
+ # ========================================================================= #
482
+ # === is_master_curriculum
483
+ #
484
+ # Denote that our curriculum at hand is a master-curriculum.
485
+ # ========================================================================= #
486
+ def is_master_curriculum
487
+ determine_the_type_of_the_curriculum(:master)
488
+ end
489
+
490
+ # ========================================================================= #
491
+ # === do_not_read_in_from_a_file
492
+ # ========================================================================= #
493
+ def do_not_read_in_from_a_file
494
+ @read_from_these_files = false
495
+ end
496
+
497
+ # ========================================================================= #
498
+ # === use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum
499
+ # ========================================================================= #
500
+ def use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum
501
+ determine_from_which_file_to_read(:master_genetik_und_entwicklungsbiologie_curriculum)
502
+ end
503
+
504
+ # ========================================================================= #
505
+ # === is_bachelor_curriculum
506
+ # ========================================================================= #
507
+ def is_bachelor_curriculum
508
+ determine_the_type_of_the_curriculum(:bachelor)
509
+ end
510
+
511
+ # ========================================================================= #
512
+ # === is_bachelor_master_curriculum
513
+ # ========================================================================= #
514
+ def is_bachelor_master_curriculum
515
+ determine_the_type_of_the_curriculum(:bachelor_master)
516
+ end
517
+
518
+ # ========================================================================= #
519
+ # === use_bachelor_medizinische_informatik_curriculum
520
+ # ========================================================================= #
521
+ def use_bachelor_medizinische_informatik_curriculum
522
+ determine_from_which_file_to_read(:bachelor_medizinische_informatik_curriculum)
523
+ end
524
+
525
+ # ========================================================================= #
526
+ # === use_bachelor_ökologie_curriculum
527
+ # ========================================================================= #
528
+ def use_bachelor_ökologie_curriculum
529
+ determine_from_which_file_to_read(:bachelor_ökologie_curriculum)
530
+ end
531
+
532
+ # ========================================================================= #
533
+ # === use_bachelor_informatik_curriculum
534
+ # ========================================================================= #
535
+ def use_bachelor_informatik_curriculum
536
+ determine_from_which_file_to_read(:bachelor_informatik_curriculum)
537
+ end
538
+
539
+ # ========================================================================= #
540
+ # === use_bachelor_lmbt_curriculum
541
+ # ========================================================================= #
542
+ def use_bachelor_lmbt_curriculum
543
+ determine_from_which_file_to_read(:bachelor_boku_lmbt_curriculum)
544
+ end
545
+
546
+ # ========================================================================= #
547
+ # === use_bachelor_agrarwissenschaften_curriculum
548
+ # ========================================================================= #
549
+ def use_bachelor_agrarwissenschaften_curriculum
550
+ determine_from_which_file_to_read(:bachelor_agrarwissenschaften_curriculum)
551
+ end
552
+
553
+ # ========================================================================= #
554
+ # === use_bachelor_master_tu_wien_curriculum
555
+ # ========================================================================= #
556
+ def use_bachelor_master_tu_wien_curriculum
557
+ determine_from_which_file_to_read(:bachelor_master_tu_wien)
558
+ end
559
+
560
+ # ========================================================================= #
561
+ # === use_bachelor_botanik_curriculum
562
+ # ========================================================================= #
563
+ def use_bachelor_botanik_curriculum
564
+ determine_from_which_file_to_read(:bachelor_botanik_curriculum)
565
+ end
566
+
567
+ # ========================================================================= #
568
+ # === use_bachelor_genetik_curriculum
569
+ # ========================================================================= #
570
+ def use_bachelor_genetik_curriculum
571
+ determine_from_which_file_to_read(:bachelor_genetik_curriculum)
572
+ end
573
+
574
+ # ========================================================================= #
575
+ # === use_master_molbio_curriculum
576
+ # ========================================================================= #
577
+ def use_master_molbio_curriculum
578
+ determine_from_which_file_to_read(:master_molbio_curriculum)
579
+ end
580
+
581
+ # ========================================================================= #
582
+ # === use_uni_vienna_master_bioinformatics_curriculum
583
+ # ========================================================================= #
584
+ def use_uni_vienna_master_bioinformatics_curriculum
585
+ determine_from_which_file_to_read(:master_bioinformatik_curriculum)
586
+ end
587
+
588
+ # ========================================================================= #
589
+ # === use_bachelor_chemie_curriculum
590
+ # ========================================================================= #
591
+ def use_bachelor_chemie_curriculum
592
+ determine_from_which_file_to_read(:bachelor_chemie_curriculum)
593
+ end
594
+
595
+ # ========================================================================= #
596
+ # === use_master_pharmazie_curriculum
597
+ # ========================================================================= #
598
+ def use_master_pharmazie_curriculum
599
+ determine_from_which_file_to_read(:master_pharmazie_curriculum)
600
+ end
601
+
602
+ # ========================================================================= #
603
+ # === use_master_immunobiology_curriculum
604
+ # ========================================================================= #
605
+ def use_master_immunobiology_curriculum
606
+ determine_from_which_file_to_read(:master_immunobiology_curriculum)
607
+ end
608
+
609
+ # ========================================================================= #
610
+ # === use_bachelor_biologie_basisblock_curriculum
611
+ # ========================================================================= #
612
+ def use_bachelor_biologie_basisblock_curriculum
613
+ determine_from_which_file_to_read(:bachelor_basisblock_biologie)
614
+ end
615
+
616
+ # ========================================================================= #
617
+ # === use_tu_master_biotechnology_curriculum
618
+ # ========================================================================= #
619
+ def use_tu_master_biotechnology_curriculum
620
+ determine_from_which_file_to_read(:master_tu_vienna_biotechnology_curriculum)
621
+ end
622
+
623
+ # ========================================================================= #
624
+ # === use_bachelor_molbio_curriculum
625
+ # ========================================================================= #
626
+ def use_bachelor_molbio_curriculum
627
+ determine_from_which_file_to_read(:bachelor_molekulare_biologie_curriculum)
628
+ end
629
+
630
+ # ========================================================================= #
631
+ # === use_bachelor_technical_chemistry_curriculum
632
+ # ========================================================================= #
633
+ def use_bachelor_technical_chemistry_curriculum
634
+ determine_from_which_file_to_read(:technical_chemistry_curriculum)
635
+ end
636
+
637
+ # ========================================================================= #
638
+ # === use_bachelor_verfahrenstechnik_curriculum
639
+ # ========================================================================= #
640
+ def use_bachelor_verfahrenstechnik_curriculum
641
+ determine_from_which_file_to_read(:bachelor_verfahrenstechnik_curriculum)
642
+ end
643
+
644
+ # ========================================================================= #
645
+ # === use_bachelor_ubrm_curriculum
646
+ # ========================================================================= #
647
+ def use_bachelor_ubrm_curriculum
648
+ determine_from_which_file_to_read(:bachelor_boku_ubrm_curriculum)
649
+ end
650
+
651
+ # ========================================================================= #
652
+ # === use_bachelor_ktww_curriculum
653
+ # ========================================================================= #
654
+ def use_bachelor_ktww_curriculum
655
+ determine_from_which_file_to_read(:bachelor_boku_ktww_curriculum)
656
+ end
657
+
658
+ # ========================================================================= #
659
+ # === use_mikrobiologie_individuelles_curriculum
660
+ # ========================================================================= #
661
+ def use_mikrobiologie_individuelles_curriculum
662
+ determine_from_which_file_to_read(:bachelor_mikrobiologie_individuelles_curriculum)
663
+ end; alias use_mikrobiologie_curriculum use_mikrobiologie_individuelles_curriculum # === use_mikrobiologie_curriculum
664
+
665
+ # ========================================================================= #
666
+ # === use_bachelor_forstwirtschaft
667
+ # ========================================================================= #
668
+ def use_bachelor_forstwirtschaft
669
+ determine_from_which_file_to_read(:bachelor_forstwirtschaft)
670
+ end
671
+
672
+ # ========================================================================= #
673
+ # === use_master_vektoren_curriculum
674
+ # ========================================================================= #
675
+ def use_master_vektoren_curriculum
676
+ determine_from_which_file_to_read(:master_vektoren_curriculum)
677
+ end
678
+
679
+ # ========================================================================= #
680
+ # === use_bachelor_biologische_informatik
681
+ # ========================================================================= #
682
+ def use_bachelor_biologische_informatik
683
+ determine_from_which_file_to_read(:bachelor_biologische_informatik)
684
+ end
685
+
686
+ # ========================================================================= #
687
+ # === use_bachelor_vektor_curriculum
688
+ #
689
+ # This method is to be used to read from the bachelor-vektorx
690
+ # curriculum.
691
+ # ========================================================================= #
692
+ def use_bachelor_vektor_curriculum
693
+ determine_from_which_file_to_read(:bachelor_vektor_curriculum)
694
+ end
695
+
696
+ # ========================================================================= #
697
+ # === return_and_check_file_for_this_curriculum
698
+ #
699
+ # The reason we have this method here is so that we can intercept
700
+ # individual curricula. If it is an individual curriculum then
701
+ # we will also show the university-attribution in the generated
702
+ # .html file.
703
+ # ========================================================================= #
704
+ def return_and_check_file_for_this_curriculum(i)
705
+ if i.to_s.include?('individuelles_curriculum') or
706
+ i.to_s.include?('vector') # Special exception.
707
+ do_show_lecture_attribution_to_universities
708
+ end
709
+ return return_file_for_this_curriculum(i) # ← in studium/base/curriculum.rb
710
+ end
711
+
712
+ # ========================================================================= #
713
+ # === use_individual_bachelor_informatik_und_molekulare_biologie
714
+ # ========================================================================= #
715
+ def use_individual_bachelor_informatik_und_molekulare_biologie
716
+ determine_from_which_file_to_read(:bachelor_individual_bachelor_informatik_und_molekulare_biologie)
717
+ end
718
+
719
+ # ========================================================================= #
720
+ # === show_help (help tag)
721
+ #
722
+ # The help options for class Studium::ShowLecturesOnTheCommandline
723
+ # are stored in this method here.
724
+ #
725
+ # To invoke this method, do:
726
+ #
727
+ # show_lectures_on_the_commandline --help
728
+ #
729
+ # ========================================================================= #
730
+ def show_help
731
+ e
732
+ opnn { :no_trailing_colon }
733
+ help_string = <<-EOF
734
+
735
+
736
+ The following help-options are available and documented:
737
+
738
+ EOF
739
+ e help_string
740
+ ecomment " #{slateblue('--available-curricula?')} # show "\
741
+ "which curricula are available"
742
+ ecomment " #{slateblue('--do-not-show-upcoming-exams')} # Do not show upcoming exams"
743
+ ecomment " #{slateblue('--show-all-URLs')} # Also "\
744
+ "show remote URLs of already solved lectures"
745
+ ecomment " #{slateblue('--priority-points')} # Display "\
746
+ "a curriculum based on priority points"
747
+ ecomment " #{slateblue('--use-this-curriculum=foo.md')} # use "\
748
+ "this curriculum as specified in the file"
749
+ e
750
+ end
751
+
752
+ # ========================================================================= #
753
+ # === Studium::ShowLecturesOnTheCommandline::IMAGE_FOR_THE_COMPLETED_MODULE
754
+ #
755
+ # This constant resides here because it is only used by this .rb file.
756
+ # ========================================================================= #
757
+ IMAGE_FOR_THE_COMPLETED_MODULE =
758
+ '<img src="/home/x/data/images/studium/COMPLETED_MODULE.png" '\
759
+ 'style="margin-left: 1em; border: 3px solid black">'.dup
760
+
761
+ # ========================================================================= #
762
+ # === return_arrow_pointing_to_the_right_side
763
+ # ========================================================================= #
764
+ def return_arrow_pointing_to_the_right_side(
765
+ optional_margin_left = nil
766
+ )
767
+ if optional_margin_left
768
+ '<img src="/home/x/data/images/STD/PFEIL6_red.png" style="margin-left:'+
769
+ optional_margin_left.to_s+
770
+ '">'.dup
771
+ else
772
+ '<img src="/home/x/data/images/STD/PFEIL6_red.png">'.dup
773
+ end
774
+ end
775
+
776
+ # ========================================================================= #
777
+ # === return_timetable_of_upcoming_exams
778
+ #
779
+ # This method is for the display of a HTML timetable <div> element.
780
+ #
781
+ # It will be near the bottom part of the auto-generated .html file,
782
+ # if we actually wish to generate a .html file.
783
+ # ========================================================================= #
784
+ def return_timetable_of_upcoming_exams
785
+ # ======================================================================= #
786
+ # The dataset consists of the lectures that are part of this curriculum.
787
+ # ======================================================================= #
788
+ new_hash = {}
789
+ dataset = @hash_containing_the_lectures_for_this_curriculum
790
+ # ======================================================================= #
791
+ # We have to time-sort this.
792
+ # ======================================================================= #
793
+ dataset = dataset.sort_by {|name_of_the_lecture, inner_hash|
794
+ if inner_hash.has_key? 'exams'
795
+ exams = inner_hash['exams']
796
+ if exams.is_a? Array
797
+ exams = exams.first
798
+ if exams.include? ', '
799
+ exams = exams.split(', ').first.strip
800
+ end
801
+ end
802
+ else
803
+ exams = '01.01.2500' # <- Fake time stamp.
804
+ end
805
+ if exams.empty?
806
+ exams = '01.01.2500' # <- Fake time stamp.
807
+ end
808
+ Time.parse(exams)
809
+ }
810
+ dataset.each {|inner_array|
811
+ key = inner_array.first
812
+ value = inner_array.last
813
+ new_hash[key] = value
814
+ }
815
+ Studium.return_div_timetable_of_upcoming_exams(dataset)
816
+ end
817
+
818
+ # ========================================================================= #
819
+ # === set_html_string
820
+ # ========================================================================= #
821
+ def set_html_string(i)
822
+ @html_string = i.to_s.dup
823
+ end
824
+
825
+ # ========================================================================= #
826
+ # === html_string?
827
+ # ========================================================================= #
828
+ def html_string?
829
+ @html_string
830
+ end
831
+
832
+ # ========================================================================= #
833
+ # === consider_generating_a_html_file (html tag)
834
+ #
835
+ # This method can generate a .html file. As a consequence it is fairly
836
+ # long and messy.
837
+ # ========================================================================= #
838
+ def consider_generating_a_html_file(
839
+ i = @generate_html_file
840
+ )
841
+ if i
842
+ if is_on_roebe?
843
+ # =================================================================== #
844
+ # Install the project first in this case, so that the regexes
845
+ # are up-to-date. This may take quite some time, so it is better
846
+ # to move this to the end of the method, after the browser
847
+ # has loaded the page. Actually - we can not do this if we
848
+ # want to have up-to-date URLs.
849
+ # =================================================================== #
850
+ Studium.install_the_project_on_the_given_hostsystem
851
+ end
852
+ html_file = "#{log_dir?}html/"\
853
+ "#{title?.to_s.tr(' ','_').delete('(),')}.html"
854
+ _ = ''.dup
855
+ if www_mode?
856
+ # In this case, do not use the <meta> tag and similar entities.
857
+ else
858
+ _ << '<meta charset="UTF-8">'
859
+ _ << "#{N}<html>#{N}"
860
+ _ << "<head>#{N}"
861
+ _ << "<title>#{title?.to_s}</title>#{N}"
862
+ end
863
+ # ===================================================================== #
864
+ # Add tooltip.css next.
865
+ # ===================================================================== #
866
+ _ << '<link rel="stylesheet" type="text/css" href="../../../programming/ruby/src/cyberweb/lib/cyberweb/cascading_style_sheets/balloon.css">'
867
+ if www_mode?
868
+ # And do nothing as well here.
869
+ else
870
+ _ << "</head>#{N}"
871
+ _ << "<body style=\"font-size: 1.5em; "\
872
+ "font-family: monospace; "\
873
+ "padding: 1px; "\
874
+ "margin: 0px\">#{N}" # <- Open the <body> tax here.
875
+ end
876
+ _ << '<div style="border: 1px solid black; padding:2px;">'
877
+ # ===================================================================== #
878
+ # Add the title of the curriculum next, as a darkblue and bold
879
+ # <h1> tag. An example for such a title may be a String like
880
+ # "Bachelorcurriculum Informatik".
881
+ # ===================================================================== #
882
+ _ << HtmlTags.h1(
883
+ title?.to_s, css_style: 'font-weight: bold; color: darkblue'
884
+ )+N
885
+ remote_url = ::Studium.return_homepage_of_this_lecture(title?.to_s)
886
+ _ << '<b style="margin-left:1em">
887
+ Link to the remote page:
888
+ </b>
889
+ <a style="font-weight: bold; color: darkblue" href="'+remote_url+'">'+title?.to_s+'</a>'
890
+ if show_loaded_from_which_file? and loaded_from_which_file?
891
+ loaded_from_which_file?.each {|this_file|
892
+ _ << '<h2 style="color:slateblue; margin-bottom:4px; margin-left: 0.75em;">
893
+ Loaded from the file:
894
+ </h2>'+N
895
+ _ << '<b style="margin-left:2.0em; font-size:larger; color:blue">'+
896
+ File.basename(this_file)+'</b>
897
+ ( <span style="font-weight: bold; color:steelblue">'+this_file+'</span> )
898
+ <br><br><br>'+N
899
+ }
900
+ end
901
+ hash = {}
902
+ # ===================================================================== #
903
+ # === Iterate over the lectures here
904
+ #
905
+ # Next iterate over all lectures that are part of the curriculum
906
+ # and build up a temporary Hash, with which we will work.
907
+ # ===================================================================== #
908
+ all_lectures?.each {|this_lecture|
909
+ # =================================================================== #
910
+ # raw_name_of_the_lecture will also include the lva-id.
911
+ # =================================================================== #
912
+ if this_lecture.include? '#' # Handle possible comments next.
913
+ raw_name_of_the_lecture = this_lecture[0 .. (this_lecture.index('#')-1)].strip
914
+ else
915
+ raw_name_of_the_lecture = this_lecture.dup
916
+ end
917
+ raw_name_of_the_lecture.squeeze!(' ') # <- Trying this as of March 2018.
918
+ # =================================================================== #
919
+ # === Pointer to the lecture-dataset
920
+ #
921
+ # Obtain a pointer to the lecture dataset next.
922
+ # =================================================================== #
923
+ pointer_to_the_lecture_dataset = @lecture_dataset[raw_name_of_the_lecture]
924
+ outdated_lecture = pointer_to_the_lecture_dataset[:outdated_lecture]
925
+ if pointer_to_the_lecture_dataset.nil?
926
+ next
927
+ end
928
+ if @ignore_outdated_lectures and outdated_lecture
929
+ next
930
+ end
931
+ hash[raw_name_of_the_lecture] = pointer_to_the_lecture_dataset
932
+ }
933
+ if @this_curriculum_has_n_ects_points_in_total >= 270.0
934
+ @individual_curriculum = false
935
+ # ^^^ ad-hoc hack.
936
+ end
937
+ # ===================================================================== #
938
+ # === Handle modules of an individual curriculum
939
+ #
940
+ # Next, if we have an individual curriculum, we will use a slightly
941
+ # different way to order the modules. How is it determined whether
942
+ # the given curriculum at hand is an individual one? We will
943
+ # simply use @individual_curriculum.
944
+ # ===================================================================== #
945
+ if @individual_curriculum
946
+ new_hash = ::Studium::SortedIndividualCurricula.new(hash, name_of_the_curriculum?)
947
+ # =================================================================== #
948
+ # Rewrite the variable called `hash` next.
949
+ # =================================================================== #
950
+ hash.clear
951
+ max_value = new_hash.max?
952
+ max_value = 100000 if max_value.nil?
953
+ max_value = 100000 if max_value > 100000 # Some bug was found on June 2022. Slight hack...
954
+ (1 .. max_value).each {|module_number|
955
+ pointer = new_hash[module_number]
956
+ if pointer.nil?
957
+ opnn; e 'A nil-value was found for module number '+
958
+ steelblue(module_number)+'.'
959
+ # e
960
+ # e 'The hash was:'
961
+ # e
962
+ # pp new_hash
963
+ # e
964
+ end
965
+ pointer.each {|name_of_the_lecture, inner_hash|
966
+ hash[name_of_the_lecture] = inner_hash
967
+ } if pointer
968
+ }
969
+ end
970
+ @name_of_the_individual_curriculum_module = ''.dup
971
+ index = 0
972
+ # ===================================================================== #
973
+ # === Iterate over all lectures
974
+ #
975
+ # Next, iterate over all lectures. An individual entry may look
976
+ # like this:
977
+ #
978
+ # 185.A47 Physiologie und Grundlagen der Pathologie # 4.5 ECTS, VO, TU WIEN
979
+ #
980
+ # Because we may want to sort the dataset according to individual
981
+ # modules, we will first sort that dataset completely, before
982
+ # proceeding.
983
+ # ===================================================================== #
984
+ hash.each_pair {|this_lecture, pointer_to_the_lecture_dataset| index += 1
985
+ splitted = this_lecture.split(' ')
986
+ lva_id = splitted.first # Obtain the ID of the lva.
987
+ # =================================================================== #
988
+ # The variable `name_of_the_lecture` contains just the name of
989
+ # the lecture alone, without leading LVA ID number.
990
+ # =================================================================== #
991
+ name_of_the_lecture = splitted[1..-1].join(' ').strip
992
+ # =================================================================== #
993
+ # Next, determine some helper-variables. Since as of July 2018
994
+ # we will try another approach to obtain the specific entries of
995
+ # our main Hash, via a more generic method called obtain().
996
+ # =================================================================== #
997
+ n_ects_points = obtain(:ects, pointer_to_the_lecture_dataset)
998
+ university = obtain(:university, pointer_to_the_lecture_dataset)
999
+ lecture_type = obtain(:type, pointer_to_the_lecture_dataset)
1000
+ bereits_absolviert = obtain(:already_solved, pointer_to_the_lecture_dataset)
1001
+ curricula = obtain(:curricula, pointer_to_the_lecture_dataset)
1002
+ is_a_steop_lecture = obtain(:is_a_steop_lecture, pointer_to_the_lecture_dataset)
1003
+ semester = obtain(:semester, pointer_to_the_lecture_dataset).to_s # Must have .to_s due to nil-values.
1004
+ if pointer_to_the_lecture_dataset.has_key? :homepage
1005
+ # ================================================================= #
1006
+ # In this case everything is fine. We will continue.
1007
+ # ================================================================= #
1008
+ else
1009
+ e crimson('The lecture `')+
1010
+ sfancy(this_lecture)+
1011
+ crimson('` does not have a registered')
1012
+ e crimson('remote homepage entry.')
1013
+ open_this_in_the_browser = false
1014
+ if open_this_in_the_browser and
1015
+ is_on_roebe? and
1016
+ commandline_mode?
1017
+ # =============================================================== #
1018
+ # On my home system we will batch-open these in the browser.
1019
+ # This will only work if they are registered in BeautifulUrl
1020
+ # though. It will thus not work for every lecture, but it may
1021
+ # work for many lectures, which can thus be updated.
1022
+ # =============================================================== #
1023
+ e crimson('Opening the URL to this lecture in the editor now, so that')
1024
+ e crimson('this erroneous entry can be corrected.')
1025
+ this_url = Studium.return_remote_homepage_of_this_lecture(this_lecture)
1026
+ if this_url != this_lecture # Means we found something.
1027
+ Studium.open_this_remote_url(this_url)
1028
+ sleep(0.75)
1029
+ end
1030
+ end
1031
+ end
1032
+ # =================================================================== #
1033
+ # === 15.04.2019
1034
+ #
1035
+ # Since as of 15.04.2019, we will tap into the method
1036
+ # Studium.return_homepage_of_this_lecture() to determine
1037
+ # the remote URL.
1038
+ #
1039
+ # In the past we used the BeautifulUrl for this, but it is better
1040
+ # to make use of the automatically generated regexp-case-when menu,
1041
+ # residing in the file called
1042
+ # 'regexes_for_the_registered_lectures.rb'.
1043
+ # =================================================================== #
1044
+ use_this_as_remote_url = ::Studium.return_homepage_of_this_lecture(this_lecture)
1045
+ case semester
1046
+ when 'both'
1047
+ semester = 'Sommer / Winter'
1048
+ when 'winter'
1049
+ semester = 'Winter'
1050
+ when 'summer'
1051
+ semester = 'Sommer'
1052
+ end
1053
+ # =================================================================== #
1054
+ # Also add this to the hash that contains the lectures. We could
1055
+ # use `this_lecture` as key, but I prefer the name alone, without
1056
+ # leading lva id. Note that this would, in theory, conflict if we
1057
+ # have lectures that have the same name but a different LVA ID.
1058
+ # =================================================================== #
1059
+ @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture] =
1060
+ pointer_to_the_lecture_dataset
1061
+ @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture].update(
1062
+ remote_url: use_this_as_remote_url
1063
+ )
1064
+ bereits_absolviert = ja_oder_nein(bereits_absolviert)
1065
+ case bereits_absolviert
1066
+ when 'Ja'
1067
+ colourized_bereits_absolviert = '<b style="color:green">'+bereits_absolviert
1068
+ # ================================================================= #
1069
+ # Also append the date when this exam has been completed
1070
+ # successfully.
1071
+ # ================================================================= #
1072
+ on_which_date = @hash_containing_the_lectures_for_this_curriculum[name_of_the_lecture][:already_solved_at].to_s
1073
+ colourized_bereits_absolviert <<
1074
+ ", absolviert am</b> <b style=\"color:darkgreen\">#{on_which_date}</b>"
1075
+ else
1076
+ colourized_bereits_absolviert = '<b style="color:red">'+bereits_absolviert+'</b>'
1077
+ end
1078
+ # =================================================================== #
1079
+ # === Check special-content for the individual curriculum
1080
+ # =================================================================== #
1081
+ if individual_curriculum? and
1082
+ pointer_to_the_lecture_dataset.has_key?(:individual_curricula) and
1083
+ pointer_to_the_lecture_dataset[:individual_curricula].has_key?(:individual_curriculum_module)
1084
+ individual_curriculum_module = pointer_to_the_lecture_dataset[:individual_curricula][:individual_curriculum_module]
1085
+ name_of_the_curriculum_module = pointer_to_the_lecture_dataset[:individual_curricula][:name_of_the_curriculum_module]
1086
+ if individual_curriculum_module.is_a? Array
1087
+ individual_curriculum_module = individual_curriculum_module.first
1088
+ end
1089
+ if @name_of_the_individual_curriculum_module != individual_curriculum_module
1090
+ @name_of_the_individual_curriculum_module = individual_curriculum_module
1091
+ # =============================================================== #
1092
+ # Next we will show the name of the Module at hand. This will
1093
+ # be done only for lectures that are part of an individual
1094
+ # curriculum. We also need to determine the name of the
1095
+ # curriculum.
1096
+ # =============================================================== #
1097
+ # n_ects_in_this_module = Studium.return_n_ects_in_this_module(
1098
+ # @name_of_the_individual_curriculum_module,
1099
+ # individual_curriculum_module,
1100
+ # :use_what_is_best # <- Not ideal for speed-reasons, but for now this must suffice.
1101
+ # )
1102
+ # n_ects_in_this_module = '<span style="color: darkgreen">('+
1103
+ # n_ects_in_this_module.to_s+
1104
+ # ' ECTS)</span>'
1105
+ # ^^^ we tried this on 31.12.2019, but it does not work very well.
1106
+ _ << '<h1><b style="color:midnightblue">Module</b> '\
1107
+ '<span style="color:#510042">'+
1108
+ @name_of_the_individual_curriculum_module+
1109
+ '</span> '+
1110
+ '<b style="color:midnightblue">'+
1111
+ name_of_the_curriculum_module.strip+
1112
+ '</b>'
1113
+ n_ects_in_that_module = ::Studium.return_n_ects_in_that_module(
1114
+ title?,
1115
+ @name_of_the_individual_curriculum_module,
1116
+ @lecture_dataset
1117
+ )
1118
+ # =============================================================== #
1119
+ # Show how many ECTS points are in that module.
1120
+ # =============================================================== #
1121
+ _ << " <span style=\"font-size:0.8em\">[#{n_ects_in_that_module} ECTS in this module]</span>"
1122
+ # =============================================================== #
1123
+ # Since as of 29.02.2020 we will also notify whether we have
1124
+ # completed this module or whether we have not.
1125
+ # =============================================================== #
1126
+ if ::Studium.query_based_on_curriculum_title_whether_this_module_been_completed(
1127
+ title?,
1128
+ @name_of_the_individual_curriculum_module,
1129
+ @lecture_dataset
1130
+ )
1131
+ _ << IMAGE_FOR_THE_COMPLETED_MODULE.dup
1132
+ end
1133
+ # =============================================================== #
1134
+ # And close the header-tag as well.
1135
+ # =============================================================== #
1136
+ _ << '</h1>' # + n_ects_in_this_module
1137
+ end
1138
+ end
1139
+ # =================================================================== #
1140
+ # Add the university-logo as well. This image can also be clicked
1141
+ # on via a <a href=""> tag.
1142
+ # =================================================================== #
1143
+ clickable_logo = return_proper_logo_for_this_university(university)
1144
+ # clickable_logo = '<a href="'+return_remote_url(this_lecture)+'">'+clickable_logo+'</a>'
1145
+ # ^^^ disabled the above as of 16.04.2019
1146
+ clickable_logo = '<a href="'+use_this_as_remote_url+'">'+clickable_logo+'</a>'
1147
+ _ << '<span style="margin-left:2.0em">'+
1148
+ clickable_logo
1149
+ # =================================================================== #
1150
+ # If it is a STEOP lecture then a special "STEOP image" will be
1151
+ # shown.
1152
+ # =================================================================== #
1153
+ if is_a_steop_lecture
1154
+ _ << Studium.relative_steop_picture # return_proper_logo_for_this_university(:steop_picture)
1155
+ end
1156
+ # =================================================================== #
1157
+ # Next, we add the name of the lecture. This can either be
1158
+ # `this_lecture`, which will include the lecture-id,
1159
+ # or `name_of_the_lecture`, which will NOT include the lecture-id.
1160
+ # =================================================================== #
1161
+ if bereits_absolviert == 'Nein'
1162
+ # ================================================================= #
1163
+ # In this case we will use slightly different colours.
1164
+ # ================================================================= #
1165
+ bold_name_of_the_lecture = '<b style="font-size:larger; color: navy">'+
1166
+ this_lecture+
1167
+ '</b>'
1168
+ else # this is the default
1169
+ bold_name_of_the_lecture = '<b style="font-size:larger">'+
1170
+ this_lecture+
1171
+ '</b>'
1172
+ end
1173
+ _ << " Lehrveranstaltung <b>##{index}</b>:</span> "+
1174
+ bold_name_of_the_lecture+
1175
+ ', Bereits <b>absolviert</b>? <span style="font-size:larger">'+
1176
+ colourized_bereits_absolviert+'</span>'\
1177
+ ' (LVA Nummer: <b>'+lva_id.to_s+'</b>; '\
1178
+ 'ECTS: <b>'+n_ects_points.to_s+'</b>; '\
1179
+ 'Lecture Type: <b>'+lecture_type+'</b>; '\
1180
+ 'Semester: <b>'+semester+'</b>; '
1181
+ _ << "University: <b>#{university}</b>) "
1182
+ # =================================================================== #
1183
+ # Add bachelor-or-master lecture next but only for unsolved
1184
+ # lectures.
1185
+ # =================================================================== #
1186
+ if bereits_absolviert == 'Nein'
1187
+ _ << return_bachelor_or_master_logo(curricula)
1188
+ end
1189
+ # =================================================================== #
1190
+ # Next check whether the lecture is a practical course. If it is we
1191
+ # will add a certain image, but only if it is NOT yet solved.
1192
+ # =================================================================== #
1193
+ if is_this_lecture_a_practical_course?(lecture_type) and
1194
+ (bereits_absolviert == 'Nein')
1195
+ _ << PRACTICAL_COURSE_IMAGE
1196
+ end
1197
+ _ << "#{HtmlTags::BR}#{N}"
1198
+ # =================================================================== #
1199
+ # If the lecture has not been solved yet, we will show the remote
1200
+ # URL. However had, via the commandline flag --show-all-URLs this
1201
+ # can be overruled.
1202
+ # =================================================================== #
1203
+ shall_we_show_the_url = false
1204
+ if @show_all_URLs or (bereits_absolviert == 'Nein')
1205
+ shall_we_show_the_url = true
1206
+ end
1207
+ # =================================================================== #
1208
+ # === Show the associated URL to the given lecture.
1209
+ # =================================================================== #
1210
+ if shall_we_show_the_url
1211
+ this_url = ::Studium.return_homepage_of_this_lecture(this_lecture)
1212
+ _ << return_arrow_pointing_to_the_right_side('3em')
1213
+ _ << '<a style="margin-left: 5em; font-size: larger; font-weight:bold" href="'+this_url+'">'+
1214
+ this_url+
1215
+ '</a>'+BR+N
1216
+ # ================================================================= #
1217
+ # === Show Moodle entries
1218
+ #
1219
+ # Since as of 28.10.2019 we will also display the Moodle link
1220
+ # to this course.
1221
+ # ================================================================= #
1222
+ url_to_moodle = ::Studium.return_remote_moodle_link_of_this_lecture(this_lecture)
1223
+ _ << return_arrow_pointing_to_the_right_side('3em')
1224
+ if (url_to_moodle == this_lecture) and !url_to_moodle.include?('http')
1225
+ url_to_moodle = '[No remote URL for Moodle is known for this course.]'
1226
+ _ << '<span style="margin-left: 5em; font-size: larger; font-weight:bold; color: darkblue" href="'+url_to_moodle+'">'+
1227
+ url_to_moodle+
1228
+ '</span>'+BR+N
1229
+ else
1230
+ _ << '<a style="margin-left: 5em; font-size: larger; font-weight:bold" href="'+url_to_moodle+'">'+
1231
+ url_to_moodle+
1232
+ '</a>'+BR+N
1233
+ end
1234
+ # ================================================================= #
1235
+ # Next, determine when the next exam may happen but only do so
1236
+ # when the instance variable @show_next_exams is true. We will
1237
+ # also NOT do any checking here and simply use the first found
1238
+ # entry, if we are instructed to show the next upcoming exams.
1239
+ # The user has to update the file lecture_information on his/her
1240
+ # own.
1241
+ # ================================================================= #
1242
+ if @show_next_exams
1243
+ if pointer_to_the_lecture_dataset.has_key? 'exams'
1244
+ array_upcoming_exams = pointer_to_the_lecture_dataset['exams']
1245
+ first_entry = array_upcoming_exams.first
1246
+ first_entry = remove_weekdays(first_entry)
1247
+ weekday = first_entry
1248
+ if weekday.include? ','
1249
+ weekday = weekday.split(',').first
1250
+ end
1251
+ weekday = english_to_german_weekday(
1252
+ translate_dd_mm_yyyy_to_weekday(weekday)
1253
+ )
1254
+ _ << '<span style="font-weight:bold; font-size: larger;margin-left:9em"> ^^^ '+
1255
+ '<b style="color: teal">Next exam:</b> '+
1256
+ weekday+' '+
1257
+ first_entry+'</span>'+BR+N
1258
+ end
1259
+ end
1260
+ end
1261
+ }
1262
+ # =================================================================== #
1263
+ # Next add how many lectures are in this Curriculum.
1264
+ # =================================================================== #
1265
+ _ << BR+
1266
+ return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved(:use_for_html).join(' ')+N
1267
+ _ << BR+BR+
1268
+ return_how_many_ects_points_this_curriculum_has_in_total(:no_colours)+'<br>'+N
1269
+ _ << BR+
1270
+ return_how_many_ects_points_have_been_passed_already(:use_for_html).join(' ')+N
1271
+ # =================================================================== #
1272
+ # Determine how many lectures are missing still.
1273
+ # =================================================================== #
1274
+ n_missing_lectures = n_total_lectures?.to_i - n_lectures_completed?
1275
+ _ << "#{BR}#{BR}There are still <b>#{n_missing_lectures.to_s}</b> lectures missing "\
1276
+ "before this curriculum has been completed successfully."
1277
+ # =================================================================== #
1278
+ # Next, add average grade, if we are using it at all altogether.
1279
+ # =================================================================== #
1280
+ if @do_report
1281
+ average_grade = return_the_average_grade
1282
+ _ << "\n<br><br>The <span style=\"font-weight:800;padding-left:2px; padding-right:2px;background-color: black; color:gold\">average grade</span> "\
1283
+ "is: <b style=\"color:darkgreen\">#{average_grade}</b>\n\n<br><br>"
1284
+ end
1285
+ # =================================================================== #
1286
+ # Also add the timetable of upcoming exams next, a html <div>.
1287
+ # =================================================================== #
1288
+ if @show_next_exams
1289
+ _ << "#{return_timetable_of_upcoming_exams}#{N}"
1290
+ end
1291
+ _ << "#{N}</div>"
1292
+ _ << @append_this_string_onto_the_html_string
1293
+ # =================================================================== #
1294
+ # Store into e. g.:
1295
+ # "#{log_dir?}html/#{title?.to_s.tr(' ','_').delete('()')}.html"
1296
+ # =================================================================== #
1297
+ set_html_string(_)
1298
+ _ << "</html>#{N}"
1299
+ # =================================================================== #
1300
+ # We will only generate a .html file if we are using the commandline
1301
+ # variant.
1302
+ # =================================================================== #
1303
+ if cmdline?
1304
+ result = "Next storing into\n".dup
1305
+ result << " `#{sfile(html_file)}`\n"
1306
+ also_open_in_the_browser = true
1307
+ if also_open_in_the_browser
1308
+ result << "\nThat page will be opened via the browser as well."
1309
+ opnn; e result
1310
+ write_what_into(_, html_file)
1311
+ Open.in_browser(html_file) { :be_silent } # Don't show the exact command.
1312
+ end
1313
+ end
1314
+ end
1315
+ end
1316
+
1317
+ # ========================================================================= #
1318
+ # === do_generate_a_html_file
1319
+ #
1320
+ # This method can be used to generate a .html file no matter what.
1321
+ #
1322
+ # The other method, consider_generating_a_html_file, will instead
1323
+ # honour a certain instance variable.
1324
+ # ========================================================================= #
1325
+ def do_generate_a_html_file
1326
+ consider_generating_a_html_file(true)
1327
+ end
1328
+
1329
+ # ========================================================================= #
1330
+ # === initialize
1331
+ # ========================================================================= #
1332
+ def initialize(
1333
+ commandline_arguments = [],
1334
+ run_already = true
1335
+ )
1336
+ reset
1337
+ case commandline_arguments
1338
+ # ======================================================================= #
1339
+ # === :do_not_run_yet
1340
+ # ======================================================================= #
1341
+ when :do_not_run_yet
1342
+ commandline_arguments = nil
1343
+ run_already = false
1344
+ end
1345
+ set_commandline_arguments(
1346
+ commandline_arguments
1347
+ )
1348
+ case run_already
1349
+ # ======================================================================= #
1350
+ # === :do_not_run_yet
1351
+ # ======================================================================= #
1352
+ when :do_not_run_yet
1353
+ run_already = false
1354
+ end
1355
+ # ======================================================================= #
1356
+ # === Handle blocks given to this class
1357
+ # ======================================================================= #
1358
+ if block_given?
1359
+ yielded = yield
1360
+ case yielded
1361
+ # ===================================================================== #
1362
+ # === :do_not_run_yet
1363
+ # ===================================================================== #
1364
+ when :do_not_run_yet
1365
+ run_already = false
1366
+ # ===================================================================== #
1367
+ # === :www
1368
+ # ===================================================================== #
1369
+ when :www
1370
+ set_www_mode
1371
+ end
1372
+ end
1373
+ run if run_already
1374
+ end
1375
+
1376
+ # ========================================================================= #
1377
+ # === try_to_rename_kde_konsole_tab
1378
+ #
1379
+ # This method can be used to rename the KDE Konsole tab.
1380
+ # ========================================================================= #
1381
+ def try_to_rename_kde_konsole_tab(
1382
+ use_this_title = return_name_of_the_curriculum
1383
+ )
1384
+ if rename_konsole_tab?
1385
+ begin
1386
+ require 'roebe/requires/require_kde_konsole.rb'
1387
+ Roebe::KdeKonsole.new(use_this_title) { :be_quiet }
1388
+ rescue LoadError
1389
+ if is_on_roebe?
1390
+ e "The #{steelblue('class Roebe::KdeKonsole')} is not "\
1391
+ "available. Install the roebe-gem."
1392
+ end
1393
+ end
1394
+ end
1395
+ end
1396
+
1397
+ # ========================================================================= #
1398
+ # === menu (menu tag)
1399
+ # ========================================================================= #
1400
+ def menu(
1401
+ i = commandline_arguments?
1402
+ )
1403
+ if i.is_a? Array
1404
+ i.each {|entry| menu(entry) }
1405
+ else
1406
+ case i.to_s # case tag
1407
+ # ===================================================================== #
1408
+ # === lectures_commandline --ignore-outdated
1409
+ # ===================================================================== #
1410
+ when /^-?-?ignore(-|_| )?outdated$/i
1411
+ do_ignore_outdated_lectures
1412
+ # ===================================================================== #
1413
+ # === lectures_commandline --indi3
1414
+ #
1415
+ # This is indi3.
1416
+ # ===================================================================== #
1417
+ when /^-?-?master(-|_| )?bioinformatics(-|_| )?and(-|_| )?molecular(-|_| )?biotechnology$/i,
1418
+ /^-?-?indi3$/i
1419
+ use_master_bioinformatics_and_nanobiotechnology_in_molecular_medicine
1420
+ # ===================================================================== #
1421
+ # === lectures_commandline --bachelor-vektorx
1422
+ # ===================================================================== #
1423
+ when /^-?-?bachelor(-|_| )?vektorx?$/i,
1424
+ /^-?-?bachelor(-|_| )?vektore?n?$/,
1425
+ /^-?-?bachelor(-|_| )?vector$/,
1426
+ /^-?-?bachelor(-|_| )?vector(-|_| )?curriculum$/,
1427
+ /^-?-?molekularsimulatorisch(-|_| )?therapeutische(-|_| )?vektoren$/i,
1428
+ /^-?-?bachelor(-|_| )?molekularsimulatorisch(-|_| )?therapeutische(-|_| )?vektoren$/i,
1429
+ /^-?-?bachelor(-|_| )?individuelles(-|_| )?curriculum(-|_| )?molekularsimulatorische(-|_| )?vektoren(-|_| )?in(-|_| )?der(-|_| )?biotechnologie$/i,
1430
+ /^-?-?bachelor(-|_| )?individuelles(-|_| )?curriculum(-|_| )?molekularsimulatorische(-|_| )?vektoren(-|_| )?in(-|_| )?biotechnologie(-|_| )?und(-|_| )?bioinformatik$/i,
1431
+ /^-?-?bvektor$/i,
1432
+ /^-?-?individuelles(-|_| )?bachelor(-|_| )?studium/i,
1433
+ /^-?-?indi4$/i,
1434
+ 'vektoren'
1435
+ use_bachelor_vektor_curriculum
1436
+ # ===================================================================== #
1437
+ # === lectures_commandline --bioinf2
1438
+ #
1439
+ # This is indi2, the bachelor-programme at the BOKU.
1440
+ #
1441
+ # The full name is:
1442
+ #
1443
+ # "Bachelorcurriculum Informatik und Biotechnologie unter Berücksichtigung immunanalytisch-molekularmedizinischer Aspekte"
1444
+ #
1445
+ # ===================================================================== #
1446
+ when /^-?-?bioinf2$/i,
1447
+ /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?und(-|_| )?molekulare(-|_| )?biotechnologie$/i,
1448
+ /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?und(-|_| )?biotechnologie$/i,
1449
+ /^-?-?bachelor(-|_| )?bioinformatik(-|_| )?an(-|_| )?der(-|_| )?boku$/i,
1450
+ /^-?-?indi2$/i
1451
+ use_bachelor_informatik_und_biotechnologie_unter_berücksichtigung_immunanalytisch_molekularmedizinischer_aspekte
1452
+ # ===================================================================== #
1453
+ # === lectures_commandline --biologische_informatik
1454
+ #
1455
+ # This is indi1, at the TU Vienna.
1456
+ # ===================================================================== #
1457
+ when /^-?-?biologische(-|_| )?informatik$/i,
1458
+ /^-?-?bachelor(-|_| )?biologische(-|_| )?informatik$/i,
1459
+ /^-?-?use(-|_| )?individual(-|_| )?bachelor(-|_| )?informatik(-|_| )?und(-|_| )?molekulare(-|_| )?biologie$/i,
1460
+ /^-?-?indi1$/i,
1461
+ /^-?-?indi$/i
1462
+ use_bachelor_biologische_informatik
1463
+ # ===================================================================== #
1464
+ # === lectures_commandline --mdummy
1465
+ # ===================================================================== #
1466
+ when /^-?-?master(-|_| )?dummy(-|_| )?curriculum$/i,
1467
+ /^-?-?mdummy$/i
1468
+ use_master_dummy_curriculum
1469
+ # ===================================================================== #
1470
+ # === lectures_commandline --dummy
1471
+ # ===================================================================== #
1472
+ when /^-?-?bachelor(-|_| )?dummy(-|_| )?curriculum$/i,
1473
+ /^-?-?bdummy$/i,
1474
+ /^-?-?dummy$/i
1475
+ use_bachelor_dummy_curriculum
1476
+ # ===================================================================== #
1477
+ # === lectures_commandline --aggregate
1478
+ #
1479
+ # This entry point really combines all curricula and lectures
1480
+ # that I intend to pass.
1481
+ #
1482
+ # Invocation example on my home system:
1483
+ #
1484
+ # bigaggregate
1485
+ #
1486
+ # ===================================================================== #
1487
+ when /^-?-?aggregate$/i
1488
+ use_master_vektoren_curriculum # Combine the bachelor-master curricula.
1489
+ is_not_an_individual_curriculum
1490
+ prepend_this_to_dataset(
1491
+ %i(
1492
+ bachelor_vektorx_curriculum
1493
+ master_vektorx_curriculum
1494
+ bachelor_informatik_und_molekulare_biologie
1495
+ bachelor_lbt
1496
+ bachelor_bioinformatik_an_der_boku
1497
+
1498
+ master_lbt
1499
+ master_bioinformatik_an_der_boku
1500
+ ) # bachelor_agrarwissenschaften
1501
+ # bachelor_tu_wien
1502
+ )
1503
+ prepend_this_to_dataset(
1504
+ ['892100 Physik (KTWW+HNT)']
1505
+ )
1506
+ sanitize_the_dataset
1507
+ uniq_the_dataset
1508
+ # ===================================================================== #
1509
+ # === lectures_commandline --aggregate-only-individual-curricula
1510
+ #
1511
+ # This entry point combines all individual curricula and lectures
1512
+ # in these curricula that I wish to pass.
1513
+ # ===================================================================== #
1514
+ when /^-?-?aggregate(-|_| )?only(-|_| )?individual(-|_| )?curricula$/i
1515
+ use_master_vektoren_curriculum # Combine the bachelor-master curricula.
1516
+ prepend_this_to_dataset(
1517
+ %i(
1518
+ bachelor_vektorx_curriculum
1519
+ bachelor_informatik_und_molekulare_biologie
1520
+ bachelor_bioinformatik_an_der_boku
1521
+ )
1522
+ )
1523
+ sanitize_the_dataset
1524
+ uniq_the_dataset
1525
+ # ===================================================================== #
1526
+ # === lectures_commandline --lmbt_curriculum
1527
+ # ===================================================================== #
1528
+ when /^-?-?bachelor(-|_| )?lm?bt$/i,
1529
+ /^-?-?bachelor(-|_| )?lm?bt$(-|_| )?curriculum/i,
1530
+ /^-?-?lm?bt$(-|_| )?curriculum/i,
1531
+ 'lmbt',
1532
+ /lbt/i
1533
+ use_bachelor_lmbt_curriculum
1534
+ # ===================================================================== #
1535
+ # === lectures_commandline --bachelor-master-vektorx
1536
+ #
1537
+ # This entry point is the "bachelor-master-vector" joint
1538
+ # curriculum.
1539
+ #
1540
+ # Another invocation example:
1541
+ #
1542
+ # lectures_commandline --bmvec
1543
+ #
1544
+ # ===================================================================== #
1545
+ when /^-?-?bachelor(-|_| )?master(-|_| )?vektorx?$/i,
1546
+ /^-?-?bachelor(-|_| )?master(-|_| )?vektoren$/i,
1547
+ /^-?-?bachelor(-|_| )?master(-|_| )?vector$/i,
1548
+ /^-?-?bmvec$/i,
1549
+ /^-?-?bmvek$/i
1550
+ use_master_vektoren_curriculum # Combine the bachelor-master curricula.
1551
+ prepend_this_to_dataset(:bachelor_vektorx_curriculum) # And then prepend the dataset.
1552
+ # ===================================================================== #
1553
+ # === master_vektoren
1554
+ #
1555
+ # This entry point deals with the master lecture of the
1556
+ # vector-curriculum.
1557
+ #
1558
+ # Invocation example:
1559
+ #
1560
+ # lectures_commandline --master_vektorx
1561
+ #
1562
+ # ===================================================================== #
1563
+ when /^-?-?master(-|_| )?ve(c|k)torx$/,
1564
+ /^-?-?master(_|-)?molekularsimulatorisch(_|-)?therapeutische(_|-)?vektoren$/i,
1565
+ /^-?-?master(_|-)?individuelles(_|-)?curriculum(_|-)?molekularsimulatorische(_|-)?vektoren/i, # lcommandline --master-individuelles-curriculum-molekularsimulatorische-vektoren
1566
+ /^-?-?master(_|-)?vektoren$/i,
1567
+ /^-?-?master(-|_| )?ve(c|k)tors?$/,
1568
+ /^-?-?master(-|_| )?individuell/,
1569
+ 'mastervect',
1570
+ 'mastersim'
1571
+ use_master_vektoren_curriculum
1572
+ # ===================================================================== #
1573
+ # === lectures_commandline --forstwirtschaft
1574
+ # ===================================================================== #
1575
+ when /^-?-?forstwirtschaft$/i,
1576
+ /^-?-?bachelor(-|_| )?forstwirtschaft$/i
1577
+ use_bachelor_forstwirtschaft
1578
+ # ===================================================================== #
1579
+ # === lectures_commandline --bachelor-ern
1580
+ # ===================================================================== #
1581
+ when /^-?-?bachelor(-|_| )?ernährung?$/,
1582
+ /^-?-?bachelor(-|_| )?ern$/,
1583
+ /^-?-?bachelor(-|_| )?ernährung(_|-)?uni(_|-)?wien$/,
1584
+ /^-?-?bachelor(-|_| )?ernährungswissenschaften$/,
1585
+ /^-?-?bachelor(-|_| )?nutrition(_|-)?science$/i,
1586
+ /-?-?ernährung/,
1587
+ 'ernährungswissenschaften',
1588
+ 'ern'
1589
+ use_bachelor_ernährung_curriculum
1590
+ # ===================================================================== #
1591
+ # === lectures_commandline --bachelor_molekularbiologie_graz
1592
+ # ===================================================================== #
1593
+ when /^-?-?bachelor(-|_| )?molekularbiologie(-|_| )?graz$/i,
1594
+ /^-?-?bachelor(-|_| )?molekularbiologie(-|_| )?graz(-|_| )?curriculum$/i,
1595
+ /^-?-?bachelor(-|_| )?molbio(-|_| )?graz$/i,
1596
+ /^-?-?bachelor(-|_| )?molekularbiologie$/i,
1597
+ /^-?-?graz$/i
1598
+ use_bachelor_molekularbiologie_curriculum
1599
+ # ===================================================================== #
1600
+ # === lectures_commandline --bachelor-pharmazie
1601
+ # ===================================================================== #
1602
+ when /^-?-?bachelor(-|_| )?pharmazie$/i,
1603
+ /^-?-?pharmazie$/i,
1604
+ /^-?-?pharm$/i,
1605
+ /^-?-?bachelor(-|_| )?pharm$/i
1606
+ use_bachelor_pharmazie_curriculum
1607
+ # ===================================================================== #
1608
+ # === lectures_commandline --bachelor_verfahrenstechnik
1609
+ # ===================================================================== #
1610
+ when /^-?-?bachelor(-|_| )?verfahrenstechnik$/i,
1611
+ /^-?-?verfahrenstechnik$/i
1612
+ use_bachelor_verfahrenstechnik_curriculum
1613
+ # ===================================================================== #
1614
+ # === lectures_commandline --bachelor_technical_chemistry
1615
+ # ===================================================================== #
1616
+ when /^-?-?bachelor(-|_| )?technical(-|_| )?chemistry?$/i
1617
+ use_bachelor_technical_chemistry_curriculum
1618
+ # ===================================================================== #
1619
+ # === lectures_commandline --master-lmbt
1620
+ # ===================================================================== #
1621
+ when /^-?-?(-|_| )?lm?bt$/i,
1622
+ /^-?-?master(-|_| )?lm?bt(-|_| )?curriculum$/i,
1623
+ /^-?-?master(-|_| )?biotech$/i,
1624
+ /^-?-?master(-|_| )?lmbt$/i,
1625
+ /LBT2/i,
1626
+ 'biotechnology',
1627
+ 'masterbiotech'
1628
+ use_master_lmbt_curriculum
1629
+ # ===================================================================== #
1630
+ # === lectures_commandline --master-pharmazie
1631
+ # ===================================================================== #
1632
+ when /^-?-?master(-|_| )?pharmazie$/i,
1633
+ /^-?-?master(-|_| )?pharmazie(-|_| )?curriculum$/i,
1634
+ 'mpharmacy',
1635
+ 'mpharma'
1636
+ use_master_pharmazie_curriculum
1637
+ # ===================================================================== #
1638
+ # === lectures_commandline --master-biologische-chemie
1639
+ # ===================================================================== #
1640
+ when /^-?-?master(-|_| )?biologische(-|_| )?chemie$/i,
1641
+ /^-?-?master(-|_| )?biologische(-|_| )?chemie(-|_| )?curriculum$/i,
1642
+ /^-?-?biologische(-|_| )?chemie$/i,
1643
+ 'mbiochem'
1644
+ use_master_biologische_chemie_curriculum
1645
+ # ===================================================================== #
1646
+ # === lectures_commandline --tu_master_biotech
1647
+ # ===================================================================== #
1648
+ when /^-?-?master(_|-)?tu(_|-)?biotechnology$/i,
1649
+ /^-?-?tu(_|-)?master(_|-)?biotech$/i,
1650
+ /^-?-?master(_|-)?tu(_|-)?wien(_|-)?biotechnologie$/i,
1651
+ /^-?-?tu(_|-)?vienna(_|-)?biotech(_|-)?master$/i,
1652
+ /^-?-?master(_|-)?tuwienbiotech$/i,
1653
+ /^-?-?tu(_|-)?wien(_|-)?biotech$/i
1654
+ use_tu_master_biotechnology_curriculum
1655
+ # ===================================================================== #
1656
+ # === lectures_commandline --bachelor-mikrobiologie
1657
+ # ===================================================================== #
1658
+ when /^-?-?bachelor(-|_| )?mikrobiologie$/i,
1659
+ /^-?-?mikrobiologie$/i,
1660
+ /^-?-?microbiology$/i
1661
+ use_mikrobiologie_individuelles_curriculum
1662
+ # ===================================================================== #
1663
+ # === lectures_commandline --priority-points
1664
+ # ===================================================================== #
1665
+ when /^-?-?priority(-|_| )?points$/i
1666
+ use_priority_points
1667
+ # ===================================================================== #
1668
+ # === lectures_commandline --informatik_curriculum
1669
+ # ===================================================================== #
1670
+ when /^-?-?informatik(_|-)?curriculum$/i,
1671
+ /^-?-?informatik$/i,
1672
+ /^-?-?bachelor(_|-)?informatik$/i,
1673
+ /^-?-?bachelor(_|-)?informatik(_|-)?curriculum$/i,
1674
+ 'informatik'
1675
+ use_bachelor_informatik_curriculum
1676
+ # ===================================================================== #
1677
+ # === lectures_commandline --ktww_curriculum
1678
+ # ===================================================================== #
1679
+ when /^-?-?ktww(_|-)?curriculum$/i,
1680
+ /^-?-?boku(_|-)?ktww$/i,
1681
+ /^-?-?ktww$/i,
1682
+ /^-?-?bachelor(_|-)?ktww$/i,
1683
+ /^-?-?bachelor(_|-)?boku(_|-)?ktww(_|-)?curriculum$/i
1684
+ use_bachelor_ktww_curriculum
1685
+ # ===================================================================== #
1686
+ # === --no-html-page
1687
+ # ===================================================================== #
1688
+ when /^-?-?no(-|_| )?html(-|_| )?page$/,
1689
+ /^-?-?no(-|_| )?html$/
1690
+ no_html_page
1691
+ # ===================================================================== #
1692
+ # === lectures_commandline --aw_curriculum
1693
+ # ===================================================================== #
1694
+ when /^-?-?aw(_|-)?curriculum$/i,
1695
+ /^-?-?boku(_|-)?aw$/i,
1696
+ /^-?-?AW$/i,
1697
+ /^-?-?agrarwissenschaften$/i,
1698
+ /^-?-?bachelor(_|-)?agrarwissenschaften$/i,
1699
+ 'bachelorAW'
1700
+ use_bachelor_agrarwissenschaften_curriculum
1701
+ # ===================================================================== #
1702
+ # === lectures_commandline --master-genetik-und-entwicklungsbiologie
1703
+ # ===================================================================== #
1704
+ when /^-?-?master(-|_| )?genetik(-|_| )?und(-|_| )?entwicklungsbiologie$/i,
1705
+ /^-?-?master(-|_| )?genetik(-|_| )?und(-|_| )?entwicklungsbiologie(-|_| )?curriculum$/i
1706
+ use_uni_vienna_master_genetik_und_entwicklungsbiologie_curriculum
1707
+ # ===================================================================== #
1708
+ # === lectures_commandline --master_bioinformatik
1709
+ # ===================================================================== #
1710
+ when /^-?-?master(_|-)?bioinformatik$/i,
1711
+ /^-?-?master(_|-)?bioinformatics$/i
1712
+ use_uni_vienna_master_bioinformatics_curriculum
1713
+ # ===================================================================== #
1714
+ # === lectures_commandline --bachelor_medizinische_informatik
1715
+ # ===================================================================== #
1716
+ when /^-?-?bachelor(-|_| )?medizinische(-|_| )?informatik$/i
1717
+ use_bachelor_medizinische_informatik_curriculum
1718
+ # ===================================================================== #
1719
+ # === lectures_commandline --molbio
1720
+ # ===================================================================== #
1721
+ when /^-?-?bachelor(-|_| )?molekularbiologie$/,
1722
+ /^-?-?bachelor(-|_| )?molekulare(-|_| )?biologie$/, # lectures_commandline --bachelor_molekulare_biologie
1723
+ /^-?-?bachelor(-|_| )?molbio$/,
1724
+ /^-?-?molbio$/,
1725
+ /^-?-?mbio$/,
1726
+ 'molekularebiologie'
1727
+ use_bachelor_molbio_curriculum
1728
+ # ===================================================================== #
1729
+ # === lectures_commandline --bachelor-chemie
1730
+ # ===================================================================== #
1731
+ when /^-?-?bachelor(-|_| )?chemie?$/,
1732
+ /^-?-?bachelor(-|_| )?chemie?uni(_|-)?wien$/,
1733
+ /^-?-?bachelor(-|_| )?chemie(-|_| )?uni(-|_| )?wien$/,
1734
+ /^-?-?uni(-|_| )?wien(-|_| )?chemie$/,
1735
+ /^-?-?uniwien(-|_| )?bachelor(-|_| )?chemie$/,
1736
+ /^-?-?chem(-|_| )?bach$/i, # lcommandline --chembach
1737
+ 'chemie'
1738
+ use_bachelor_chemie_curriculum
1739
+ # ===================================================================== #
1740
+ # === lectures_commandline --show-all-URLs
1741
+ #
1742
+ # This can be triggered like so:
1743
+ #
1744
+ # studiumsolved --show-all-URLs --tuwienbiotech
1745
+ #
1746
+ # ===================================================================== #
1747
+ when /^-?-?show(_|-)?all(_|-)?URLs$/i
1748
+ do_show_all_URLs
1749
+ # ===================================================================== #
1750
+ # === lectures_commandline --bachelor_ökologie_curriculum
1751
+ # ===================================================================== #
1752
+ when /^-?-?bachelor(_|-)?ökologie(_|-)?curriculum$/i,
1753
+ /^-?-?bachelor(_|-)?ecology(_|-)?curriculum/i,
1754
+ 'ökologie'
1755
+ use_bachelor_ökologie_curriculum
1756
+ # ===================================================================== #
1757
+ # === lectures_commandline --molbio2
1758
+ # ===================================================================== #
1759
+ when /^-?-?master(-|_| )?molekularbiologie$/,
1760
+ /^-?-?master(-|_| )?molekulare(-|_| )?biologie/i,
1761
+ /^-?-?master(-|_| )?molbio$/,
1762
+ /^-?-?molbio2$/,
1763
+ /^-?-?mbio2$/,
1764
+ 'mmolbio'
1765
+ use_master_molbio_curriculum
1766
+ # ===================================================================== #
1767
+ # === lectures_commandline --master_immunobiologie
1768
+ # ===================================================================== #
1769
+ when /^-?-?master(-|_| )?immunobiologie$/i,
1770
+ /^-?-?master(-|_| )?immunobiology$/i,
1771
+ /^-?-?master(-|_| )?immunobio$/i,
1772
+ /^-?-?master(-|_| )?immunbiology$/i,
1773
+ /^-?-?master(-|_| )?immuno$/i,
1774
+ /^-?-?immunbio$/i
1775
+ use_master_immunobiology_curriculum
1776
+ # ===================================================================== #
1777
+ # === lectures_commandline --biologie_basisblock
1778
+ # ===================================================================== #
1779
+ when /^-?-?uniwien(_|-)?biologie(_|-)?basisblock$/i,
1780
+ /^-?-?bachelor(_|-)?biologie(_|-)?basisblock$/i,
1781
+ /^-?-?bachelor(_|-)?biologe(_|-)?basisblock$/i,
1782
+ /^-?-?biologie(_|-)?basisblock$/i,
1783
+ /^-?-?bachelor(_|-)?biologie/i,
1784
+ /^-?-?biologie(_|-)?base$/i,
1785
+ /^-?-?biologie(_|-)?1$/i,
1786
+ 'biologiebasisblock',
1787
+ 'biologie',
1788
+ 'uniwienbiologie'
1789
+ use_bachelor_biologie_basisblock_curriculum
1790
+ # ===================================================================== #
1791
+ # === lectures_commandline --genetic
1792
+ # ===================================================================== #
1793
+ when /^-?-?bachelor(-|_| )?genetik$/,
1794
+ /^-?-?bachelor(-|_| )?genetics$/,
1795
+ /^-?-?bachelor(-|_| )?mikrobiologie(-|_| )?und(-|_| )?genetik$/,
1796
+ /^-?-?geneti(c|k)$/,
1797
+ /^-?-?genetics$/,
1798
+ 'mikrobiologie'
1799
+ use_bachelor_genetik_curriculum
1800
+ # ===================================================================== #
1801
+ # === curriculum bachelor_master_lmbt_curriculum
1802
+ # ===================================================================== #
1803
+ when /^-?-?lmbt(-|_| )?complete/i,
1804
+ /^-?-?bachelor(-|_| )?master(-|_| )?lmbt(-|_| )?curriculum$/i
1805
+ use_master_lmbt_curriculum
1806
+ prepend_this_to_dataset(:bachelor_lmbt_curriculum)
1807
+ # ===================================================================== #
1808
+ # === lectures_commandline --bachelor_master_tu_wien
1809
+ # ===================================================================== #
1810
+ when /^-?-?bachelor(-|_| )?master(-|_| )?tu(-|_| )?wien$/i,
1811
+ /bachelor(-|_| )?master(-|_| )?individuelles(-|_| )?studium(-|_| )?an(-|_| )?der(-|_| )?tu(-|_| )?wien$/i
1812
+ use_bachelor_master_tu_wien_curriculum
1813
+ # ===================================================================== #
1814
+ # === lectures_commandline --bachelor_botanik
1815
+ # ===================================================================== #
1816
+ when /^-?-?bachelor(-|_| )?botanik(-|_| )?curriculum$/i,
1817
+ /^-?-?bachelor(-|_| )?botanik$/i,
1818
+ /^botanik$/,
1819
+ 'botany'
1820
+ use_bachelor_botanik_curriculum
1821
+ # ===================================================================== #
1822
+ # === lectures_commandline --bachelor-boku-ubrm
1823
+ # ===================================================================== #
1824
+ when /^-?-?bachelor(-|_| )?boku(-|_| )?ubrm$/i,
1825
+ /^-?-?boku(-|_| )?ubrm$/i,
1826
+ /^-?-?ubrm$/i
1827
+ use_bachelor_ubrm_curriculum
1828
+ # ===================================================================== #
1829
+ # === curriculum --master_immunobiologie --do-not-show-upcoming-exams
1830
+ # ===================================================================== #
1831
+ when /-?-?do-?not-?show-?upcoming-?exams/,
1832
+ /-?-?do-?not-?show-?next-?exams/,
1833
+ /-?-?no-?next-?exams/
1834
+ do_not_show_the_next_exams
1835
+ # ===================================================================== #
1836
+ # === curriculum --files
1837
+ # ===================================================================== #
1838
+ when /-?-?files?\??/,
1839
+ /-?-?fshow(_|-)?important(_|-)?files/
1840
+ show_important_files
1841
+ exit
1842
+ # ===================================================================== #
1843
+ # === curriculum --help
1844
+ # ===================================================================== #
1845
+ when /^-?-?help$/
1846
+ show_help
1847
+ exit
1848
+ # ===================================================================== #
1849
+ # === lectures_commandline --available-curricula
1850
+ # ===================================================================== #
1851
+ when /-?-?available-?curricula/,
1852
+ /-?-?show-?available/
1853
+ show_available_curricula
1854
+ exit
1855
+ else # else tag
1856
+ opnn; e "Unknown input `#{sfancy(i)}` "\
1857
+ "(in the method #{__method__}())"
1858
+ exit # We will exit since as of April 2018; less confusing to do so.
1859
+ end
1860
+ end
1861
+ end; alias use_this_curriculum= menu # === use_this_curriculum=
1862
+
1863
+ # ========================================================================= #
1864
+ # === set_commandline_arguments
1865
+ # ========================================================================= #
1866
+ def set_commandline_arguments(i)
1867
+ # ======================================================================= #
1868
+ # We will handle empty Arrays a bit differently if we are on
1869
+ # a roebe-system.
1870
+ # ======================================================================= #
1871
+ if i.is_a?(Array) and i.empty?
1872
+ i << :bachelor_vektorx # Set a default value here.
1873
+ end
1874
+ @commandline_arguments = i
1875
+ end
1876
+
1877
+ # ========================================================================= #
1878
+ # === set_dataset
1879
+ # ========================================================================= #
1880
+ def set_dataset(i)
1881
+ @dataset = i
1882
+ end; alias set_all_lectures set_dataset # === set_all_lectures
1883
+
1884
+ # ========================================================================= #
1885
+ # === return_how_many_ects_points_this_curriculum_has_in_total
1886
+ # ========================================================================= #
1887
+ def return_how_many_ects_points_this_curriculum_has_in_total(
1888
+ use_colours = true
1889
+ )
1890
+ case use_colours
1891
+ when :no_colours
1892
+ use_colours = false
1893
+ end
1894
+ n_ects_points = @this_curriculum_has_n_ects_points_in_total
1895
+ # ======================================================================= #
1896
+ # Use colours, if issued to do so. On the commandline, this will
1897
+ # be the tomato colour.
1898
+ # ======================================================================= #
1899
+ if use_colours
1900
+ n_ects_points = tomato(n_ects_points)
1901
+ else
1902
+ n_ects_points = "<b>#{n_ects_points}</b>" # In this case we will assume www-use.
1903
+ end
1904
+ # ======================================================================= #
1905
+ # Next, return the Strings that informs the user how many ECTS points
1906
+ # the given curriculm has, in total. Since as of November 2019, we
1907
+ # will also inform the user how many of these ECTS require a
1908
+ # continuous mandatory assessment ("prüfungsimmanent").
1909
+ # ======================================================================= #
1910
+ n_ects_prüfungsimmanent = 0
1911
+ @dataset.each {|line|
1912
+ # ===================================================================== #
1913
+ # A line may look like this:
1914
+ #
1915
+ # 182.711 Betriebssysteme # 2.0 ECTS, VO
1916
+ #
1917
+ # ===================================================================== #
1918
+ name = line.dup
1919
+ if name.include? '#'
1920
+ name = name[0 .. (name.index('#') - 1)]
1921
+ name.strip!
1922
+ # =================================================================== #
1923
+ # Must still squeeze a bit:
1924
+ # =================================================================== #
1925
+ name.squeeze!(' ')
1926
+ if @lecture_dataset.has_key? name
1927
+ pointer = @lecture_dataset[name]
1928
+ n_ects = pointer[:ects].to_f
1929
+ type = pointer[:type]
1930
+ if is_prüfungsimmanent?(type)
1931
+ n_ects_prüfungsimmanent += n_ects
1932
+ end
1933
+ end
1934
+ end
1935
+ }
1936
+ n_percent_prüfungsimmanent = ((
1937
+ n_ects_prüfungsimmanent.to_f * 100.0
1938
+ ) / @this_curriculum_has_n_ects_points_in_total.to_f).round(1)
1939
+ colourized_n_ects_prüfungsimmanent =
1940
+ skyblue(n_percent_prüfungsimmanent.to_s.dup)
1941
+ "This curriculum has #{n_ects_points} ECTS points "\
1942
+ "in total, of which "\
1943
+ "#{colourized_n_ects_prüfungsimmanent} ECTS "\
1944
+ "("+n_percent_prüfungsimmanent.to_s+"%)\n"\
1945
+ "require continuous mandatory assessment "\
1946
+ "(#{orangered('prüfungsimmanent')})."
1947
+ end
1948
+
1949
+ # ========================================================================= #
1950
+ # === read_from_these_files?
1951
+ # ========================================================================= #
1952
+ def read_from_these_files?
1953
+ @read_from_these_files # This also means to keep track of the position of the curriculum-file.
1954
+ end; alias loaded_from_which_file? read_from_these_files? # === loaded_from_which_file?
1955
+ alias curriculum_file? read_from_these_files? # === curriculum_file?
1956
+ alias curriculum_file_location? read_from_these_files? # === curriculum_file_location?
1957
+ alias curriculum_file_location read_from_these_files? # === curriculum_file_location
1958
+ alias curriculum? read_from_these_files? # === curriculum?
1959
+
1960
+ # ========================================================================= #
1961
+ # === dataset?
1962
+ # ========================================================================= #
1963
+ def dataset?
1964
+ @dataset
1965
+ end; alias dataset_holding_all_lectures dataset? # === dataset_holding_all_lectures
1966
+ alias all_lectures? dataset? # === all_lectures?
1967
+ alias lectures? dataset? # === lectures?
1968
+
1969
+ # ========================================================================= #
1970
+ # === read_in_main_dataset_from_the_existing_files
1971
+ #
1972
+ # This method will read in from an Array, which is usually stored in
1973
+ # the instance variables @read_from_these_files.
1974
+ #
1975
+ # Input to this method can be like this:
1976
+ #
1977
+ # ["/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/studium/yaml/curricula/master_bioinformatik_066875.yml"]
1978
+ #
1979
+ # ========================================================================= #
1980
+ def read_in_main_dataset_from_the_existing_files(
1981
+ i = @read_from_these_files
1982
+ )
1983
+ if i
1984
+ i.each {|this_file|
1985
+ # =================================================================== #
1986
+ # The next method will read into the variable @dataset.
1987
+ # =================================================================== #
1988
+ if File.exist? this_file.to_s
1989
+ read_in_dataset_from_this_file(this_file) # Delegate to this method.
1990
+ else
1991
+ opnn; e "Can not read from non-existing file "\
1992
+ "`#{sfile(this_file)}`."
1993
+ opnn; e 'The original input to the method '+
1994
+ sfancy(__method__.to_s)+' was '+
1995
+ sfancy(i)+' (class '+i.to_s+')'
1996
+ opnn; e 'The '+orange('caller-stack')+' will be shown next:'
1997
+ e
1998
+ pp caller()
1999
+ e
2000
+ exit
2001
+ end
2002
+ }
2003
+ end
2004
+ end
2005
+
2006
+ # ========================================================================= #
2007
+ # === consider_generating_a_spreadsheet
2008
+ # ========================================================================= #
2009
+ def consider_generating_a_spreadsheet(
2010
+ i = @title
2011
+ )
2012
+ require 'studium/utility_scripts/generate_spreadsheet/generate_spreadsheet.rb'
2013
+ Studium::GenerateSpreadsheet.new(i)
2014
+ end
2015
+
2016
+ # ========================================================================= #
2017
+ # === consider_generating_a_graphviz_image_displaying_the_modules
2018
+ # ========================================================================= #
2019
+ def consider_generating_a_graphviz_image_displaying_the_modules(
2020
+ use_this_dataset
2021
+ )
2022
+ require 'image_paradise/graphviz/generate_graphviz_image.rb'
2023
+ copy = use_this_dataset.dup
2024
+ copy.map! {|entry|
2025
+ if entry.include? '#'
2026
+ entry = entry[0 .. ( entry.index('#') - 1 )]
2027
+ end
2028
+ entry.strip
2029
+ }
2030
+ copy = turn_this_array_into_the_full_dataset(
2031
+ copy.flatten, @lecture_dataset
2032
+ )
2033
+ # ======================================================================= #
2034
+ # Next, we will work on this modified dataset.
2035
+ # ======================================================================= #
2036
+ hash_containing_the_module_dependencies = {}
2037
+ copy.each_pair {|name_of_the_lecture, inner_hash|
2038
+ if inner_hash
2039
+ individual_curricula = inner_hash[:individual_curricula]
2040
+ if individual_curricula
2041
+ selection = individual_curricula.select {|most_inner_hash|
2042
+ most_inner_hash[:name_of_the_curriculum].include? @title
2043
+ }.first
2044
+ if selection
2045
+ individual_curriculum_module = selection[:individual_curriculum_module]
2046
+ if individual_curriculum_module
2047
+ individual_curriculum_module = individual_curriculum_module.first
2048
+ end
2049
+ individual_curriculum_depends_on_these_modules = selection[:individual_curriculum_depends_on_these_modules]
2050
+ hash_containing_the_module_dependencies[individual_curriculum_module] =
2051
+ individual_curriculum_depends_on_these_modules
2052
+ end
2053
+ end
2054
+ end
2055
+ }
2056
+ # ======================================================================= #
2057
+ # Next pass this Hash into class GenerateGraphvizImage.
2058
+ # ======================================================================= #
2059
+ ImageParadise::GenerateGraphvizImage.new(
2060
+ hash_containing_the_module_dependencies
2061
+ ) { :use_bold_font_and_german }
2062
+ end
2063
+
2064
+ # ========================================================================= #
2065
+ # === return_how_many_ects_points_have_been_passed_already
2066
+ # ========================================================================= #
2067
+ def return_how_many_ects_points_have_been_passed_already(
2068
+ use_for = @mode
2069
+ )
2070
+ n_percent = (
2071
+ (@n_ects_were_passed_so_far.to_f * 100) / n_ects_points_in_total?
2072
+ ).round(2)
2073
+ # ======================================================================= #
2074
+ # The next variable is not colourized by default, so that we can use
2075
+ # it for the :use_for_html entry point that will come next. A similar
2076
+ # reason is valid for the variable called `second_part`.
2077
+ # ======================================================================= #
2078
+ colourized_n_ECTS_points_were_passed = @n_ects_were_passed_so_far.to_s
2079
+ second_part = " <b>#{@title}</b>."
2080
+ case use_for
2081
+ when :use_for_html # (html tag, www tag)
2082
+ first_part = "In total we have passed <b>#{colourized_n_ECTS_points_were_passed} ECTS "\
2083
+ "points</b> (<b>#{n_percent.to_s+'%'}</b>) so far in the"
2084
+ when :commandline, :default # This is the default.
2085
+ colourized_n_ECTS_points_were_passed = plum(
2086
+ colourized_n_ECTS_points_were_passed
2087
+ )
2088
+ first_part = "In total we have passed #{colourized_n_ECTS_points_were_passed} ECTS "\
2089
+ "points (#{orangered(n_percent.to_s+'%')}) so far in the"
2090
+ second_part = " #{sfancy(@title)}."
2091
+ end
2092
+ [ first_part, second_part ]
2093
+ end
2094
+
2095
+ # ========================================================================= #
2096
+ # === report_how_many_ects_points_have_been_passed_already
2097
+ # ========================================================================= #
2098
+ def report_how_many_ects_points_have_been_passed_already
2099
+ array = return_how_many_ects_points_have_been_passed_already
2100
+ e array.first
2101
+ e
2102
+ e array.last
2103
+ e
2104
+ end
2105
+
2106
+ # ========================================================================= #
2107
+ # === report_how_many_exams_have_been_passed_already
2108
+ #
2109
+ # To invoke this method try:
2110
+ #
2111
+ # emo --agrarwissenschaften
2112
+ #
2113
+ # ========================================================================= #
2114
+ def report_how_many_exams_have_been_passed_already
2115
+ n_lectures_are_in_this_curriculum = n_lectures_in_this_curriculum?
2116
+ opnn; e sfancy(@n_lectures_are_already_solved.to_s)+' lectures have '\
2117
+ 'already been passed out'
2118
+ opnn; e 'of a total '+
2119
+ slateblue(n_lectures_are_in_this_curriculum.to_s)+', in '\
2120
+ 'the curriculum '+simp(title?.to_s)+'.'
2121
+ end
2122
+
2123
+ # ========================================================================= #
2124
+ # === do_not_report_anything
2125
+ # ========================================================================= #
2126
+ def do_not_report_anything
2127
+ @do_report = false
2128
+ end; alias do_not_report do_not_report_anything # === do_not_report
2129
+
2130
+ # ========================================================================= #
2131
+ # === n_lectures_in_this_curriculum?
2132
+ # ========================================================================= #
2133
+ def n_lectures_in_this_curriculum?
2134
+ @dataset.size
2135
+ end
2136
+
2137
+ # ========================================================================= #
2138
+ # === read_in_dataset_from_this_file
2139
+ #
2140
+ # Input to this method should be a String, not an Array.
2141
+ # ========================================================================= #
2142
+ def read_in_dataset_from_this_file(i)
2143
+ @dataset << obtain_sanitized_dataset_from(i)
2144
+ @dataset.flatten!
2145
+ check_for_title_entry_in_the_file(i)
2146
+ end
2147
+
2148
+ # ========================================================================= #
2149
+ # === report_the_average_grade
2150
+ # ========================================================================= #
2151
+ def report_the_average_grade
2152
+ if @do_report
2153
+ average_grade = return_the_average_grade
2154
+ e "The #{gold('average grade')} is: #{sfancy(average_grade)}"
2155
+ e
2156
+ end
2157
+ end
2158
+
2159
+ # ========================================================================= #
2160
+ # === check_for_title_entry_in_the_file
2161
+ #
2162
+ # You can put a line within a curriculum such as:
2163
+ #
2164
+ # @title Biologie Basisblock
2165
+ #
2166
+ # The method will check for this. However had, you can also avoid using
2167
+ # such a title, by having a header section, as a comment, where the
2168
+ # second line should contain the title of the lecture.
2169
+ #
2170
+ # The latter is the default (and recommended) mode.
2171
+ # ========================================================================= #
2172
+ def check_for_title_entry_in_the_file(
2173
+ this_file = dataset?
2174
+ )
2175
+ temporary_dataset = Studium.read_dataset_from_a_curriculum_file(
2176
+ this_file,
2177
+ :retain_comments
2178
+ )
2179
+ # ======================================================================= #
2180
+ # If the second line in the curriculum-file starts with '# === #'
2181
+ #
2182
+ # This is recommended for all registered curricula.
2183
+ # ======================================================================= #
2184
+ if temporary_dataset[1].start_with?('# === ')
2185
+ use_this_title = temporary_dataset[1]
2186
+ set_title(use_this_title)
2187
+ # ======================================================================= #
2188
+ # else check for a @title entry
2189
+ # ======================================================================= #
2190
+ elsif this_file.any? {|line|
2191
+ line.start_with? '@title'
2192
+ }
2193
+ set_title(
2194
+ dataset.select {|line| line.start_with? '@title ' }
2195
+ )
2196
+ # ===================================================================== #
2197
+ # In this case, grab the title, and remove that line.
2198
+ # So, we will reject all entries that include '@title '.
2199
+ # ===================================================================== #
2200
+ dataset.reject! {|line| line.start_with? '@title '}
2201
+ dataset.compact!
2202
+ set_dataset(dataset)
2203
+ end
2204
+ end
2205
+
2206
+ # ========================================================================= #
2207
+ # === no_html_page7
2208
+ # ========================================================================= #
2209
+ def no_html_page
2210
+ @generate_html_file = false
2211
+ end; alias no_html no_html_page # === no_html
2212
+
2213
+ # ========================================================================= #
2214
+ # === show_loaded_from_which_file?
2215
+ # ========================================================================= #
2216
+ def show_loaded_from_which_file?
2217
+ @show_loaded_from_which_file
2218
+ end
2219
+
2220
+ # ========================================================================= #
2221
+ # === report_how_many_ects_points_are_in_this_curriculum
2222
+ # ========================================================================= #
2223
+ def report_how_many_ects_points_are_in_this_curriculum
2224
+ if @do_report
2225
+ e return_how_many_ects_points_this_curriculum_has_in_total
2226
+ e
2227
+ end
2228
+ end
2229
+
2230
+ # ========================================================================= #
2231
+ # === do_show_all_URLs
2232
+ # ========================================================================= #
2233
+ def do_show_all_URLs
2234
+ @show_all_URLs = true
2235
+ end
2236
+
2237
+ # ========================================================================= #
2238
+ # === report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
2239
+ # ========================================================================= #
2240
+ def report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
2241
+ array = return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
2242
+ if @do_report
2243
+ e
2244
+ e array[0]
2245
+ e array[1]
2246
+ e
2247
+ end
2248
+ end
2249
+
2250
+ # ========================================================================= #
2251
+ # === lecture_dataset?
2252
+ # ========================================================================= #
2253
+ def lecture_dataset?
2254
+ @lecture_dataset
2255
+ end; alias main_dataset? lecture_dataset? # === main_dataset?
2256
+
2257
+ # ========================================================================= #
2258
+ # === n_lectures_are_already_solved?
2259
+ # ========================================================================= #
2260
+ def n_lectures_are_already_solved?
2261
+ @n_lectures_are_already_solved
2262
+ end; alias n_lectures_completed? n_lectures_are_already_solved? # === n_lectures_completed?
2263
+
2264
+ # ========================================================================= #
2265
+ # === n_total_lectures?
2266
+ # ========================================================================= #
2267
+ def n_total_lectures?
2268
+ @dataset.size
2269
+ end
2270
+
2271
+ # ========================================================================= #
2272
+ # === is_this_lecture_a_practical_course?
2273
+ # ========================================================================= #
2274
+ def is_this_lecture_a_practical_course?(lecture_type)
2275
+ ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT.include? lecture_type
2276
+ end
2277
+
2278
+ # ========================================================================= #
2279
+ # === type_of_the_curriculum?
2280
+ # ========================================================================= #
2281
+ def type_of_the_curriculum?
2282
+ @type_of_the_curriculum
2283
+ end; alias curriculum_type? type_of_the_curriculum? # === curriculum_type?
2284
+
2285
+ # ========================================================================= #
2286
+ # === exclude_title_entries_from_the_main_dataset
2287
+ # ========================================================================= #
2288
+ def exclude_title_entries_from_the_main_dataset
2289
+ @dataset.reject! {|line| line.start_with? '@title ' }
2290
+ end
2291
+
2292
+ # ========================================================================= #
2293
+ # === n_ects_were_passed_in_this_curriculum?
2294
+ # ========================================================================= #
2295
+ def n_ects_were_passed_in_this_curriculum?
2296
+ @n_ects_were_passed_so_far
2297
+ end; alias n_ects_were_passed_in_this_curriculum n_ects_were_passed_in_this_curriculum? # === n_ects_were_passed_in_this_curriculum
2298
+ alias n_ects_were_passed_so_far n_ects_were_passed_in_this_curriculum? # === n_ects_were_passed_so_far
2299
+
2300
+ # ========================================================================= #
2301
+ # === n_ects_points_in_total?
2302
+ # ========================================================================= #
2303
+ def n_ects_points_in_total?
2304
+ @this_curriculum_has_n_ects_points_in_total
2305
+ end; alias total_ects_points? n_ects_points_in_total? # === total_ects_points?
2306
+
2307
+ # ========================================================================= #
2308
+ # === prepend_this_to_dataset
2309
+ #
2310
+ # An Array can be given to this method. If a symbol is given, such as
2311
+ # :bachelor_lbt, then that symbol will be treated in a special way as
2312
+ # far as this method is concerned.
2313
+ # ========================================================================= #
2314
+ def prepend_this_to_dataset(
2315
+ i = :bachelor_biologie_basisblock_curriculum
2316
+ )
2317
+ original_input = i.dup
2318
+ if i.is_a? Symbol
2319
+ # ===================================================================== #
2320
+ # Here we will handle input such as :bachelor_lbt.
2321
+ # ===================================================================== #
2322
+ i = return_curriculum_file_based_on_this_input(i)
2323
+ end
2324
+ if i.is_a? Array
2325
+ i.flatten.each {|entry| prepend_this_to_dataset(entry) }
2326
+ else
2327
+ if i.nil?
2328
+ e 'A nil value was encountered, onto the method called '+
2329
+ steelblue('prepend_this_dataset()')+'.'
2330
+ e 'The original input was: '+
2331
+ royalblue(original_input.to_s)
2332
+ elsif File.exist? i # Read in existing files.
2333
+ array = obtain_sanitized_dataset_from(i)
2334
+ @dataset = array+@dataset
2335
+ @dataset.flatten!
2336
+ exclude_title_entries_from_the_main_dataset
2337
+ # ===================================================================== #
2338
+ # The next check is for ad-hoc addition of lectures, such as via:
2339
+ # ['892100 Physik (KTWW+HNT)']
2340
+ # ===================================================================== #
2341
+ elsif is_this_a_registered_lecture? i
2342
+ @dataset << i
2343
+ else
2344
+ opnn; e "No file exists at #{sfile(i)}."
2345
+ end
2346
+ end
2347
+ end
2348
+
2349
+ # ========================================================================= #
2350
+ # === add_to_the_dataset_without_any_further_checks
2351
+ # ========================================================================= #
2352
+ def add_to_the_dataset_without_any_further_checks(i)
2353
+ @dataset << i
2354
+ @dataset.flatten!
2355
+ end
2356
+
2357
+ # ========================================================================= #
2358
+ # === obtain_sanitized_dataset_from
2359
+ #
2360
+ # This method combines two other methods - loading the dataset that
2361
+ # belongs to a Curriculum; and sorting that dataset.
2362
+ # ========================================================================= #
2363
+ def obtain_sanitized_dataset_from(i)
2364
+ # ======================================================================= #
2365
+ # Keep in mind that the following method also allows for optional
2366
+ # arguments such as :remove_comments_and_title
2367
+ #
2368
+ # We do not need to do this for this file, though, as this file may
2369
+ # probably make use of all the information it can get.
2370
+ # ======================================================================= #
2371
+ dataset = Studium.read_dataset_from_a_curriculum_file(i).map(&:chomp)
2372
+ # ======================================================================= #
2373
+ # Next, we must check for duplicate entries. For now we will work on
2374
+ # the dataset obtained above ^^^ but if we need a more accurate
2375
+ # approach, we should work on the name + LVA-ID of the lecture at
2376
+ # hand instead.
2377
+ # ======================================================================= #
2378
+ unless dataset == dataset.uniq
2379
+ e 'We have found at the least one duplicate entry. This will be '\
2380
+ 'shown next:'
2381
+ e
2382
+ these_are_the_duplicates = {}
2383
+ these_are_the_duplicates.default = 0
2384
+ dataset.each {|this_entry|
2385
+ these_are_the_duplicates[this_entry] += 1
2386
+ }
2387
+ these_are_the_duplicates.select {|key, value| value > 1 }.each {|duplicate, n_times|
2388
+ e sfancy(" #{duplicate}")
2389
+ }
2390
+ e
2391
+ e 'Please correct these entries before we can continue.'
2392
+ exit
2393
+ end
2394
+ sort_dataset(dataset) if @shall_we_sort_the_dataset
2395
+ end
2396
+
2397
+ # ========================================================================= #
2398
+ # === clear_old_dataset
2399
+ # ========================================================================= #
2400
+ def clear_old_dataset
2401
+ @dataset = []
2402
+ end
2403
+
2404
+ # ========================================================================= #
2405
+ # === do_not_show_the_next_exams
2406
+ #
2407
+ # Use this method if you do NOT want to show the next exams.
2408
+ # ========================================================================= #
2409
+ def do_not_show_the_next_exams
2410
+ @show_next_exams = false
2411
+ end
2412
+
2413
+ # ========================================================================= #
2414
+ # === do_not_show_loaded_from_which_file
2415
+ # ========================================================================= #
2416
+ def do_not_show_loaded_from_which_file
2417
+ @show_loaded_from_which_file = false
2418
+ end
2419
+
2420
+ # ========================================================================= #
2421
+ # === return_proper_logo_for_this_university
2422
+ # ========================================================================= #
2423
+ def return_proper_logo_for_this_university(
2424
+ i
2425
+ )
2426
+ Studium.return_proper_university_image(i)
2427
+ end
2428
+
2429
+ # ========================================================================= #
2430
+ # === is_this_a_registered_lecture?
2431
+ # ========================================================================= #
2432
+ def is_this_a_registered_lecture?(i)
2433
+ @lecture_dataset.has_key?(i.strip)
2434
+ end
2435
+
2436
+ # ========================================================================= #
2437
+ # === individual_curriculum?
2438
+ # ========================================================================= #
2439
+ def individual_curriculum?
2440
+ @individual_curriculum
2441
+ end; alias is_it_an_individual_curriculum? individual_curriculum? # === is_it_an_individual_curriculum?
2442
+
2443
+ # ========================================================================= #
2444
+ # === is_not_an_individual_curriculum
2445
+ # ========================================================================= #
2446
+ def is_not_an_individual_curriculum
2447
+ @individual_curriculum = false
2448
+ end
2449
+
2450
+ # ========================================================================= #
2451
+ # === is_an_individual_curriculum
2452
+ # ========================================================================= #
2453
+ def is_an_individual_curriculum
2454
+ @individual_curriculum = true
2455
+ end
2456
+
2457
+ # ========================================================================= #
2458
+ # === title?
2459
+ # ========================================================================= #
2460
+ def title?
2461
+ @title
2462
+ end; alias return_name_of_the_curriculum title? # === return_name_of_the_curriculum
2463
+ alias name_of_the_curriculum title? # === name_of_the_curriculum
2464
+ alias name_of_the_curriculum? title? # === name_of_the_curriculum?
2465
+
2466
+ # ========================================================================= #
2467
+ # === uniq_the_dataset
2468
+ #
2469
+ # This ad-hoc method will simply eliminate all the duplicates that
2470
+ # may exist in the main dataset at hand. It is only called from
2471
+ # within menu() right now (December 2019).
2472
+ # ========================================================================= #
2473
+ def uniq_the_dataset
2474
+ @dataset.uniq!
2475
+ end
2476
+
2477
+ # ========================================================================= #
2478
+ # === sanitize_the_dataset
2479
+ # ========================================================================= #
2480
+ def sanitize_the_dataset
2481
+ @dataset.map! {|entry|
2482
+ entry = entry.dup if entry.frozen?
2483
+ entry.squeeze!(' ')
2484
+ if entry.include? '#'
2485
+ entry = entry[0 .. (entry.index('#')-1)]
2486
+ end
2487
+ entry.strip!
2488
+ entry
2489
+ }
2490
+ end
2491
+
2492
+ # ========================================================================= #
2493
+ # === sort_dataset
2494
+ #
2495
+ # This method will sort the dataset, according to the name of the
2496
+ # lecture rather than the leading ID number.
2497
+ # ========================================================================= #
2498
+ def sort_dataset(
2499
+ i = @dataset
2500
+ )
2501
+ i.sort_by! {|line|
2502
+ # ===================================================================== #
2503
+ # The next line will split on ' ' tokens, take all but the first
2504
+ # entry, rejoin, strip and delete '(' tokens. So essentially we
2505
+ # will strip away the leading numbers from the line at hand.
2506
+ # ===================================================================== #
2507
+ line.split(' ')[1 .. -1].join(' ').strip
2508
+ }
2509
+ end
2510
+
2511
+ # ========================================================================= #
2512
+ # === starts_with_a_lecture_id_entry?
2513
+ # ========================================================================= #
2514
+ def starts_with_a_lecture_id_entry?(i)
2515
+ result = false
2516
+ if i.include? ' '
2517
+ splitted = i.split(' ')
2518
+ first_entry = splitted.first
2519
+ # ===================================================================== #
2520
+ # See: https://rubular.com/r/EKEk3QuWRQ1s
2521
+ # ===================================================================== #
2522
+ if first_entry =~ /^\d+\.?[A-Z]*\d{1,4}$/
2523
+ result = true
2524
+ end
2525
+ end
2526
+ result
2527
+ end
2528
+
2529
+ # ========================================================================= #
2530
+ # === return_bachelor_or_master_logo
2531
+ #
2532
+ # Here we differ between bachelor-logo and the master-logo.
2533
+ #
2534
+ # By default, we will operate on @type_of_the_curriculum, but
2535
+ # this can be wrong in a mixed bachelor-master curriculum.
2536
+ # ========================================================================= #
2537
+ def return_bachelor_or_master_logo(
2538
+ this_lecture = nil
2539
+ )
2540
+ if this_lecture.nil?
2541
+ case @type_of_the_curriculum
2542
+ when :bachelor
2543
+ BACHELOR_IMAGE
2544
+ when :master
2545
+ MASTER_IMAGE
2546
+ end
2547
+ else
2548
+ # ===================================================================== #
2549
+ # Else assume an Array was given.
2550
+ # ===================================================================== #
2551
+ if this_lecture.any? {|entry| entry.start_with?('033') }
2552
+ BACHELOR_IMAGE
2553
+ else
2554
+ MASTER_IMAGE
2555
+ end
2556
+ end
2557
+ end
2558
+
2559
+ # ========================================================================= #
2560
+ # === report_title
2561
+ #
2562
+ # Use this method to report the title of the Curriculum at hand.
2563
+ # ========================================================================= #
2564
+ def report_title(
2565
+ this_title = @title
2566
+ )
2567
+ if this_title
2568
+ e; e springgreen(this_title); e
2569
+ else
2570
+ opnn; e 'No title was set via @title. This is '\
2571
+ 'currently disallowed, so we exit now.'
2572
+ opnn; e "The file to read from was `"\
2573
+ "#{sfancy(@read_from_this_file)}`."
2574
+ exit
2575
+ end
2576
+ end; alias display_the_name_of_the_curriculum report_title # === display_the_name_of_the_curriculum
2577
+
2578
+ # ========================================================================= #
2579
+ # === set_title
2580
+ #
2581
+ # The title of the Curriculum in question. Should be hardcoded
2582
+ # in the file.
2583
+ # ========================================================================= #
2584
+ def set_title(i)
2585
+ i = i.first if i.is_a? Array
2586
+ i = i.dup.delete(N) # Want to work on a String really.
2587
+ if i.start_with? '# ==='
2588
+ i.sub!(/^# === /,'')
2589
+ end
2590
+ i.sub!(/^@title /,'') if i.include? '@title '
2591
+ @title = i.strip.chomp
2592
+ end; alias set_title_of_the_curriculum set_title # === set_title_of_the_curriculum
2593
+
2594
+ # ========================================================================= #
2595
+ # === no_html_and_do_not_report_anything
2596
+ # ========================================================================= #
2597
+ def no_html_and_do_not_report_anything
2598
+ no_html
2599
+ do_not_report_anything
2600
+ end
2601
+
2602
+ # ========================================================================= #
2603
+ # === ja_oder_nein
2604
+ #
2605
+ # Input "true" will become "Ja" and input "false" will become "Nein".
2606
+ # ========================================================================= #
2607
+ def ja_oder_nein(
2608
+ i = 'nein'
2609
+ )
2610
+ Studium.ja_oder_nein(i)
2611
+ end
2612
+
2613
+ # ========================================================================= #
2614
+ # === opnn
2615
+ # ========================================================================= #
2616
+ def opnn(i = namespace?)
2617
+ if block_given?
2618
+ super(i) { yield }
2619
+ else
2620
+ super(i)
2621
+ end
2622
+ end
2623
+
2624
+ # ========================================================================= #
2625
+ # === return_the_average_grade
2626
+ #
2627
+ # This method will return the average grade. So for example, if we have
2628
+ # passed three exams, with a grade of 2, 3 and 4, respectively, then
2629
+ # the average grade will be 2 + 3 + 4 = 9 / 3 → 3.
2630
+ # ========================================================================= #
2631
+ def return_the_average_grade
2632
+ # ======================================================================= #
2633
+ # We must work on a copy, because some grades, such as '+', are not
2634
+ # useful for calculating the average grade - hence we will have to
2635
+ # weed these entries out, for the purpose of calculating the
2636
+ # average grade through this method here.
2637
+ # ======================================================================= #
2638
+ array_storing_the_grades = @array_storing_the_grades.dup
2639
+ array_storing_the_grades.reject! {|grade|
2640
+ grade == '+' or grade == 'E' # Remove '+' and 'E' exam results.
2641
+ }
2642
+ average_grade = (
2643
+ array_storing_the_grades.sum.to_f / array_storing_the_grades.size
2644
+ ).round(2)
2645
+ return average_grade
2646
+ end
2647
+
2648
+ # ========================================================================= #
2649
+ # === report_the_university_attribution
2650
+ #
2651
+ # This method will report the university-attribution of that curriculum.
2652
+ # ========================================================================= #
2653
+ def report_the_university_attribution
2654
+ require 'studium/toplevel_methods/report.rb'
2655
+ # ======================================================================= #
2656
+ # We must build up our main Hash next. That Hash should look e. g.
2657
+ # like this:
2658
+ #
2659
+ # {
2660
+ # "TU Wien"=>115.5,
2661
+ # "Uni Wien"=>30.0,
2662
+ # "BOKU Wien"=>26.0,
2663
+ # "Vetmed Wien"=>8.5
2664
+ # }
2665
+ #
2666
+ # ======================================================================= #
2667
+ sanitize_the_dataset
2668
+ hash = {}
2669
+ @dataset.each {|entry|
2670
+ pointer = @lecture_dataset[entry]
2671
+ if pointer
2672
+ n_ects = pointer[:ects]
2673
+ this_university = pointer[:university]
2674
+ if hash.has_key? this_university
2675
+ hash[this_university] += n_ects
2676
+ else
2677
+ hash[this_university] = n_ects
2678
+ end
2679
+ else
2680
+ e steelblue('No entry found for ')+
2681
+ royalblue(entry.to_s)
2682
+ end
2683
+ }
2684
+ Studium.report_n_ects_per_university(hash, n_ects_points_in_total?)
2685
+ end
2686
+
2687
+ # ========================================================================= #
2688
+ # === reset
2689
+ # ========================================================================= #
2690
+ def reset
2691
+ super()
2692
+ is_bachelor_curriculum # ← This is just to set a default.
2693
+ infer_the_namespace
2694
+ # ======================================================================= #
2695
+ # === @lecture_dataset
2696
+ #
2697
+ # This variable keeps track of all registered lectures at the
2698
+ # universities.
2699
+ # ======================================================================= #
2700
+ @lecture_dataset = return_dataset_from_the_file_lecture_information
2701
+ # ======================================================================= #
2702
+ # === @this_curriculum_has_n_ects_points_in_total
2703
+ # ======================================================================= #
2704
+ @this_curriculum_has_n_ects_points_in_total = 0
2705
+ # ======================================================================= #
2706
+ # === @n_ects_were_passed_so_far
2707
+ # ======================================================================= #
2708
+ @n_ects_were_passed_so_far = 0
2709
+ # ======================================================================= #
2710
+ # === @shall_we_sort_the_dataset
2711
+ # ======================================================================= #
2712
+ @shall_we_sort_the_dataset = true # ← Whether to sort the dataset or not.
2713
+ # ======================================================================= #
2714
+ # === @dataset
2715
+ # ======================================================================= #
2716
+ @dataset = []
2717
+ # ======================================================================= #
2718
+ # === @title
2719
+ #
2720
+ # Which title to use for this curriculum.
2721
+ # ======================================================================= #
2722
+ @title = nil
2723
+ # ======================================================================= #
2724
+ # === @hash_containing_the_lectures_for_this_curriculum
2725
+ #
2726
+ # The following hash will contain the lectures that are used for
2727
+ # the curriculum. Specifically it will be used to autogenerate the
2728
+ # .html file.
2729
+ # ======================================================================= #
2730
+ @hash_containing_the_lectures_for_this_curriculum = {}
2731
+ # ======================================================================= #
2732
+ # === @individual_curriculum
2733
+ #
2734
+ # The following variable determines whether this lecture is an
2735
+ # individual curriculum or whether it is not.
2736
+ # ======================================================================= #
2737
+ @individual_curriculum = false
2738
+ # ======================================================================= #
2739
+ # === @show_next_exams
2740
+ # ======================================================================= #
2741
+ @show_next_exams = true
2742
+ # ======================================================================= #
2743
+ # === @n_lectures_are_already_solved
2744
+ # ======================================================================= #
2745
+ @n_lectures_are_already_solved = 0
2746
+ # ======================================================================= #
2747
+ # Next, determine from which files we will read.
2748
+ # ======================================================================= #
2749
+ determine_from_which_files_to_read
2750
+ # ======================================================================= #
2751
+ # === @array_storing_the_grades
2752
+ # ======================================================================= #
2753
+ @array_storing_the_grades = []
2754
+ # ======================================================================= #
2755
+ # === @generate_html_file
2756
+ #
2757
+ # If the following variable is true then this class will additionally
2758
+ # generate a .html file.
2759
+ # ======================================================================= #
2760
+ @generate_html_file = true
2761
+ # ======================================================================= #
2762
+ # === @mode
2763
+ #
2764
+ # The @mode can be :commandline or :www.
2765
+ # ======================================================================= #
2766
+ @mode = :commandline
2767
+ # ======================================================================= #
2768
+ # === @show_loaded_from_which_file
2769
+ # ======================================================================= #
2770
+ @show_loaded_from_which_file = true
2771
+ # ======================================================================= #
2772
+ # === @do_report
2773
+ # ======================================================================= #
2774
+ @do_report = true
2775
+ # ======================================================================= #
2776
+ # === @show_all_URLs
2777
+ # ======================================================================= #
2778
+ @show_all_URLs = false
2779
+ # ======================================================================= #
2780
+ # === @html_string
2781
+ # ======================================================================= #
2782
+ @html_string = nil
2783
+ # ======================================================================= #
2784
+ # === @show_to_which_universities_the_lectures_belong_to
2785
+ #
2786
+ # By default we will not show to which university the given lectures
2787
+ # belong to.
2788
+ # ======================================================================= #
2789
+ @show_to_which_universities_the_lectures_belong_to = false
2790
+ # ======================================================================= #
2791
+ # === @append_this_string_onto_the_html_string
2792
+ #
2793
+ # The following instance variable can be used to append more onto
2794
+ # the main HTML string.
2795
+ # ======================================================================= #
2796
+ @append_this_string_onto_the_html_string = ''.dup
2797
+ # ======================================================================= #
2798
+ # === @ignore_outdated_lectures
2799
+ # ======================================================================= #
2800
+ @ignore_outdated_lectures = false
2801
+ end
2802
+
2803
+ # ========================================================================= #
2804
+ # === do_all_actions_after_the_main_dataset_was_read_in
2805
+ # ========================================================================= #
2806
+ def do_all_actions_after_the_main_dataset_was_read_in
2807
+ iterate_over_the_lectures
2808
+ consider_showing_to_which_universities_the_lectures_belong_to
2809
+ # ======================================================================= #
2810
+ # The next method will output something like:
2811
+ # "A total of 52 lectures are part of this Curriculum."
2812
+ # ======================================================================= #
2813
+ if commandline?
2814
+ report_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
2815
+ report_how_many_ects_points_have_been_passed_already
2816
+ report_how_many_ects_points_are_in_this_curriculum
2817
+ report_the_average_grade
2818
+ report_the_university_attribution
2819
+ end
2820
+ consider_generating_a_html_file
2821
+ end
2822
+
2823
+ # ========================================================================= #
2824
+ # === run (run tag)
2825
+ #
2826
+ # The menu() method has to come before any other methods here.
2827
+ # ========================================================================= #
2828
+ def run
2829
+ menu # First, pass the commandline into the menu-method.
2830
+ read_in_main_dataset_from_the_existing_files
2831
+ if commandline?
2832
+ try_to_rename_kde_konsole_tab
2833
+ report_title
2834
+ end
2835
+ do_all_actions_after_the_main_dataset_was_read_in # Continue here.
2836
+ end
2837
+
2838
+ # ========================================================================= #
2839
+ # === show_important_files
2840
+ #
2841
+ # This method will show the file that has all lectures registered.
2842
+ #
2843
+ # Usage example:
2844
+ #
2845
+ # curriculum --files?
2846
+ #
2847
+ # ========================================================================= #
2848
+ def show_important_files(
2849
+ use_this_file = Studium.file_lecture_information
2850
+ )
2851
+ e "The following file is the most important file by far:"
2852
+ e
2853
+ e " #{sfile(use_this_file)}"
2854
+ e
2855
+ end
2856
+
2857
+ # ========================================================================= #
2858
+ # === show_available_curricula
2859
+ #
2860
+ # This method will show the available Curricula.
2861
+ #
2862
+ # Invocation example:
2863
+ #
2864
+ # studium_solved --show-available
2865
+ #
2866
+ # ========================================================================= #
2867
+ def show_available_curricula
2868
+ e 'These curricula are available:'
2869
+ e
2870
+ Studium.return_array_location_of_all_registered_curricula.each {|entry|
2871
+ if entry.is_a? Array
2872
+ entry.each {|inner_entry|
2873
+ e " #{sfancy(File.basename(inner_entry).sub(/\.yml$/,''))}"
2874
+ }
2875
+ else
2876
+ e " #{sfancy(File.basename(entry).sub(/\.yml$/,'').strip)}"
2877
+ end
2878
+ }; e
2879
+ end
2880
+
2881
+ # ========================================================================= #
2882
+ # === do_show_lecture_attribution_to_universities
2883
+ # ========================================================================= #
2884
+ def do_show_lecture_attribution_to_universities
2885
+ @show_to_which_universities_the_lectures_belong_to = true
2886
+ end
2887
+
2888
+ # ========================================================================= #
2889
+ # === consider_showing_to_which_universities_the_lectures_belong_to
2890
+ #
2891
+ # We should only show as to which university a particular lecture
2892
+ # belongs to if it is an individual curriculum. Other curricula
2893
+ # all belong to one particular university, so showing the "table"
2894
+ # on the commandline is useless.
2895
+ # ========================================================================= #
2896
+ def consider_showing_to_which_universities_the_lectures_belong_to
2897
+ if @show_to_which_universities_the_lectures_belong_to
2898
+ first_argument = @commandline_arguments
2899
+ if first_argument.is_a? Array
2900
+ first_argument = first_argument.first
2901
+ end
2902
+ first_argument = first_argument.to_s.delete('-')
2903
+ if cmdline?
2904
+ e
2905
+ e 'The percentage-value of lectures attributed to '\
2906
+ 'the different'
2907
+ e 'universities will be shown next:'
2908
+ end
2909
+ _ = Studium::LecturesAttributedToUniversities.new(first_argument) {
2910
+ :do_not_show_the_title_and_do_not_report
2911
+ }
2912
+ splitted_html_string = _.html_string.split("\n")
2913
+ # ===================================================================== #
2914
+ # Also embed this into a little <div> container next:
2915
+ # ===================================================================== #
2916
+ @append_this_string_onto_the_html_string <<
2917
+ '<div style="padding: 0.70em; background-color: black; '\
2918
+ 'font-size: 1.0em; font-family: monospace;">'
2919
+ splitted_html_string.each {|line|
2920
+ @append_this_string_onto_the_html_string << "<b>#{line.strip}</b><br>#{N}"
2921
+ }
2922
+ @append_this_string_onto_the_html_string << '</div>'
2923
+ # ===================================================================== #
2924
+ # And now we can report our findings, if we are on the commandline.
2925
+ # ===================================================================== #
2926
+ _.report if cmdline?
2927
+ end
2928
+ end
2929
+
2930
+ # ========================================================================= #
2931
+ # === iterate_over_the_lectures (iterate tag)
2932
+ # ========================================================================= #
2933
+ def iterate_over_the_lectures(
2934
+ i = @dataset
2935
+ )
2936
+ i.each_with_index {|line, index| index += 1
2937
+ result = ''.dup # This is the line that will be reported to the user.
2938
+ # ===================================================================== #
2939
+ # Since as of January 2018 the dataset has already been sanitized a
2940
+ # bit before coming to this method, so there will no longer be any
2941
+ # '#' characters. In the past, the variable line would look like
2942
+ # this:
2943
+ #
2944
+ # "754117 Mikrobiologie - Übungen (AW) # 2.0 ECTS, UE\n"
2945
+ #
2946
+ # That is why the next line still checks for this.
2947
+ # ===================================================================== #
2948
+ if line and line.include?('#')
2949
+ raw_line = line[0 .. (line.index('#') - 1)] # ← raw_line is like: "754117 Mikrobiologie - Übungen (AW)"
2950
+ # ===================================================================== #
2951
+ # The next code checks for a leading LVA-id entry, but it must also
2952
+ # keep in mind that ID entries may be like this: "185.A47"
2953
+ # ===================================================================== #
2954
+ # elsif starts_with_a_lecture_id_entry?(line)
2955
+ # raw_line = line.split(' ')[1 .. -1].join(' ').strip.dup
2956
+ else
2957
+ raw_line = line.dup
2958
+ end
2959
+ raw_line.strip! # ← Added this in December 2019.
2960
+ raw_line.squeeze!(' ') # ← Added this as of March 2018.
2961
+ # ===================================================================== #
2962
+ # Obtain the remote URL. Since as of 20.02.2018, this requires that
2963
+ # the beautiful_url project also deals with leading numbers, so all
2964
+ # entries must have that too, as an additional qualifier.
2965
+ #
2966
+ # On November 2019 support for BeautifulUrl was removed, and
2967
+ # replaced with Studium.return_remote_url_of_this_lecture()
2968
+ # instead.
2969
+ # ===================================================================== #
2970
+ remote_url = Studium.return_remote_url_of_this_lecture(raw_line)
2971
+ if remote_url == raw_line
2972
+ e crimson("No registered remote homepage for #{raw_line}.")
2973
+ end
2974
+ splitted = raw_line.split(' ')
2975
+ lecture_id = splitted.first # ← Obtain the lecture id.
2976
+ name_of_the_lecture = splitted[1..-1].join(' ')
2977
+ padded_index = ('('+index.to_s+')').rjust(5)
2978
+ colourized_index = slategray(padded_index)
2979
+ # ===================================================================== #
2980
+ # Create a colourized string for the remote URL next.
2981
+ # ===================================================================== #
2982
+ colourized_remote_url = N+dodgerblue(' → ')+
2983
+ dodgerblue(remote_url)+
2984
+ dodgerblue(' ☚')
2985
+ pointer_to_the_lecture = @lecture_dataset[raw_line]
2986
+ if pointer_to_the_lecture and
2987
+ pointer_to_the_lecture.has_key?(:already_solved)
2988
+ already_solved = pointer_to_the_lecture[:already_solved]
2989
+ else
2990
+ opnn; e "#{swarn('Problem with `')}#{sfancy(raw_line)}#{swarn('`:')}"
2991
+ opnn; e swarn('no registered key called :already_solved was found')
2992
+ # =================================================================== #
2993
+ # Also inform the user whether this lecture is registered at all.
2994
+ # If not, notify the user about this.
2995
+ # =================================================================== #
2996
+ unless main_dataset?.has_key? raw_line
2997
+ opne swarn('The lecture ')+
2998
+ sfancy(raw_line)+swarn(' has not yet been')
2999
+ opne swarn('registered in the file `')+
3000
+ sfancy('lecture_information.yml')+
3001
+ swarn('`.')
3002
+ end
3003
+ pp pointer_to_the_lecture
3004
+ already_solved = false
3005
+ end
3006
+ if pointer_to_the_lecture.nil?
3007
+ opnn; e "Skipping this lecture (#{sfancy(raw_line)})"
3008
+ opnn; e 'as it is not registered or otherwise missing.'
3009
+ next
3010
+ end
3011
+ # ===================================================================== #
3012
+ # Deconstruct the content of our hash-"pointer" next.
3013
+ # ===================================================================== #
3014
+ n_ects_points = pointer_to_the_lecture[:ects]
3015
+ @this_curriculum_has_n_ects_points_in_total += n_ects_points
3016
+ padded_name_of_the_lecture = name_of_the_lecture.ljust(76)
3017
+ padded_n_ects_points = n_ects_points.to_s.rjust(5)
3018
+ colourized_n_ects_points = steelblue(padded_n_ects_points)
3019
+ expanded_ja_oder_nein = ja_oder_nein(already_solved)
3020
+ case expanded_ja_oder_nein
3021
+ when 'Ja'
3022
+ colourized_ja_oder_nein = lightgreen(expanded_ja_oder_nein.rjust(4))
3023
+ when 'Nein' # Lectures that were not yet passed, will be highlighted in red.
3024
+ colourized_ja_oder_nein = crimson(expanded_ja_oder_nein.rjust(4))
3025
+ end
3026
+ fancified_already_solved = 'Bereits absolviert? '+colourized_ja_oder_nein+'. '
3027
+ result << colourized_index+' '+
3028
+ sfancy(padded_name_of_the_lecture)+' '+
3029
+ fancified_already_solved+
3030
+ '('+mediumseagreen('LVA Nummer: ')+
3031
+ sfancy(lecture_id.rjust(7))
3032
+ grade = nil
3033
+ if already_solved
3034
+ # =================================================================== #
3035
+ # Obtain the grade of this lecture.
3036
+ # =================================================================== #
3037
+ if pointer_to_the_lecture.has_key? :grade
3038
+ grade = pointer_to_the_lecture[:grade]
3039
+ # ================================================================= #
3040
+ # We must keep in mind that the grade can also be a '+' character.
3041
+ # We can not calculate the average number from entries that are
3042
+ # '+' Strings, so we will ignore these entries - but we will
3043
+ # do so not here but lateron, when we calculate the average grade.
3044
+ # ================================================================= #
3045
+ @array_storing_the_grades << grade
3046
+ end
3047
+ @n_lectures_are_already_solved += 1
3048
+ @n_ects_were_passed_so_far += n_ects_points
3049
+ # =================================================================== #
3050
+ # If the lecture was already solved then we will not show
3051
+ # the remote URL.
3052
+ # =================================================================== #
3053
+ colourized_remote_url = ''
3054
+ end
3055
+ result << ', '+mediumseagreen('n ECTS: ')+colourized_n_ects_points
3056
+ if grade
3057
+ result << ', '+mediumseagreen('Grade: '+grade.to_s)
3058
+ end
3059
+ unless ALSO_SHOW_URL
3060
+ colourized_remote_url = ''
3061
+ end
3062
+ if @do_report and cmdline? # We only report this on the commandline.
3063
+ result << ') '+colourized_remote_url
3064
+ e result
3065
+ end
3066
+ }
3067
+ if @this_curriculum_has_n_ects_points_in_total >= 270.0
3068
+ # ===================================================================== #
3069
+ # This check is to avoid checking for combined bachelor-master
3070
+ # individual curricula, as we can not show a correct module
3071
+ # chain in this case really - or at the least not without
3072
+ # additional code (23.12.2019).
3073
+ # ===================================================================== #
3074
+ else
3075
+ if is_it_an_individual_curriculum? and is_on_roebe?
3076
+ opnn; e 'Trying to generate an image displaying '\
3077
+ 'the '+steelblue('modules')+' next.'
3078
+ consider_generating_a_graphviz_image_displaying_the_modules(
3079
+ i
3080
+ )
3081
+ opnn; e 'Trying to generate a '+steelblue('spreadsheet')+' next.'
3082
+ consider_generating_a_spreadsheet
3083
+ end
3084
+ end
3085
+ end; alias do_the_main_iteration iterate_over_the_lectures # === do_the_main_iteration
3086
+
3087
+ # ========================================================================= #
3088
+ # === return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved
3089
+ #
3090
+ # This method will return an Array with two members. The reason for this
3091
+ # is that it is easier on the commandline to output two Arrays; and to
3092
+ # also use this when we autogenerate a .html file.
3093
+ # ========================================================================= #
3094
+ def return_how_many_lectures_are_in_this_curriculum_and_how_many_of_them_are_already_solved(
3095
+ optional_use_colours = true
3096
+ )
3097
+ n_percent = (
3098
+ (@n_lectures_are_already_solved.to_i * 100) / @dataset.size.to_f
3099
+ ).round(1)
3100
+ case optional_use_colours # Use colours in this case.
3101
+ # ======================================================================= #
3102
+ # === :use_for_html
3103
+ # ======================================================================= #
3104
+ when :use_for_html # (html tag, www tag)
3105
+ colourized_n_percent_finished = ' (<b>'+n_percent.to_s+'% finished'+'</b>)'
3106
+ first_part = "A total of <b>#{@dataset.size.to_s}</b> lectures are part of this Curriculum."
3107
+ second_part = "<b>#{@n_lectures_are_already_solved.to_s}</b> of these "\
3108
+ "are already solved.#{colourized_n_percent_finished}"
3109
+ # ======================================================================= #
3110
+ # === :no_colours
3111
+ # ======================================================================= #
3112
+ when :no_colours, false
3113
+ colourized_n_percent_finished = ' ('+n_percent.to_s+'% finished'+')'
3114
+ first_part = "A total of #{@dataset.size.to_s} lectures are part of this Curriculum."
3115
+ second_part = "#{@n_lectures_are_already_solved.to_s} of these "\
3116
+ "are already solved.#{colourized_n_percent_finished}"
3117
+ else # This here is the default clause.
3118
+ colourized_n_percent_finished = ' ('+orangered(n_percent.to_s+'% finished')+')'
3119
+ first_part = "A total of #{springgreen(@dataset.size.to_s)} "\
3120
+ "lectures are part of this Curriculum."
3121
+ second_part = "#{springgreen(@n_lectures_are_already_solved.to_s)} of these "\
3122
+ "are already solved.#{colourized_n_percent_finished}"
3123
+ end
3124
+ [ first_part, second_part ]
3125
+ end
3126
+
3127
+ # ========================================================================= #
3128
+ # === do_ignore_outdated_lectures
3129
+ # ========================================================================= #
3130
+ def do_ignore_outdated_lectures
3131
+ @ignore_outdated_lectures = true
3132
+ end
3133
+
3134
+ # ========================================================================= #
3135
+ # === ignore_outdated_lectures?
3136
+ # ========================================================================= #
3137
+ def ignore_outdated_lectures?
3138
+ @ignore_outdated_lectures
3139
+ end
3140
+
3141
+ # ========================================================================= #
3142
+ # === Studium::ShowLecturesOnTheCommandline[]
3143
+ # ========================================================================= #
3144
+ def self.[](commandline_arguments = ARGV, run_already = true)
3145
+ new(commandline_arguments, run_already)
3146
+ end
3147
+
3148
+ end; end
3149
+
3150
+ if __FILE__ == $PROGRAM_NAME
3151
+ Studium::ShowLecturesOnTheCommandline.new(ARGV)
3152
+ end # show_lectures_on_the_commandline
3153
+ # show_lectures_on_the_commandline individuell
3154
+ # show_lectures_on_the_commandline bachelor_biologie
3155
+ # show_lectures_on_the_commandline individuelles_bachelor_studium
3156
+ # show_lectures_on_the_commandline LBT
3157
+ # show_lectures_on_the_commandline agrarbiotechnologie
3158
+ # show_lectures_on_the_commandline biologie
3159
+ # show_lectures_on_the_commandline botanik
3160
+ # show_lectures_on_the_commandline pharmazie
3161
+ # show_lectures_on_the_commandline bachelor_pharmazie
3162
+ # show_lectures_on_the_commandline tu_master_biotech
3163
+ # show_lectures_on_the_commandline AW
3164
+ # show_lectures_on_the_commandline immunbio
3165
+ # show_lectures_on_the_commandline bachelor_mikrobiologie_und_genetik
3166
+ # show_lectures_on_the_commandline master_molbio
3167
+ # show_lectures_on_the_commandline bachelor_molbio