Verified Commit 8a84be86 authored by Taico Aerts's avatar Taico Aerts
Browse files

Add settings for kicking users

parent 795a1b21
......@@ -12,6 +12,10 @@
updateField('allow_external', true);
updateField('project_preference', true);
updateField('allow_project_course_edition_update', true);
updateField('intended_groups_per_user', true);
updateField('kick_from_interest_list_on_max_approved', true);
updateField('kick_from_group_on_max_approved', true);
} else if (curval === "thesis_workflow") {
updateField('min_group_size', false, '1');
updateField('max_group_size', false, '1');
......@@ -23,6 +27,10 @@
updateField('allow_external', false);
updateField('project_preference', false);
updateField('allow_project_course_edition_update', false);
updateField('intended_groups_per_user', false);
updateField('kick_from_interest_list_on_max_approved', false);
updateField('kick_from_group_on_max_approved', false);
} else if (curval === "experiment_workflow") {
updateField('min_group_size', true, '1');
updateField('max_group_size', true, '1');
......@@ -34,6 +42,10 @@
updateField('allow_external', false);
updateField('project_preference', true);
updateField('allow_project_course_edition_update', false);
updateField('intended_groups_per_user', false);
updateField('kick_from_interest_list_on_max_approved', false);
updateField('kick_from_group_on_max_approved', false);
}
}
......@@ -85,19 +97,31 @@
:max_group_size,
:min_number_of_groups,
:max_number_of_groups,
:max_number_of_interests
:max_number_of_interests,
:intended_groups_per_user
].each do |field| %>
<% extra = t("activerecord.attributes.course_configuration.extra.#{field}") %>
<tr id="<%= field %>">
<td><%= f.number_field field, required: true, min: 1 %></td>
</tr>
<% end %>
<tr>
<td>
<div id="allow_internal"><%= f.check_box :allow_internal %></div>
<div id="allow_external"><%= f.check_box :allow_external %></div>
<div id="open_enrolment"><%= f.check_box :open_enrolment %></div>
<div id="project_preference"><%= f.check_box :project_preference %></div>
<div id="allow_project_course_edition_update"><%= f.check_box :allow_project_course_edition_update %></div>
<% [
:allow_internal,
:allow_external,
:open_enrolment,
:project_preference,
:allow_project_course_edition_update,
:kick_from_interest_list_on_max_approved,
:kick_from_group_on_max_approved
].each do |field| %>
<% extra = t("activerecord.attributes.course_configuration.extra.#{field}", default: '') %>
<div id="<%= field %>">
<%= f.check_box field %>
<%= popover(extra) unless extra.blank? %>
</div>
<% end %>
</td>
</tr>
</tbody>
......
......@@ -12,8 +12,14 @@
<%
case @configuration.workflow
when 'default_workflow'
project_configs = [:min_number_of_groups, :max_number_of_groups, :min_group_size, :max_group_size]
project_config_booleans = [:allow_internal, :allow_external, :allow_project_course_edition_update, :project_preference]
project_configs = [:min_number_of_groups, :max_number_of_groups, :min_group_size, :max_group_size, :intended_groups_per_user]
project_config_booleans = [
:allow_internal, :allow_external,
:allow_project_course_edition_update,
:project_preference,
:kick_from_interest_list_on_max_approved,
:kick_from_group_on_max_approved
]
when 'experiment_workflow'
project_configs = [:min_group_size, :max_group_size]
project_config_booleans = [:project_preference]
......@@ -30,7 +36,11 @@
] %>
<% configs.each do |field| %>
<tr>
<td><strong><%= CourseConfiguration.human_attribute_name field %></strong></td>
<td>
<strong><%= CourseConfiguration.human_attribute_name field %></strong>
<% extra = t("activerecord.attributes.course_configuration.extra.#{field}", default: '') %>
<%= popover(extra) unless extra.blank? %>
</td>
<td><%= t @configuration.send(field).to_s %></td>
</tr>
<% end %>
......
......@@ -406,11 +406,55 @@ en:
allow_external: Allow companies to offer projects
project_preference: Let students indicate their project preferences
allow_project_course_edition_update: Allow client to move projects to another course edition
intended_groups_per_user: Intended number of groups per student
kick_from_interest_list_on_max_approved: Upon group (client) approval, remove student from interest lists
kick_from_group_on_max_approved: Upon group (client) approval, remove student from other groups
workflow: Workflow
workflows:
default_workflow: Default projects with groups
thesis_workflow: Theses organised by theme
experiment_workflow: Experiment projects in couples
extra:
min_group_size: >-
A group needs at least this many members before it is considered valid. Invalid groups cannot be locked by students and cannot be approved by
clients. Course coordinators can manually override the approval for groups if necessary.
max_group_size: >-
A group can have at most this many members before it is considered invalid. Invalid groups cannot be locked by students and cannot be approved by
clients. Course coordinators can manually override the approval for groups if necessary.
min_number_of_groups: >-
The minimum number of groups that is required for a project to go through. If this is set to a value greater than 1, then the grouping algorithm
will either assign at least this number of groups to a project, or will assign no groups to a project.
max_number_of_groups: >-
The maximum number of groups that can do the same project. Clients can no longer accept groups for a project if the maximum number of groups for
that project has been reached. If this is set to a value greater than 1, then the grouping algorithm will at most assign this number of groups to
a project.
max_number_of_interests: >-
Each student is allowed to express interest in at most this amount of projects. Once they reach this limit, they cannot express interest into other
thesis projects until they revoke one of their existing interests.
intended_groups_per_user: >-
When you want each student to end up in one group, set this number to 1.
If you want each student to end up in multiple groups, set this number higher.
allow_internal: >-
Allow TU Delft employees to offer projects for this course. If disabled, TU Delft employees cannot offer projects for this course.
allow_external: >-
Allow external users (companies) to offer projects for this course. If disabled, external users cannot offer projects for this course.
project_preference: >-
Instead of students creating groups for projects themselves, students instead give their preferences for projects and students
allow_project_course_edition_update: >-
Allow clients (those who offer projects) to move their projects to another course edition. This is useful if older projects are still valid for a
newer edition of the course. Please note that you can also move these projects yourself with the 'import projects from other course editions'
button.
kick_from_interest_list_on_max_approved: >-
Whenever a student is in the intended number of groups per student (usually 1) and all these groups get approved by the client, the student will be
removed from all the interest lists. This clears people from interest lists which can no longer become part of other groups anyway (recommended).
kick_from_group_on_max_approved: >-
Whenever a student is in the intended number of groups per student (usually 1) and all these groups get approved by the client, the student will be
removed from any other groups they are in. This prevents a scenario where one student gets approved for multiple projects, which then has to be
fixed manually.
open_enrolment: >-
If enabled, students can enrol in this course freely. If disabled, students are presented with a question if they meet the requirements of the
course as well as an option to fill out information for a possible exemption. This information can then be reviewed to only accept the right
people.
course_participation:
id: ID
......@@ -428,7 +472,9 @@ en:
questions:
description: Describe the situation and what you are requesting.
circumstances: Were there special circumstances that disallowed you to meet the acceptance criteria?
planning: What does your planning look like until the end of the bachelor's programme, in case you are allowed to participate in this course? (Please break down your planning in quarters of the academic year, and include the ECTS involved.)
planning: >-
What does your planning look like until the end of the bachelor's programme, in case you are allowed to participate in this course?
(Please break down your planning in quarters of the academic year, and include the ECTS involved.)
deadline:
id: ID
......
class AddIntendedGroupsPerUserAndInterestKickToCourseConfiguration < ActiveRecord::Migration[5.2]
def change
add_column :course_configurations, :intended_groups_per_user, :integer, default: 1, null: false
add_column :course_configurations, :kick_from_interest_list_on_max_approved, :boolean, default: false, null: false
add_column :course_configurations, :kick_from_interest_list_on_max_approved, :boolean, default: true, null: false
add_column :course_configurations, :kick_from_group_on_max_approved, :boolean, default: false, null: false
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment