studium 0.14.16

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

Potentially problematic release.


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

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