Add-ons
  1. Add-ons
  2. CONTRIB-1336

Option to allow or disallow overbooking of students by teacher or specified role

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4
    • Fix Version/s: 1.9.5
    • Component/s: Module: FaceToFace
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      36537

      Description

      Currently the capacity for a session is only enforced at the student level, meaning that a student cannot book themselves into a session that is full. Those with the capability to add/remove attendees also have the ability to add more students then is listed in the capacity of the session. We need to have the ability to set whether or not overbooking is allowed (probably a sitewide admin setting) and a separate capability to determine who has the ability to overbook students into a session.

        Activity

        Hide
        Simon Coggins added a comment -

        Here's a patch which provides this feature (contrib-1336.patch.txt).

        Some notes:

        • I've created a new function facetoface_session_has_capacity() in lib.php which checks if a session can be filled, taking overbooking into account
        • This function is used to enforce bookings and also to determine if the sign-up link should be shown on various pages.
        • In order to overbook the global setting must be set (default is set to off), and the user must have the overbook capability. By default admin, course creator and editing and non-editing teachers have it enabled.
        • This patch updates the database so I wouldn't apply it to a live site until it's been accepted. Scott, if you've previously applied the other patch you might need to increment the version number in version.php again to get it to upgrade the database.
        • I've made changes to the English language file so translations are required
        • Note that when sessions are overbooked the capacity can go negative on the view all sessions screen. I'm assuming that is the desired behaviour.
        Show
        Simon Coggins added a comment - Here's a patch which provides this feature (contrib-1336.patch.txt). Some notes: I've created a new function facetoface_session_has_capacity() in lib.php which checks if a session can be filled, taking overbooking into account This function is used to enforce bookings and also to determine if the sign-up link should be shown on various pages. In order to overbook the global setting must be set (default is set to off), and the user must have the overbook capability. By default admin, course creator and editing and non-editing teachers have it enabled. This patch updates the database so I wouldn't apply it to a live site until it's been accepted. Scott, if you've previously applied the other patch you might need to increment the version number in version.php again to get it to upgrade the database. I've made changes to the English language file so translations are required Note that when sessions are overbooked the capacity can go negative on the view all sessions screen. I'm assuming that is the desired behaviour.
        Hide
        Francois Marier added a comment -

        I have just committed this to CVS.

        However, I didn't add the new site-wide setting.

        By default, teachers are allowed to overbook sessions, but not students. However by adding/removing the new capability to the appropriate role, a site administrator can effectively change the default site policy.

        Show
        Francois Marier added a comment - I have just committed this to CVS. However, I didn't add the new site-wide setting. By default, teachers are allowed to overbook sessions, but not students. However by adding/removing the new capability to the appropriate role, a site administrator can effectively change the default site policy.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development