Class: Studium::Exams::MandatoryContinuousAssessment

Inherits:
Base
  • Object
show all
Defined in:
lib/studium/exams/mandatory_continuous_assessment/misc.rb,
lib/studium/exams/mandatory_continuous_assessment/run.rb,
lib/studium/exams/mandatory_continuous_assessment/help.rb,
lib/studium/exams/mandatory_continuous_assessment/menu.rb,
lib/studium/exams/mandatory_continuous_assessment/reset.rb,
lib/studium/exams/mandatory_continuous_assessment/compare.rb,
lib/studium/exams/mandatory_continuous_assessment/constants.rb,
lib/studium/exams/mandatory_continuous_assessment/initialize.rb,
lib/studium/exams/mandatory_continuous_assessment/show_and_report.rb,
lib/studium/exams/mandatory_continuous_assessment/set_title_of_the_curriculum.rb,
lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb

Overview

Studium::Exams::MandatoryContinuousAssessment

Constant Summary collapse

N_TOKENS_FOR_THE_SPRINGREEN_SPACER =
#

N_TOKENS_FOR_THE_SPRINGREEN_SPACER

#
132
NAMESPACE =
#

NAMESPACE

#
inspect

Constants inherited from Base

Base::ARRAY_HTML_COLOURS_IN_USE, Base::CHECK_FOR_INCORRECT_ENTRIES_IN_THE_QUESTION_ANSWER_FILE_THAT_SHOULD_BE_COMMENTS, Base::COLOURS, Base::COMMON_YEAR_DAYS_IN_MONTH, Base::GRAY, Base::LEFT_PADDING, Base::N_CHARACTERS_PER_LINE, Base::UNICODE_RIGHT_ARROW

Constants included from Colours

Colours::COLOURS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#add_proper_year_entry_to_this_line, #already_solved_this_lva_number?, #append_what_into, #available_topics_as_short_name, #average_grade, #bachelor_master_or_diploma, #base_dir?, #be_silent, #be_verbose?, #beautiful_url, #change_directory, #cheering_person, #cliner, #colour_for_ects_points, #colourize_percentage, #commandline_arguments_joined, #commandline_arguments_with_hyphens?, #convert_this_array_of_lectures_into_the_full_dataset, #copy, #cpruby, #create_directory, #create_file, #csv_file?, #current_month?, #datum?, #day_month_year, #debug?, #delete_file, #directory_of_the_exam_topics?, #directory_to_my_exam_topics, #directory_to_the_exam_topics?, #disable_colours, #disable_colours_globally, #do_not_be_verbose, #do_not_use_opn, #do_these_curricula_include_both_a_bachelor_and_a_master_curriculum?, #does_this_line_include_a_german_weekday?, #does_this_line_include_a_html_colour?, #e, #ecomment, #editor?, #ee, #enable_colours, #enable_colours_globally, #enable_debug, #encoding?, #english_to_german_weekday, #ensure_main_encoding, #ensure_that_the_log_directory_exists, #eparse, #erev, #esystem, #etomato, #exit_program, #expand_topic, #extract_dd_mm_yyyy, #file_lecture_information?, #file_read_with_proper_encoding, #filter_away_invalid_questions, #find_corresponding_exam_topic, #first_argument?, #first_non_hyphen_argument?, #from_curriculum_id_to_university, #german_date_notation, #german_weekday?, #german_weekdays?, #has_a_bachelor_curriculum?, #has_a_master_curriculum?, #has_this_exam_topic_been_solved?, #has_year_entry?, #hh_mm_ss_dd_mm_yyyy, #horizontal_bar?, #html_log_directory?, #is_a_master_lecture?, #is_a_weekday?, #is_connected_to_the_www?, #is_on_roebe?, #is_prüfungsimmanent?, #is_this_a_valid_html_colour?, #is_this_day_today?, #konsole_support?, #last_file?, #lectures_from_indi1, #lectures_from_indi2, #lectures_from_indi3, #lectures_from_indi4, #lectures_from_the_bachelor_genetik_curriculum, #lectures_from_the_individual_vektor_curricula, #load_yaml_dataset, #move_file, #n_days_difference_from_today_to_this_day, #no_ext_name, #no_file_at, #number_to_month, #obtain, #obtain_lectures_from_this_curriculum, #open_in_editor, #opnn, #path_to_exam_topic?, #read_dataset_from_a_curriculum_file, #read_in_exam_dataset_from_this_file, #read_this_file_with_default_encoding, #readlines_from_this_input_file, #register_sigint, #remove_empty_strings, #remove_escape_sequences, #remove_internal_comments, #remove_leading_comments, #remove_leading_weekday_names_from, #remove_newlines, #remove_tags_from_this_input, #rename_kde_konsole_tab, #rename_konsole_tab?, #replace_all_html_colours_in_this, #replace_bold_token_with_default_colour, #replace_italic_token_with_default_colour, #replace_italic_token_with_this_colour, #replace_regular_numbers_with_unicode_numbers, #replace_underline_token_with_default_colour, #replace_underline_token_with_this_colour, #return_all_bachelor_lectures, #return_all_exams_on_this_day, #return_all_numbers_from, #return_all_registered_curricula, #return_all_steop_lectures, #return_current_year, #return_dataset_for_this_topic, #return_dataset_from_this_curriculum_file, #return_dd_mm_yy_and_time_from, #return_directory_for, #return_ects_points_from_these_lectures, #return_either_grey_or_the_custom_colour_for_answers, #return_either_grey_or_the_custom_colour_for_questions, #return_file_for_this_curriculum, #return_german_name_for_this_english_month, #return_german_weekday_of?, #return_hh_mm_ss_from, #return_hour_from_this, #return_lectures_from_bachelor_vektor_curriculum, #return_lectures_with_at_the_least_one_upcoming_exam, #return_local_path_of_this_pwdstud, #return_lva_number_of_this_lecture, #return_month_fitting_to_this_input, #return_n_days_until_monday, #return_n_days_until_sunday, #return_n_exam_questions_in, #return_n_questions_were_answered_for_this_topic, #return_name_of_the_weekday, #return_name_of_this_curriculum, #return_name_of_this_curriculum_based_on_its_id_number, #return_opnn, #return_passed_courses, #return_pwd, #return_random_curriculum, #return_sanitized_dataset_from_the_file_lecture_information, #return_solved_lectures, #return_steop_lectures, #return_the_remote_homepage_url, #return_this_line_has_n_characters_as_html_colour_tags, #return_title_from_this_curriculum_file, #rev, #right_arrow?, #rinstall2, #roebe_exam_directory?, #ruby_src_dir_at_home?, #runmode?, #sanitize_this_topic, #sanitize_url, #select_lectures_with_this_key, #set_be_quiet, #set_be_verbose, #set_commandline_arguments, #set_commandline_mode, #set_runmode, #set_this_cd_alias_to, #set_www_mode, #sfancy, #shall_we_make_use_of_unicode_symbols?, #show_todays_date, #simp, #sort_these_lecture_names_by_time, #spacer, #swarn, #this_month_has_n_days?, #total_ects_points_passed, #translate_dd_mm_yyyy_to_weekday, #try_to_require_the_rcfiles, #turn_this_array_into_the_full_dataset, #unicode_blocks_line, #use_colours?, #use_opn?, #vertical_bar?, #web_liner, #weekday?, #weekdays?, #word_wrap, #write_what_into, #www_connection_is_unavailable, #www_mode?, #yaml_dir?

Methods included from Colours

#bold_blue, #bold_red, #bold_yellow, #cadetblue, #chartreuse, crimson, #darkgray, darkgreen, darkseagreen, deepskyblue, #deepskyblue, default_colour, #dimgray, disable_colours, #dodgerblue, e, #efancy, enable_colours, #ewarn, #forestgreen, gold, #grey, lightblue, lightgreen, #lightslategray, #lightsteelblue, #mediumorchid, #mediumseagreen, #oldlace, #olivedrab, orange, orangered, #orchid, palevioletred, #papayawhip, rev, royalblue, sdir, #sdir, sfancy, #sfancy, sfile, #sfile, simp, #simp, slateblue, steelblue, #steelblue, #swarn, swarn, #teal, turquoise, use_colours?, use_this_colour_for_exam_answers, use_this_colour_for_exam_questions, #yellow

Constructor Details

#initialize(i = nil, run_already = true) ⇒ MandatoryContinuousAssessment

#

initialize

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/studium/exams/mandatory_continuous_assessment/initialize.rb', line 16

def initialize(
    i           = nil,
    run_already = true
  )
  reset
  set_original_commandline(i)
  set_input(i)
  case run_already
  when :do_not_run_yet,
       :dont_run_yet
    run_already = false
  end
  if block_given?
    yielded = yield
    case yielded
    # ===================================================================== #
    # === :do_not_report_the_title
    # ===================================================================== #
    when :do_not_report_the_title
      @show_the_title_of_the_curriculum = false
    # ===================================================================== #
    # === :do_not_report_anything
    # ===================================================================== #
    when :do_not_report_anything
      do_not_report_anything
    end
  end
  run if run_already
end

Class Method Details

.[](i = '') ⇒ Object

#

Studium::Exams::MandatoryContinuousAssessment[]

#


1091
1092
1093
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 1091

def self.[](i = '')
  new(i)
end

Instance Method Details

#available_curricula?Boolean

#

available_curricula?

#

Returns:

  • (Boolean)


520
521
522
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 520

def available_curricula?
  ARRAY_REGISTERED_CURRICULA
end

#bachelor_or_master(i) ⇒ Object

#

bachelor_or_master

This method will return a String, either “Bachelor” or “Master” or “Bachelor/Master”.

#


503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 503

def bachelor_or_master(i)
  result = ''.dup
  if is_a_bachelor_lecture?(i)
    result << 'Bachelor'
  end
  if is_a_master_lecture?(i)
    unless result.empty?
      result << '/'
    end
    result << 'Master'
  end
  return result
end

#consider_displaying_the_title_of_the_curriculumObject

#

consider_displaying_the_title_of_the_curriculum

#


673
674
675
676
677
678
679
680
681
682
683
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 673

def consider_displaying_the_title_of_the_curriculum
  if @show_the_title_of_the_curriculum
    if @do_report_the_findings
      _ = title?
      if _
        e sfancy(_)
        e
      end if be_verbose?
    end
  end
end

#display_these_lectures_sorted_by_priority(i, priority_to_use = [5,4,3,2,1]) ⇒ Object

#

display_these_lectures_sorted_by_priority

Do note that we will actually sort in two ways in this method:

- First, by priority, which can have values from 1 up to 5
- Second, by the amount of ECTS points. Lectures that have
  more ECTS points will be displayed first.
#


1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 1002

def display_these_lectures_sorted_by_priority(
    i, priority_to_use = [5,4,3,2,1]
  )
  if priority_to_use.is_a? Array
    priority_to_use.each {|entry|
      # =================================================================== #
      # Call this method recursively.
      # =================================================================== #
      display_these_lectures_sorted_by_priority(i, entry)
    }
  else
    if @do_report_the_findings
      # =================================================================== #
      # Show a little header, to notify the user which Priority-setting
      # is currently shown.
      # =================================================================== #
      smiley_face = ''
      if use_unicode_symbols? and Object.const_defined?(:Roebe)
        smiley_face = lightseagreen(Roebe.smiley_face)
      end
      e sfancy("Priority #{priority_to_use.to_s}: #{smiley_face}")
      e
    end
    matching_priority = i.select {|a, b| b[:priority] == priority_to_use }
    counter = 0
    sorted_by_n_ECTS_points_of_matching_priority = matching_priority.sort_by {|a, b|
      b[:ects]
    }.reverse
    sorted_by_n_ECTS_points_of_matching_priority.each {|name, inner_hash| counter += 1
      name = name.first if name.is_a? Array
      n_ects_points     = inner_hash[:ects]
      university        = inner_hash[:university]
      lecture_type      = inner_hash[:type]
      summer_or_winter  = inner_hash[:semester]
      outdated_lecture  = inner_hash[:outdated_lecture]
      next if outdated_lecture == true
      curricula_entries = obtain(:curricula_entries, inner_hash)
      currently_participating_in_this_course = inner_hash[:currently_participating_in_this_course]
      if currently_participating_in_this_course
        # ================================================================= #
        # Lectures that we are presently doing in the current semester
        # will be shown in skyblue rather than slateblue.
        # ================================================================= #
        colourized_name_of_the_lecture = skyblue(name)
      else
        colourized_name_of_the_lecture = slateblue(name)
      end
      # =================================================================== #
      # Colourize the ECTS points, in seagreen and lightseeagreen.
      # Also show the lecture type and the university.
      # =================================================================== #
      colourized_n_ects_points = seagreen('(n ECTS: '+n_ects_points.to_s+', ')+
                                 lightseagreen(lecture_type)+ # <- Display the lecture type here.
                                 seagreen(', ')
      unless summer_or_winter.nil?
        colourized_summer_or_winter = mediumseagreen(summer_or_winter.to_s)
        colourized_n_ects_points << colourized_summer_or_winter+
                                    seagreen(', ')
      end
      colourized_n_ects_points << olivedrab(university)
      colourized_n_ects_points << seagreen(', ')
      colourized_n_ects_points << crimson(bachelor_or_master(curricula_entries))
      # =================================================================== #
      # Add the closing ')' next.
      # =================================================================== #
      colourized_n_ects_points << seagreen(')')
      if @do_report_the_findings
        e slategray(counter.to_s.rjust(2))+'  '+
          colourized_name_of_the_lecture+' '+
          colourized_n_ects_points
      end
    }
    e if @do_report_the_findings
  end
end

#display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose = be_verbose? ) ⇒ Object

#

display_this_array_including_only_mandatory_continuous_assessment_lectures

The input to this method will be an Array of mandatory continuous assessment lectures.

#


530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 530

def display_this_array_including_only_mandatory_continuous_assessment_lectures(
    array, be_verbose = be_verbose?
  )
  case be_verbose
  when nil
    be_verbose = be_verbose?
  when :be_verbose
    be_verbose = true
  end
  consider_displaying_the_title_of_the_curriculum
  # ======================================================================= #
  # Sometimes the input may be a String. In this case, split it up.
  # ======================================================================= #
  if array.is_a? String
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(
      array.split(N)
    )
  end
  # ======================================================================= #
  # Next we can display the result.
  # ======================================================================= #
  sorted_array = array.map {|line|
    line.delete('"')
  }.sort
  sorted_array.each {|line|
    # ===================================================================== #
    # Up to 05.11.2019 this code used to read in the content of a file,
    # but since that day we will instead obtain the information from
    # the file called "lecture_information.yml" instead. A useful
    # side-effect of this is that this approach should be faster
    # than using regexes.
    # ===================================================================== #
    line.strip!
    if line.include? '#'
      line = line[0 .. (line.index('#')-1)]
      line.strip!
    end
    line.squeeze!(' ')
    if @dataset_from_the_file_lecture_information[line].nil?
      e 'A nil-value was found, for line '+steelblue(line)+'.'
      e 'Exiting now.'
      exit
    end
    n_ects_points = @dataset_from_the_file_lecture_information[line][:ects]
    type_of_the_lecture = @dataset_from_the_file_lecture_information[line][:type]
    # ===================================================================== #
    # Instantly ensure that we have a valid amount of ECTS points.
    # ===================================================================== #
    if n_ects_points == 0.0
      opnn; e swarn('We encountered a problem, a 0.0 ECTS lecture, at: ')+
              lightgreen(line)
    end
    # ===================================================================== #
    # Left-pad the lecture ID.
    # ===================================================================== #
    if line.include? ' '
      splitted = line.split(' ')
      splitted[0] = splitted[0].ljust(7)
      name = splitted.join(' ')
    end
    @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum += n_ects_points
    if be_verbose and @do_report_the_findings
      e '  '+orange(
          name.ljust(93)
        )+' '+mediumpurple(
          n_ects_points.to_s.rjust(4)
        )+' ECTS points '+
        seagreen(type_of_the_lecture.to_s.rjust(4)) # <- Last part is type of the lecture.
    end
  }
  e if be_verbose and @do_report_the_findings
  do_calculate_the_percentage
  # ======================================================================= #
  # Next, report the total amount of ECTS and some more information.
  # ======================================================================= #
  if be_verbose and @do_report_the_findings
    e 'Total amount of ECTS points: '+
       crimson(@total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum.to_s)+
       lightblue(' (== ')+seagreen(n_percent?.round(2).to_s+'%')+
       lightblue(' of '+@total_amount_of_ECTS_points_in_the_curriculum.to_s+
       ' ECTS points in total)')
  end
end

#do_assume_120_ects_pointsObject

#

do_assume_120_ects_points

#


702
703
704
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 702

def do_assume_120_ects_points
  @total_amount_of_ECTS_points_in_the_curriculum = 120
end

#do_assume_180_ects_pointsObject

#

do_assume_180_ects_points

#


688
689
690
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 688

def do_assume_180_ects_points
  @total_amount_of_ECTS_points_in_the_curriculum = 180
end

#do_assume_300_ects_pointsObject Also known as: do_assume_300_points

#

do_assume_300_ects_points

#


695
696
697
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 695

def do_assume_300_ects_points
  @total_amount_of_ECTS_points_in_the_curriculum = 300
end

#do_calculate_the_percentage(n_ects_in_mandatory_courses = @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum, n_total_ects_points_in_the_curriculum = @total_amount_of_ECTS_points_in_the_curriculum) ⇒ Object

#

do_calculate_the_percentage

This method will calculate the percentage of ects points in courses with mandatory-attendance.

#


620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 620

def do_calculate_the_percentage(
    n_ects_in_mandatory_courses           = @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum,
    n_total_ects_points_in_the_curriculum = @total_amount_of_ECTS_points_in_the_curriculum
  )
  n_percent = (
    n_ects_in_mandatory_courses.to_f * 100
  ) / n_total_ects_points_in_the_curriculum
  # ======================================================================= #
  # Note that this method will also set the percentage.
  # ======================================================================= #
  set_percentage(n_percent) # Set the percentage here as well.
end

#do_compare_the_registered_curricula(show_details = false) ⇒ Object

#

do_compare_the_registered_curricula

This method can be used to compare different curricula for their mandatory ECTS points, in a batch-processive manner.

To invoke this method from the commandline, do:

mandatory --compare
#


29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/studium/exams/mandatory_continuous_assessment/compare.rb', line 29

def do_compare_the_registered_curricula(
    show_details = false
  )
  do_not_report_any_findings
  # ======================================================================= #
  # Do not use the combined bachelor-master vector curriculum though.
  # The following method-call ensures that.
  # ======================================================================= #
  report_these_curricula = ::Studium.return_registered_standalone_curricula
  e
  e "#{rev}  Comparing the number of ECTS points assigned to "\
    "mandatory-presence"
  e '  courses in different curricula:'
  e
  # ======================================================================= #
  # Iterate over these curricula next:
  # ======================================================================= #
  report_these_curricula.each_with_index {|this_curriculum, index| index += 1
    # ===================================================================== #
    # We will next delegate towards class MandatoryContinuousAssessment,
    # which will tell us how many ECTS points are mandatory.
    #
    #   bl MandatoryContinuousAssessment
    #
    # ===================================================================== #
    _ = Studium::Exams::MandatoryContinuousAssessment.new(this_curriculum) { :do_not_report_anything }
    n_ects_points_that_are_mandatory = _.n_mandatory_ects_points_in_this_curriculum?.to_s.rjust(5)
    n_ects_points_in_total_in_this_curriculum = _.n_total_ects_points
    title_of_the_curriculum = _.title?
    if title_of_the_curriculum.nil?
      # =================================================================== #
      # Report missing title next:
      # =================================================================== #
      e "This curriculum (#{sfancy(this_curriculum)}) has no title."
      e 'This is currently not allowed. Please correct this error.'
      e 'The method that has to be modified is: '+
         steelblue('set_title_of_the_curriculum()')+' and '+
         steelblue('location_of()')
      exit
    end
    if title_of_the_curriculum and title_of_the_curriculum.is_a?(String)
      title_of_the_curriculum = title_of_the_curriculum.dup if title_of_the_curriculum.frozen?
      title_of_the_curriculum.strip!
    end
    # ===================================================================== #
    # If the title of the curriculum is too long, chop it down.
    # ===================================================================== #
    threshold_value = 55
    title_of_the_curriculum = ''.dup if title_of_the_curriculum.nil?
    if title_of_the_curriculum.size > threshold_value
      title_of_the_curriculum = "#{title_of_the_curriculum[0 .. threshold_value]} [...]"
    end
    if title_of_the_curriculum.include? 'Master'
      if @display_split_line
        # ================================================================= #
        # Display a horizontal-line next, coloured in springgreen, as
        # visual separator:
        # ================================================================= #
        e springgreen(
            '  '+('-' * N_TOKENS_FOR_THE_SPRINGREEN_SPACER)
          )
        @display_split_line = false # We already displayed it once.
      end
    end
    padded_index = " (#{index}".rjust(4)+') '
    colourized_and_padded_index = mediumpurple(padded_index)
    formatted_percentage_value  = _.percentage?.round(2).to_s.ljust(5,'0')
    # ===================================================================== #
    # Pad the title of the curriculum a little next:
    # ===================================================================== #
    padded_title_of_the_curriculum = title_of_the_curriculum.ljust(threshold_value+7)
    n_percent_solved = Studium.n_percent_solved_in_this_curriculum(this_curriculum)
    # ===================================================================== #
    # We will display the two major individual curricula, about "Vektorsysteme",
    # in a slightly brighter colour:
    # ===================================================================== #
    if padded_title_of_the_curriculum.include? 'Vektor'
      colourized_and_padded_title_of_the_curriculum = mediumturquoise(padded_title_of_the_curriculum)
    else
      colourized_and_padded_title_of_the_curriculum = sfancy(padded_title_of_the_curriculum)
    end
    # ===================================================================== #
    # First comes the index, then the title of the curriculum at hand.
    # The index is presently colourized in 'mediumpurple'.
    # ===================================================================== #
    e colourized_and_padded_index+ # <- First show the colourized and padded index.
      colourized_and_padded_title_of_the_curriculum+
      powderblue(n_ects_points_that_are_mandatory)+' ECTS in '+
      seagreen('mandatory-courses')+' (total ECTS: '+
      powderblue(n_ects_points_in_total_in_this_curriculum.to_s)+
      ', '+slateblue(formatted_percentage_value+'%')+' share'+
      ', '+seagreen(n_percent_solved.round(1).to_s.rjust(4)+'%')+' solved'+
      ')'
    # ===================================================================== #
    # Enter this clause if the user wants to show some more details.
    # ===================================================================== #
    case show_details
    # ===================================================================== #
    # === :show_more_details_but_without_the_title
    #
    # This variant will show more details, that is, every course will be 
    # shown on a new line each.
    # ===================================================================== #
    when :show_more_details_but_without_the_title
      Studium::Exams::MandatoryContinuousAssessment.new(this_curriculum) { :do_not_report_the_title } 
    # ===================================================================== #
    # === :show_details
    # ===================================================================== #
    when :show_details,
         :show_more_details
      Studium::Exams::MandatoryContinuousAssessment.new(this_curriculum)
    end 
  }; e
end

#do_not_report_any_findingsObject Also known as: do_not_report_anything

#

do_not_report_any_findings

#


659
660
661
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 659

def do_not_report_any_findings
  @do_report_the_findings = false
end

#do_show_all_passed_mandatory_continuous_assessmentsObject

#

do_show_all_passed_mandatory_continuous_assessments

This method will show all “prüfungsimmanente” Lehrveranstaltungen.

#


947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 947

def do_show_all_passed_mandatory_continuous_assessments
  obtain_default_dataset
  # ======================================================================= #
  # Next, grab all entries that are "prüfungsimmanent". These are those
  # types that are part of the array-constant, so, UE, PS, SE, LU and
  # so forth. These all have mandatory continuous assessment parts.
  # ======================================================================= #
  @result = @dataset.select {|line|
    splitted = line.split('|').map(&:strip)
    lecture_type = splitted[6] # <- This is the right entry.
    is_included = ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT.include? lecture_type
    is_included
  }
  report_result # Report it as we assigned the result above.
end

#do_show_all_passed_mandatory_continuous_assessments_from_this_year(the_year) ⇒ Object

#

do_show_all_passed_mandatory_continuous_assessments_from_this_year

The input argument denotes the year. If the exam was passed in that year, then it will be shown.

Invocation example:

mandatory --2017
#


734
735
736
737
738
739
740
741
742
743
744
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 734

def do_show_all_passed_mandatory_continuous_assessments_from_this_year(the_year)
  obtain_default_dataset
  @result = @dataset.select {|line|
    splitted = line.split('|').map(&:strip)
    year = splitted.first.strip.split('.').last
    lecture_type = splitted[6] # <- This is the right entry.
    ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT.include?(lecture_type) &&
    (the_year == year) # Make the year-check here. 
  }
  report_result # Report it as we assigned the result above.
end

#epowderblue(i) ⇒ Object

#

epowderblue

#


147
148
149
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 147

def epowderblue(i)
  e powderblue(i) if @do_report_the_findings
end

#filter_for_lectures_at_the_BOKUObject

#

filter_for_lectures_at_the_BOKU

#


16
17
18
19
20
# File 'lib/studium/exams/mandatory_continuous_assessment/misc.rb', line 16

def filter_for_lectures_at_the_BOKU
  @dataset_from_the_file_lecture_information.select! {|name_of_the_lecture, hash_inner_dataset|
    hash_inner_dataset[:university] == 'BOKU'
  }
end

#filter_for_lectures_at_the_TU_ViennaObject

#

filter_for_lectures_at_the_TU_Vienna

#


25
26
27
28
29
# File 'lib/studium/exams/mandatory_continuous_assessment/misc.rb', line 25

def filter_for_lectures_at_the_TU_Vienna
  @dataset_from_the_file_lecture_information.select! {|name_of_the_lecture, hash_inner_dataset|
    hash_inner_dataset[:university] == 'TU Vienna'
  }
end

#filter_for_lectures_during_the_summer(this_semester = 'summer') ⇒ Object

#

filter_for_lectures_during_the_summer

This method will filter for lectures during summer - in other words, lectures that are during winter, will specifically be excluded.

#


37
38
39
40
41
42
43
# File 'lib/studium/exams/mandatory_continuous_assessment/misc.rb', line 37

def filter_for_lectures_during_the_summer(
    this_semester = 'summer'
  )
  @dataset_from_the_file_lecture_information.select! {|name_of_the_lecture, hash_inner_dataset|
    hash_inner_dataset[:semester] == this_semester
  }
end

#filter_for_lectures_during_the_winter(this_semester = 'winter') ⇒ Object

#

filter_for_lectures_during_the_winter

This method will filter for lectures during winter - in other words, lectures that are during summer, will specifically be excluded.

#


51
52
53
54
55
56
57
# File 'lib/studium/exams/mandatory_continuous_assessment/misc.rb', line 51

def filter_for_lectures_during_the_winter(
    this_semester = 'winter'
  )
  @dataset_from_the_file_lecture_information.select! {|name_of_the_lecture, hash_inner_dataset|
    hash_inner_dataset[:semester] == this_semester
  }
end

#input?Boolean

#

input?

#

Returns:

  • (Boolean)


133
134
135
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 133

def input?
  @input
end

#location_of(i = :bachelor_vektoren, also_assign_new_title = true) ⇒ Object

#

location_of (location_of tag)

Return the location of the curriculum locally, based on symbol “shortcuts” such as :bachelor_vektoren.

#


752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 752

def location_of(
    i                     = :bachelor_vektoren,
    also_assign_new_title = true
  )
  case i # case tag
  # ======================================================================= #
  # The Bachelorcurriculum "Biologische Informatik"
  # ======================================================================= #
  when :bachelor_biologische_informatik,
       :indi3
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The Bachelorcurriculum "Bachelorcurriculum (Bio)Informatik und
  #                         molekulare Biotechnologie, unter
  #                         Berücksichtigung medizinisch-immunologischer
  #                         Aspekte"
  # ======================================================================= #
  when :bachelor_bioinformatik_und_molekulare_biotechnologie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The Bachelorcurriculum "Ernährungswissenschaften" at the Uni-Vienna.
  # ======================================================================= #
  when :bachelor_nutrition_science
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # This is the general dummy curriculum. It can be used to quickly
  # test a new curriculum quickly.
  # ======================================================================= #
  when :bachelor_dummy_curriculum
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The Bachelorcurriculum "Molekularbiologie" at the Uni-Graz.
  # ======================================================================= #
  when :bachelor_molekularbiologie,
       :bachelor_molekularbiologie_curriculum,
       :bachelor_molekularbiologie_graz
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The Bachelorcurriculum "Pharmazie" at the University of Vienna.
  # ======================================================================= #
  when :bachelor_pharmazie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The Mastercurriculum "Pharmazie" at the University of Vienna.
  # ======================================================================= #
  when :master_pharmazie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The bachelor curriculum chemistry at the University of Vienna.
  # ======================================================================= #
  when :bachelor_chemistry, # mandatory --bachelor_chemistry
       :bachelor_chemie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The bachelor-curriculum Technische Chemie
  # ======================================================================= #
  when :bachelor_technische_chemie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The individual bachelor mikrobiologie curriculum
  # ======================================================================= #
  when :bachelor_mikrobiologie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The individual master vector curriculum at the University of Vienna.
  # ======================================================================= #
  when :master_vektoren
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The master genetik und entwicklungsbiologie.
  # ======================================================================= #
  when :master_genetik_und_entwicklungsbiologie
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The master biotechnology curriculum at the TU Vienna.
  # ======================================================================= #
  when :master_tuvienna_biotechnology,
       :master_tu_vienna_biotechnology
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # This is the bachelorcurriculum at the TU Vienna, Medizinische Informatik.
  # ======================================================================= #
  when :bachelor_medizinische_informatik
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # This is the bachelor-curriculum molbio at the University of Vienna.
  # ======================================================================= #
  when :bachelor_molekulare_biologie,
       :bachelor_molbio
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # This is the BOKU Bachelor Agrarwissenschaften curriculum.
  # ======================================================================= #
  when :bachelor_agrarwissenschaften
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The individual bachelor vector curriculum at the University of Vienna.
  # ======================================================================= #
  when :bachelor_vektoren
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # The bachelor LMBT curriculum at the BOKU Vienna.
  # ======================================================================= #
  when :bachelor_lmbt,
       :lmbt
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # === :master_lmbt
  # ======================================================================= #
  when :master_lmbt
    set_title(i) if also_assign_new_title
  # ======================================================================= #
  # The master Immunbiology at the University of Vienna.
  # ======================================================================= #
  when :master_immuno
    set_title(i) if also_assign_new_title
    i = return_file_for_this_curriculum(i)
  # ======================================================================= #
  # :master_molbio
  # ======================================================================= #
  when :master_molbio
    set_title(i) if also_assign_new_title
    i = FILE_MASTER_MOLBIO
  # ======================================================================= #
  # :bachelor_biologie_basisblock
  # ======================================================================= #
  when :bachelor_biologie_basisblock
    set_title(i) if also_assign_new_title
    i = FILE_BACHELOR_BIOLOGIE_BASISBLOCK
  # ======================================================================= #
  # :bachelor_genetik
  # ======================================================================= #
  when :bachelor_genetik
    set_title(i) if also_assign_new_title
    i = FILE_BACHELOR_GENETIK
  # ======================================================================= #
  # :bachelor_ernährungswissenschaften
  # ======================================================================= #
  when :bachelor_ernährungswissenschaften
    set_title(i) if also_assign_new_title
    i = FILE_BACHELOR_ERNÄHRUNGSWISSENSCHAFTEN
  end
  return i
end
#

menu (menu tag)

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/studium/exams/mandatory_continuous_assessment/menu.rb', line 16

def menu(
    i = nil
  )
  if i.is_a? Array
    i.each {|entry| menu(entry) }
  else
    case i # case tag
    # ===================================================================== #
    # === mandatory --boku --summer
    # ===================================================================== #
    when /^-?-?BOKU$/i,
      filter_for_lectures_at_the_BOKU
    # ===================================================================== #
    # === mandatory --tuwien --summer
    # ===================================================================== #
    when /^-?-?tuwien$/i,
         /^-?-?tuvienna$/i
      filter_for_lectures_at_the_TU_Vienna
    # ===================================================================== #
    # === mandatory --summer
    # ===================================================================== #
    when /^-?-?summer$/i
      filter_for_lectures_during_the_summer
    # ===================================================================== #
    # === mandatory --winter
    # ===================================================================== #
    when /^-?-?winter$/i
      filter_for_lectures_during_the_winter
    # ===================================================================== #
    # === mandatory --compare-details
    #
    # This variant is different to --compare in that we will get a good
    # overview of the individual lectures as well.
    # ===================================================================== #
    when /^-?-?compare(-|_)?details?$/i,
         /^-?-?compare(-|_)?stats$/i,
         /^-?-?details$/i
      do_compare_the_registered_curricula(
        :show_more_details_but_without_the_title
      )
      exit
    # ===================================================================== #
    # === mandatory --compare
    # ===================================================================== #
    when /^-?-?compare$/i
      do_compare_the_registered_curricula
      exit
    # ===================================================================== #
    # === mandatory_assessment --all
    #
    # Show all the mandatory continuous assessment lectures that were
    # passed so far.
    # ===================================================================== #
    when /-?-?all$/i,
         /-?-?everything$/i,
         /-?-?default$/i
      @use_spacer_to_separate_a_new_year = true
      :show_all_passed_mandatory_continuous_assessments
    # ===================================================================== #
    # === mandatory --upcoming
    # ===================================================================== #  
    when /^-?-?upcoming$/i,
         /^-?-?todo$/i,
         /^-?-?next$/i,
         /^-?-?show(-|_)?all$/i
      show_upcoming_mandatory_continuous_assessments { commandline_arguments? }
      exit
    # ===================================================================== #
    # === mandatory --only-wintersemester
    # ===================================================================== #
    when /^-?-?only(-|_)?wintersemester$/i,
         /^-?-?wintersemester$/i
      @dataset_from_the_file_lecture_information.select! {|a,b|
        semester = obtain(:semester, b, :be_quiet)
        semester == 'winter'
      }
      show_upcoming_mandatory_continuous_assessments(
        @dataset_from_the_file_lecture_information
      )
    # ===================================================================== #
    # === mandatory_assessment --all_curricula
    #
    # Show all the different curricula - at the least those that were
    # registered in the main Array.
    # ===================================================================== #
    when /-?-?all(_|-)?curricula$/i
      show_all_available_curricula
    # ===================================================================== #
    # === mandatory_assignment --2018
    # ===================================================================== #
    when /^-?-?(\d{4})$/
      the_year = $1.to_s.dup
      do_show_all_passed_mandatory_continuous_assessments_from_this_year(the_year)
      exit
    # ===================================================================== #
    # === mandatory_assessment --available
    # ===================================================================== #
    when /-?-?available/
      e; available_curricula?.each {|entry| e "  - #{sfancy(entry)}" }; e
    # ===================================================================== #
    # === mandatory_assessment --help
    # ===================================================================== #
    when /help/
      show_help
      exit
    end
  end
end

#n_ects_points(i = 120) ⇒ Object

#

n_ects_points

This method can be used to directly set the amount of ECTS points in the given curriculum.

#


712
713
714
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 712

def n_ects_points(i = 120)
  @total_amount_of_ECTS_points_in_the_curriculum = i.to_i
end

#obtain_default_datasetObject

#

obtain_default_dataset

Simply assign the default dataset, from the file with the passed exams, to the instance variable @dataset.

#


1084
1085
1086
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 1084

def obtain_default_dataset
  @dataset = ::Studium.sanitized_dataset_from_file_passed_exams_per_month
end

#original_commandline?Boolean Also known as: commandline?, commandline_arguments?

#

original_commandline?

#

Returns:

  • (Boolean)


118
119
120
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 118

def original_commandline?
  @original_commandline
end

#padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose_in_the_subsequent_method_call = nil) ⇒ Object

#

padded_display_this_array_including_only_mandatory_continuous_assessment_lectures

#


966
967
968
969
970
971
972
973
974
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 966

def padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(
    array, be_verbose_in_the_subsequent_method_call = nil
  )
  e if be_verbose? and @do_report_the_findings
  display_this_array_including_only_mandatory_continuous_assessment_lectures(
    array, be_verbose_in_the_subsequent_method_call
  )
  e if be_verbose? and @do_report_the_findings
end

#percentage?Boolean Also known as: n_percent?

#

percentage?

#

Returns:

  • (Boolean)


666
667
668
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 666

def percentage?
  @percentage
end

#readlines(i) ⇒ Object

#

readlines

Just a shorter method towards File.readlines().

#


920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 920

def readlines(i)
  result = []
  if i.is_a? Symbol
    i = return_file_for_this_curriculum(i)
  end
  unless i.is_a? Array
    i = [i]
  end
  i.each {|entry|
    if File.exist? entry.to_s
      result << File.readlines(entry)
    else
      opnn; e 'No file exists at `'+
              sfile(entry.to_s)+
              '`. (in the method readlines())' # This line shall always be output.
      exit
    end
  }
  result.flatten!
  return result
end

#report_result(_ = @result) ⇒ Object Also known as: report

#

report_result

Note that by default, this works on the variable @result. So if you modify that variable, you are already half-way done. Otherwise, if you need another dataset, you can pass in another dataset as an argument to this method.

#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/studium/exams/mandatory_continuous_assessment/show_and_report.rb', line 21

def report_result(
    _ = @result
  )
  if @do_report_the_findings
    if _
      total_ects = 0
      n_ects_in_this_year = 0
      last_year = Time.now.year
      e; _.each_with_index {|line, index|
        # =================================================================== #
        # A line may look like this:
        #   21.04.2015 | 2.0 | 2.0 | 1 | UniWien | B | UE | 300632 | 2016S | Übungen zu Grundlagen in der Bioinformatik\n
        # =================================================================== #
        index               += 1
        splitted             = line.split('|').map(&:strip)
        name                 = splitted.last # The name of the lecture.
        exam_date            = splitted.first
        the_year             = exam_date.split('.').last.to_i
        lecture_type         = splitted[6]
        n_ects               = splitted[2].to_f # Amount of ECTS points.
        n_ects_in_this_year += n_ects
        total_ects          += n_ects
        padded_name          = name.ljust(90)
        if @use_spacer_to_separate_a_new_year and
          !(the_year == last_year)
          # =============================================================== #
          # Show a little coloured spacer next:
          # =============================================================== #
          show_coloured_spacer {{ n_ects: n_ects_in_this_year }}
          n_ects_in_this_year = 0 # And reset it again.
          last_year = the_year
        end
        # ================================================================= #
        # Report our findings finally. This begins with a leading
        # index in orange colour.
        # ================================================================= #
        e orange((index.to_s+')').rjust(4))+' '+
          padded_name+
          turquoise(' ('+exam_date.to_s+')')+' '+
          crimson(lecture_type.center(5))+' '+
          royalblue(n_ects.to_s.rjust(4)+' ECTS')
      }; e
      e "In total we completed #{violet(total_ects.to_s)} ECTS "\
        "points in #{orange(_.size.to_s)} different courses."
      e
    end
  end
end

#resetObject

#

reset (reset tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/studium/exams/mandatory_continuous_assessment/reset.rb', line 14

def reset
  super()
  # ======================================================================= #
  # === @namespace
  # ======================================================================= #
  @namespace = NAMESPACE
  # ======================================================================= #
  # === @dataset_from_the_file_lecture_information
  #
  # Obtain the dataset that we have stored in the file called
  # "lecture_information.yml" next.
  # ======================================================================= #
  @dataset_from_the_file_lecture_information =
    Studium.return_sanitized_dataset_from_the_file_lecture_information
  reset_this_instance
  # ======================================================================= #
  # === @use_spacer_to_separate_a_new_year
  # ======================================================================= #
  @use_spacer_to_separate_a_new_year = false
  # ======================================================================= #
  # === @do_report_the_findings
  # ======================================================================= #
  @do_report_the_findings = true
end

#reset_this_instanceObject

#

reset_this_instance

#


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/studium/exams/mandatory_continuous_assessment/reset.rb', line 42

def reset_this_instance
  # ======================================================================= #
  # === @percentage
  #
  # This variable stores how much percentage from the ECTS was passed.
  # ======================================================================= #
  @percentage = 0.0
  # ======================================================================= #
  # === @result
  #
  # Store the result of this class in this instance variable.
  # ======================================================================= #
  @result = nil
  # ======================================================================= #
  # === @title_of_the_curriculum
  # ======================================================================= #
  @title_of_the_curriculum = nil
  # ======================================================================= #
  # === @show_the_title_of_the_curriculum
  # ======================================================================= #
  @show_the_title_of_the_curriculum = true
  # ======================================================================= #
  # === @total_amount_of_ECTS_points_in_the_curriculum
  # ======================================================================= #
  @total_amount_of_ECTS_points_in_the_curriculum = 180
  # ======================================================================= #
  # === @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum
  #
  # The following ivar keeps track of how many ECTS points
  # are "prüfungsimmanent" in that curriculum.
  # ======================================================================= #
  @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum = 0
  # ======================================================================= #
  # === @display_split_line
  #
  # The next instance variable may display a colourized line, if set to
  # true, which will make it easier to visually distinguish between
  # Bachelor and Master-curricula. I like this so I have set it to
  # true, but others may want to not use it, hence why I made it a flag.
  # ======================================================================= #
  @display_split_line = true
end

#return_entries_that_are_of_mandatory_continuous_assessment_type(i) ⇒ Object

#

return_entries_that_are_of_mandatory_continuous_assessment_type

The input to this method is assumed to come from a file, but you can also load up a String. In that case, we will split on newlines.

#


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 67

def return_entries_that_are_of_mandatory_continuous_assessment_type(i)
  if i.is_a? String
    i = i.split(N) # Split on newlines.
  end
  i.flatten! if i.is_a? Array
  i.reject! {|line|
    line.strip.start_with?('#') or
    line.strip.empty?
  }
  i.map!(&:strip)
  i.select! {|line|
    line.strip!
    # ===================================================================== #
    # We need to be careful here, because the line may either end with e.
    # g. "VO", or it may end with "VO, BOKU WIEN". The latter would then
    # cause the follow-up code to fail, so we have to filter way such
    # parts first.
    # ===================================================================== #
    if line.end_with? 'BOKU'
      line.sub!(/BOKU$/,'')
      line.strip!
    end
    if line.end_with?('WIEN') or line.end_with?('Wien')
      # =================================================================== #
      # First remove "WIEN" at the end of the line, then strip on the line.
      # =================================================================== #
      line.sub!(/WIEN$/,'')
      line.sub!(/Wien$/,'') if line.end_with? 'Wien'
      line.strip!
      line.sub!(/Uni$/,'')   if line.end_with? 'Uni'
      line.strip!
      # =================================================================== #
      # Still have TU, BOKU, VETMED and MEDUNI
      # =================================================================== #
      line.sub!(/BOKU$/,'')   if line.end_with? 'BOKU'
      line.sub!(/TU$/,'')     if line.end_with? 'TU'
      line.sub!(/VETMED$/,'') if line.end_with? 'VETMED'
      line.sub!(/MEDUNI$/,'') if line.include?  'MEDUNI' # Must come before "UNI".
      line.sub!(/UNI$/,'')    if line.end_with? 'UNI'
      line.strip!
    end
    line.chop! if line.end_with? ','
    last_two_characters = line[-2,2]
    ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT.include? last_two_characters
  }
  return i
end

#runObject

#

run (run tag)

#


14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/studium/exams/mandatory_continuous_assessment/run.rb', line 14

def run
  _ = input?
  case _ # case tag
  when :show_all_passed_mandatory_continuous_assessments
    do_show_all_passed_mandatory_continuous_assessments
  else # else this is the default "modus operandi" here.
    if _.include? '# ' # Assume that the user passed in a String with all the lectures here.
      e if be_verbose?
      display_this_array_including_only_mandatory_continuous_assessment_lectures(_)
      e if be_verbose?
    else
      # =================================================================== #
      # Else we will try to find that particular curriculum at hand.
      # =================================================================== #
      try_to_find_this_curriculum(_)
    end
  end
end

#set_input(i = '') ⇒ Object

#

set_input

#


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 45

def set_input(
    i = ''
  )
  if i.is_a? Array # Intercept Arrays here.
    if i.empty?
      i << '--all' # This is the default value since as of May 2017.
    end
  end
  if i.is_a? Array
    i = menu(i)
    i = i.join(' ').strip
  end
  i = i.to_s.dup
  @input = i
end

#set_original_commandline(i) ⇒ Object

#

set_original_commandline

#


719
720
721
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 719

def set_original_commandline(i)
  @original_commandline = [i].flatten.compact
end

#set_percentage(i) ⇒ Object

#

set_percentage

#


140
141
142
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 140

def set_percentage(i)
  @percentage = i.to_f
end

#set_title_of_the_curriculum(i) ⇒ Object Also known as: set_title

#

set_title_of_the_curriculum (set title tag)

#


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/studium/exams/mandatory_continuous_assessment/set_title_of_the_curriculum.rb', line 16

def set_title_of_the_curriculum(i)
  case i # case tag
  # ======================================================================= #
  # === bachelor_biologische_informatik
  # ======================================================================= #
  when :bachelor_biologische_informatik,
       :indi3
    i = 'Biologische Informatik'
  # ======================================================================= #
  # === bachelor_bioinformatik_und_molekulare_biotechnologie
  # ======================================================================= #
  when :bachelor_bioinformatik_und_molekulare_biotechnologie
    i = '(Bio)Informatik und molekulare Biotechnologie, unter Berücksichtigung medizinisch-immunologischer Aspekte'
  # ======================================================================= #
  # === :bachelor_dummy_curriculum
  # ======================================================================= #
  when :bachelor_dummy_curriculum
    i = 'Generic Dummy Curriculum'
  # ======================================================================= #
  # === :bachelor_vektoren
  # ======================================================================= #
  when :bachelor_vektoren,
       :bachelor_vector
    i = 'Bachelorcurriculum Vector-based strategies in Life Sciences, Molecular Medicine and Biotechnology'
    if File.exist? studium_directory_at_home?+'UNI_WIEN/Individuelles_Studium_an_der_Uni_Wien/Titel.md'
      # =================================================================== #
      # In this case use the main title stored in that file.
      # =================================================================== #
      i = 'Bachelorcurriculum '+File.readlines(
         "#{studium_directory_at_home?}UNI_WIEN/Individuelles_Studium_an_der_Uni_Wien/Titel.md"
      ).first.chomp
    end
  # ======================================================================= #
  # === :bachelor_master_vektoren
  # ======================================================================= #
  when :bachelor_master_vektoren
    _ =  studium_directory_at_home?+'UNI_WIEN/Individuelles_Studium_an_der_Uni_Wien/Titel.md'
    i = 'Bachelor-Mastercurriculum '+File.readlines(_).first.strip
  # ======================================================================= #
  # === :bachelor_informatik
  # ======================================================================= #
  when :bachelor_informatik,
       :informatik
    i = 'Bachelorcurriculum Informatik'
  # ======================================================================= #
  # === :bachelor_genetics
  # ======================================================================= #
  when :bachelor_genetics,
       :bachelor_genetik,
       :genetics
    i = 'Bachelorcurriculum Mikrobiologie und Genetik'
  # ======================================================================= #
  # === :master_vektoren
  # ======================================================================= #
  when :master_vektoren,
       :master_vector
    i = 'Mastercurriculum Vector-based strategies in Life Sciences, Molecular Medicine and Biotechnology'
  # ======================================================================= #
  # === :bachelor_pharmazie
  # ======================================================================= #
  when :bachelor_pharmazie,
       :bachelor_pharmazie_curriculum
    i = 'Bachelorcurriculum Pharmazie'
  # ======================================================================= #
  # === :master_pharmazie
  # ======================================================================= #
  when :master_pharmazie,
       :master_pharmazie_curriculum
    i = 'Mastercurriculum Pharmazie'
  # ======================================================================= #
  # === :bachelor_chemistry
  # ======================================================================= #
  when :bachelor_chemistry,
       :bachelor_chemie
    i = 'Bachelorcurriculum Chemie'
  # ======================================================================= #
  # === :master_immuno
  # ======================================================================= #
  when :master_immuno
    i = 'Mastercurriculum Molekulare Mikrobiologie, mikrobielle Ökologie und Immunbiologie'
  # ======================================================================= #
  # === :master_biologische_chemie
  # ======================================================================= #
  when :master_biologische_chemie,
       :master_biologische_chemie_curriculum
    i = 'Mastercurriculum Biologische Chemie'
  # ======================================================================= #
  # === :bachelor_mikrobiologie
  # ======================================================================= #
  when :bachelor_mikrobiologie
    i = 'Bachelorcurriculum Mikrobiologie, Biotechnologie und Bioinformatik'
  # ======================================================================= #
  # === :bachelor_technische_chemie
  # ======================================================================= #
  when :bachelor_technische_chemie
    i = 'Bachelorcurriculum Technische Chemie'
  # ======================================================================= #
  # === :bachelor_botanik
  # ======================================================================= #
  when :bachelor_botanik
    i = 'Bachelorcurriculum Botanik'
  # ======================================================================= #
  # === :master_genetik_und_entwicklungsbiologie
  # ======================================================================= #
  when :master_genetik_und_entwicklungsbiologie
    i = 'Mastercurriculum Genetik und Entwicklungsbiologie'
  # ======================================================================= #
  # === :bachelor_medizinische_informatik
  # ======================================================================= #
  when :bachelor_medizinische_informatik
    i = 'Bachelorcurriculum Medizinische Informatik (033533)'
  # ======================================================================= #
  # === :master_bioinformatik
  # ======================================================================= #
  when :master_bioinformatik,
       :master_bioinformatics
    i = 'Mastercurriculum Bioinformatik'
  # ======================================================================= #
  # === :master_molbio
  # ======================================================================= #
  when :bachelor_molekulare_biologie,
       :bachelor_molbio
    i = 'Bachelorcurriculum Molekulare Biologie'
  # ======================================================================= #
  # === :bachelor_agrarwissenschaften
  # ======================================================================= #
  when :bachelor_agrarwissenschaften,
       :bachelor_agrar
    i = 'Bachelorcurriculum Agrarwissenschaften'
  # ======================================================================= #
  # === :master_tuvienna_biotechnology
  # ======================================================================= #
  when :master_tuvienna_biotechnology,
       :master_tu_vienna_biotechnology
    i = 'Mastercurriculum TU Vienna Biotechnology'
  # ======================================================================= #
  # === :master_lmbt
  # ======================================================================= #
  when :master_lmbt,
       :master_biotech
    i = 'Mastercurriculum Biotechnology'
  # ======================================================================= #
  # === :bachelor_lmbt
  # ======================================================================= #
  when :bachelor_lmbt,
       :lmbt
    i = 'Bachelorcurriculum Lebensmittel- und Biotechnologie'
  # ======================================================================= #
  # === :master_molbio
  # ======================================================================= #
  when :master_molbio,
       :master_molekular_biologie
    i = 'Mastercurriculum Molekulare Biologie'
  # ======================================================================= #
  # === :bachelor_ernährungswissenschaften
  # ======================================================================= #
  when :bachelor_ernährungswissenschaften,
       :bachelor_nutrition_science
    i = 'Bachelorcurriculum Ernährungswissenschaften'
  else # We could report if we did not find something, but this can be spammy.
    # opnn; e 'No title found for the given input `'+sfancy(i.to_s)+'`.'
  end
  @title_of_the_curriculum = i.to_s
end

#show_all_available_curriculaObject

#

show_all_available_curricula

This is a powerhorse method - it will simply show all curricula and the respective “prüfungsimmanente Lehrveranstaltungen” in these curricula.

Invocation example:

mandatory --all_curricula
#


645
646
647
648
649
650
651
652
653
654
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 645

def show_all_available_curricula
  do_not_be_verbose
  _ = available_curricula?
  _.each_with_index {|curriculum, index| index += 1
    reset_this_instance
    set_input(curriculum)
    set_title(curriculum.to_sym)
    try_to_find_this_curriculum(curriculum, index) { :be_verbose }
  }
end

#show_coloured_spacer(n_times = 112) ⇒ Object

#

show_coloured_spacer

#


62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/studium/exams/mandatory_continuous_assessment/misc.rb', line 62

def show_coloured_spacer(
    n_times = 112
  )
  if @do_report_the_findings
    result = steelblue('-' * n_times)
    if block_given?
      yielded = yield
      if yielded.is_a? Hash
        if yielded.has_key? :n_ects
          n_ects = yielded.delete(:n_ects)
          result = result.dup if result.frozen?
          result << slateblue(
            (n_ects.to_s+' ECTS').rjust(12)
          )
        end
      end
    end
    e result
  end
end

#show_helpObject

#

show_help (help tag)

Display the following help-instructions like so from the commandline:

mandatory --help
#


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/studium/exams/mandatory_continuous_assessment/help.rb', line 21

def show_help
  e
  e "These options are available for "\
    "#{orange('class Studium::Exams::MandatoryContinuousAssessment')}:"
  e
  eparse '  --all       # show all mandatory continuous assessment '\
         'lectures that were already completed successfully'
  eparse '  --available # show the available curricula for '\
         'use with this class'
  e
  e "The other way to use this class is to pass in the "\
    "#{powderblue('name of a specific curriculum')}."
  e
  e 'The class will then figure out how much, in percent and '\
    'amount of ECTS numbers,'
  e 'that particular curriculum will have "prüfungsimmanente '\
    'Lehrveranstaltungen".'
  e
  e 'Usage examples:'
  e
  e lightseagreen('  mandatory vectorx')+'             '\
    '# vectorx ist Bachelor und Master kombiniert.'
  e "#{lightseagreen('  mandatory master-vectorx')}      "\
    "# Only show the master-lectures here"
  e lightseagreen('  mandatory --bachelor-genetics')+' '\
    '# the genetics curriculum at '\
    'the university of vienna'
  e
  e 'To show all curricula, do:'
  e
  epowderblue('  --all_curricula')
  e
  e 'To show passed exams per (specific) year, do:'
  e
  epowderblue('  --2017')
  epowderblue('  --2016')
  e
  e 'To show which mandatory lectures may be upcoming, you '\
    'can use any of the following:'
  e
  e '  mandatory --upcoming'
  e '  mandatory --todo'
  e '  mandatory --next'
  e
  e 'These will be sorted based on priority; higher priority '\
    'comes first'
  e
  e 'If you want to compare all registered (thus, available) '\
    'curricula, then use the following command:'
  e
  epowderblue('  mandatory --compare')
  e
  e 'And if you want more details:'
  e
  epowderblue('  mandatory --compare-detail')
  e
  e 'To only show master-lectures, try:'
  e
  epowderblue('  mandatory --only-master')
  e
  e 'If you only want lectures in the winter-semester, use this:'
  e
  epowderblue('  mandatory --wintersemester')
  e
  e 'To select only courses for summer or winter term, use either of the following:'
  e
  epowderblue('  mandatory --summer')
  epowderblue('  mandatory --winter')
  e
end

#show_upcoming_mandatory_continuous_assessments(use_this_dataset = @dataset_from_the_file_lecture_information) ⇒ Object

#

show_upcoming_mandatory_continuous_assessments

This method will show upcoming courses that have a mandatory assessment/attendance component (“prüfungsimmanente Lehrveranstaltungen”).

To invoke this method from the commandline, do:

mandatory --upcoming
#


81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'lib/studium/exams/mandatory_continuous_assessment/show_and_report.rb', line 81

def show_upcoming_mandatory_continuous_assessments(
    use_this_dataset = @dataset_from_the_file_lecture_information
  )
  _ = use_this_dataset
  # ======================================================================= #
  # First check if the commandline includes "master".
  # ======================================================================= #
  joined = commandline?.join(' ')
  if joined.include?('master') and joined.include?('only')
    _.select! {|name_of_the_lecture, inner_hash|
      curricula = obtain(:curricula, inner_hash)
      has_a_master_lecture?(curricula)
    }
  end
  # ======================================================================= #
  # Next, select only "prüfungsimmanente" courses:
  # ======================================================================= #
  _.select! {|name_of_the_lecture, inner_hash|
    lecture_type   = inner_hash[:type]
    already_solved = inner_hash[:already_solved]
    case lecture_type
    when *ARRAY_LECTURE_TYPES_THAT_ARE_MANDATORY_CONTINUOUS_ASSESSMENT
      keep_or_discard = true
    else
      keep_or_discard = false
    end
    # ======================================================================= #
    # Next, ignore the lectures that were already solved.
    # ======================================================================= #
    if already_solved
      keep_or_discard = false
    end
    keep_or_discard
  }
  # ======================================================================= #
  # Next, scan for filters. This is a bit hack-ish but for now it works.
  # ======================================================================= #
  if block_given?
    yielded = yield
    if yielded.is_a? Array
      joined = yielded.join(' ').strip
      # =================================================================== #
      # === übungen --summer
      # =================================================================== #
      if joined.include? '--summer'
        _.select! {|name_of_the_lecture, inner_hash|
          inner_hash[:semester] == 'summer'
        }
      end
      # =================================================================== #
      # === übungen --winter
      # =================================================================== #
      if joined.include? '--winter'
        _.select! {|name_of_the_lecture, inner_hash|
          inner_hash[:semester] == 'winter'
        }
      end
    end
  end
  # ======================================================================= #
  # Ok, we now have the courses that are "prüfungsimmanent" and NOT yet
  # solved.
  # ======================================================================= #
  display_these_lectures_sorted_by_priority(_)
end

#title_of_the_curriculum?Boolean Also known as: title?, name_of_the_curriculum?

#

title_of_the_curriculum?

#

Returns:

  • (Boolean)


987
988
989
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 987

def title_of_the_curriculum?
  @title_of_the_curriculum
end

#total_amount_of_ects_points_in_the_curriculum?Boolean Also known as: n_total_ects_points

#

total_amount_of_ects_points_in_the_curriculum

#

Returns:

  • (Boolean)


126
127
128
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 126

def total_amount_of_ects_points_in_the_curriculum?
  @total_amount_of_ECTS_points_in_the_curriculum
end

#total_amount_of_mandatory_continuous_assessment_ects_points_in_this_curriculum?Boolean Also known as: n_mandatory_ects_points_in_this_curriculum?, n_mandatory_ects_points_in_this_curriculum

#

total_amount_of_mandatory_continuous_assessment_ects_points_in_this_curriculum?

#

Returns:

  • (Boolean)


979
980
981
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 979

def total_amount_of_mandatory_continuous_assessment_ects_points_in_this_curriculum?
  @total_amount_of_mandatory_continuous_assessment_ECTS_points_in_this_curriculum
end

#try_to_find_this_curriculum(i, optional_index = nil) ⇒ Object

#

try_to_find_this_curriculum

The second argument to this method will also show the curriculum number (and the name of the curriculum).

#


157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/studium/exams/mandatory_continuous_assessment/mandatory_continuous_assessment.rb', line 157

def try_to_find_this_curriculum(
    i, optional_index = nil
  )
  if optional_index and @do_report_the_findings
    # ===================================================================== #
    # Report the curriculum number in this case.
    # ===================================================================== #
    e
    e springgreen('Curriculum number: ')+
      slateblue(optional_index.to_s)+
      limegreen(" (#{name_of_the_curriculum?})")
    e
  end
  be_verbose = be_verbose?
  if block_given?
    yielded = yield
    case yielded
    when :be_verbose
      be_verbose = true
    end
  end
  # ======================================================================= #
  # In the following when-entries, it may be better to hardcode the
  # path via a symbol such as :bachelor_mikrobiologie, since the
  # given input may be so disparate.
  # ======================================================================= #
  case i.delete('-') # case tag
  # ======================================================================= #
  # === bachelor_biologische_informatik
  # ======================================================================= #
  when /^-?-?bachelor(-|_)?biologische(-|_)?informatik$/i,
       /^-?-?indi3$/i
    array = readlines(location_of(:bachelor_biologische_informatik)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_bioinformatik_und_molekulare_biotechnologie
  # ======================================================================= #
  when /^-?-?bachelor(-|_)?bioinformatik(-|_)?und(-|_)?molekulare(-|_)?biotechnologie$/i
    array = readlines(location_of(:bachelor_bioinformatik_und_molekulare_biotechnologie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_dummy_curriculum
  # ======================================================================= #
  when /^-?-?bachelor(-|_)?dummy(-|_)?curriculum$/i,
       /^-?-?dummy$/i
    array = readlines(location_of(:bachelor_dummy_curriculum)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory vector_bachelor
  #
  # Show only the 180.0 ECTS Bachelor of the vector-curriculum.
  # ======================================================================= #
  when '4',
       /^vector_?bachelor/,
       /bachelor_?vector/,
       /^-?-?bachelor(-|_)?vectorx$/,
       /^-?-?bachelor_?vektor$/i,
       'bachelorvektorx',
       /^-?-?bachelor$/i, # Default entry point.
       'vectors',
       'vectorx',
       'vektorx',
       'vektor',
       /^-?-?bvektor$/i
    array = readlines(location_of(:bachelor_vektoren)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_informatik
  # ======================================================================= #
  when /^bachelor(_|-)?informatik$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_informatik)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :bachelor_informatik
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_technische_chemie
  # ======================================================================= #
  when /^bachelor(_|-)?technische(_|-)?chemie$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_technische_chemie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :bachelor_technische_chemie
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_vectorx
  #
  # This is for the master vector-curriculum, 120.0 ECTS.
  # ======================================================================= #
  when '1','vector','masterindividuell', # This is for 120.0 ECTS points.
       'vectormaster','mastervector',
       'mastervektorx','master',
       /^master(_|-)?vectorx$/,
       /^master(_|-)?vektor$/i,
       /^master(_|-)vector$/,
       /^mastervektoren$/
    do_assume_120_ects_points
    array = # readlines(location_of(:bachelor_vektoren))+
            readlines(location_of(:master_vektoren)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_molekularbiologie_curriculum
  # ======================================================================= #
  when /^bachelor(_|-)?molekularbiologie$/i,
       /^bachelor(_|-)?molekularbiologie(_|-)?curriculum$/i,
       /^bachelor(_|-)?molekularbiologie(_|-)?graz$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_molekularbiologie_curriculum)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :bachelor_molekularbiologie_curriculum
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_nutrition_science
  # ======================================================================= #
  when /^bachelor(_|-)?nutrition(_|-)?science$/i,
       '5','ern','ernährungswissenschaften'
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_nutrition_science)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :bachelor_nutrition_science
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_pharmazie
  # ======================================================================= #
  when /^bachelor(_|-)?pharmazie$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_pharmazie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :bachelor_pharmazie
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_biologische_chemie
  # ======================================================================= #
  when /^master(_|-)?pharmazie(_|-)?curriculum$/i,
       /^master(_|-)?pharmazie$/i,
       /^mpharmazie$/
    do_assume_120_ects_points
    array = readlines(location_of(:master_pharmazie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_pharmazie
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelor_chemie
  # ======================================================================= #
  when '7','chemie',
       /^bachelor_?chemie/,
       /^bachelor_?chemistry/
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_chemistry)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_biologische_chemie
  # ======================================================================= #
  when /^master(_|-)?biologische(_|-)?chemie$/i,
       /^biologische(_|-)?chemie$/i
    do_assume_120_ects_points
    array = readlines(location_of(:master_biologische_chemie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_biologische_chemie
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === master_genetik_und_entwicklungsbiologie
  # ======================================================================= #
  when /^master(-|_)?genetik(-|_)?und(-|_)?entwicklungsbiologie$/
    do_assume_120_ects_points
    array = readlines(location_of(:master_genetik_und_entwicklungsbiologie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_genetik_und_entwicklungsbiologie
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelor_mikrobiologie
  # ======================================================================= #
  when /^bachelor(_|-)?mikrobiologie$/i,
       /^bachelor(_|-)?microbiology$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_mikrobiologie)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_bioinformatik
  # ======================================================================= #
  when /^master(-|_)?bioinformatik$/,
       /^master(-|_)?bioinformatics$/
    do_assume_120_ects_points
    array = readlines(location_of(:master_bioinformatik)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_bioinformatik
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_medizinische_informatik
  # ======================================================================= #
  when /^-?-?bachelor(-|_)?medizinische(-|_)?informatik/
    do_assume_180_ects_points
    set_title :bachelor_medizinische_informatik
    array = readlines(location_of(i)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_biotech
  # ======================================================================= #
  when /^master(-|_)?biotech$/,
       /^master(-|_)?lmbt$/
    do_assume_120_ects_points
    array = readlines(location_of(:master_lmbt)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_biotech
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_botanik
  # ======================================================================= #
  when /^bachelor(_|-)?botanik$/i
    do_assume_180_ects_points
    set_title :bachelor_botanik
    array = readlines(location_of(i.to_sym)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_molekulare_biologie
  # ======================================================================= #
  when /^bachelor(_|-)?molekulare(_|-)?biologie$/i,
       /^bachelor(_|-)?molbio$/i
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_molbio)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === bachelor_agrarwissenschaften
  # ======================================================================= #
  when /^bachelor(_|-)?agrarwissenschaften$/i
    do_assume_180_ects_points
    array = readlines(location_of(i.to_sym)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === master_tu_vienna_biotechnology
  # ======================================================================= #
  when /^master(-|_)?tu(-|_)?vienna(-|_)?biotechnology$/
    do_assume_120_ects_points
    array = readlines(location_of(i.to_sym)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title :master_tu_vienna_biotechnology
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelor_lmbt
  # ======================================================================= #
  when '11',
       /^bachelor(_|-)?lmbt/,
       'lmbt',
       'lbt'
    do_assume_180_ects_points
    array = readlines(location_of(:bachelor_lmbt)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelor_genetics
  # ======================================================================= #
  when '6','genetics','genetik',/bachelor_?genetics?/,'genetic',
       /^bachelor(-|_)?genetics$/,
       /bachelor_?genetik/
    array = readlines(
      return_file_for_this_curriculum(
        :bachelor_biologie_mikrobiologie_und_genetik
      )
    )+readlines(location_of(:bachelor_biologie_basisblock)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    set_title 'Bachelorcurriculum Genetik'
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelor_master_vektoren
  #
  # This is only the full 300.0 ECTS curriculum.
  # ======================================================================= #
  when /bachelor_?master_?vektoren/i,
       /bachelor_?master_?vectorx/i,
       /bachelor_?master_?vector/i
    do_assume_300_points
    array = (readlines(location_of(:bachelor_vektoren)).flatten+
             readlines(location_of(:master_vektoren)).flatten).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_molbio
  #
  # The molbio master at the university of vienna, for 120.0 ECTS points.
  # ======================================================================= #
  when '2',
       /^-?-?master(_|-)?molbio/,
       /^-?-?molbio(_|-)?master/,
       'molbio' # mandatory --molbio_master
    do_assume_120_ects_points
    array = readlines(location_of(:master_molbio)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory bachelormasterimmuno
  #
  # This is the combination of the Biology basis building block, then
  # the genetic building block, and then the master immuno.
  # ======================================================================= #
  when /bachelor_?master_?immuno/
    do_assume_300_ects_points
    array = readlines(location_of(:bachelor_biologie_basisblock))+
            readlines(location_of(:bachelor_genetik))+
            readlines(location_of(:master_immuno)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory master_immuno
  # ======================================================================= #
  when '3',
       /-?-?master_?immuno/,
       /-?-?immuno_?master/, # mandatory --immuno_master
       'immuno'
    do_assume_120_ects_points
    array = readlines(location_of(:master_immuno)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  # ======================================================================= #
  # === mandatory tuvienna_biotechmaster
  # ======================================================================= #
  when '10',/tu_?vienna_?biotech_?master/
    do_assume_120_ects_points
    array = readlines(location_of(:master_tuvienna_biotechnology)).flatten
    array = return_entries_that_are_of_mandatory_continuous_assessment_type(array)
    padded_display_this_array_including_only_mandatory_continuous_assessment_lectures(array, be_verbose)
  else
    unless i.include? '--'
      opnn; e 'Unregistered input in the file '\
              'mandatory_continuous_assessment.rb: '+
              sfancy(i)+' (class: '+i.class.to_s+')'
    end
  end
end