FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
  1. Jun 22, 2023
  2. May 19, 2023
  3. May 05, 2023
  4. May 03, 2023
  5. Apr 28, 2023
    • Dr Catherine Pitt's avatar
      Consolidate some database access functionality · d3ef380f
      Dr Catherine Pitt authored
      - adds a function in the database module to look up email addresses
      for currently registered people and uses it to simplify
      chemistry_starters.utils.mail_safety_induction_signoff
      
      - completely remove
      chemistry_starters.safety.get_safety_induction_signer as it can be done
      with database.get_form_column
      
      - update tests
      d3ef380f
    • Dr Catherine Pitt's avatar
      Email form creator when safety checklist submitted · 8573b7c5
      Dr Catherine Pitt authored
      Requested in RT 226948 where we were asked to inform the form creator
      when the personal details and safety checklist had both been completed.
      
      It seems unlikely that a single email at this point in the process is
      really all that is wanted, so this change adds a new function to send an
      email with a progress report to the form creator, and calls that when
      the safety form is submitted. If we're asked to send emails at other
      stages too we can just call that function again.
      
      It also adds a function to get the email address of a currentty
      registered person from their database id. This can be reused elsewhere.
      8573b7c5
  6. Apr 13, 2023
    • Dr Catherine Pitt's avatar
      Exclude safety handbook placeholder file from packaging · 032ad64e
      Dr Catherine Pitt authored
      The placeholder safety handbook is only there for testing purposes, so
      does not go into the Debian package.
      032ad64e
    • Dr Catherine Pitt's avatar
      Merge branch 'safety_handbook' into 'main' · 573426e8
      Dr Catherine Pitt authored
      App provides safety handbook
      
      See merge request !5
      v57
      573426e8
    • Dr Catherine Pitt's avatar
      Fix failure to send email on student safety training signoff · d434801b
      Dr Catherine Pitt authored
      The endpoint for signing off student safety training failed to email the
      admin team when an application is complete. This change fixes that.
      d434801b
    • Dr Catherine Pitt's avatar
      Provide safety handbook link on new forms page · e0ebe284
      Dr Catherine Pitt authored
      We have an endpoint for this so we might as well use it.
      e0ebe284
    • Dr Catherine Pitt's avatar
      Add tests for safety handbook · c6294cf9
      Dr Catherine Pitt authored
      c6294cf9
    • Dr Catherine Pitt's avatar
      Fix token checking bug on safety checklists · 5acb20c1
      Dr Catherine Pitt authored
      There's an endpoint that allows downloading of a PDF copy of a person's
      safety checklist. It's supposed to check that REMOTE_USER is set to a
      member of the Department, and also that a valid time-limited token for
      the safety checklist was provided. Because of an ordering problem on the
      applied decorators these checks were not being done. This is not quite
      as bad as it sounds because the webserver would still be enforcing that
      Raven authentication had happened, although anyone with Raven would have
      passed, and the missing token check didn't matter because the endpoint
      needs to decode the token later on, so the necessary check happened
      there instead.  The decorator to check the token also had an incorrect
      argument which is fixed too.
      
      The upshot was that if anyone with a working Raven password and not a
      member of the department also had access to a valid time limited token
      for this endpoint they could theoretically have downloaded someone's
      safety checklist that they should not have had access to.
      5acb20c1
    • Dr Catherine Pitt's avatar
      Provide link to safety handbook from safety checklist form · cd897435
      Dr Catherine Pitt authored
      The starter needs the safety handbook to complete their safety checklist
      form. While they should have already been emailed a copy, they could
      have lost it. This change adds an endpoint where a user with a valid token
      can download the secret handbook, and updates the safety checklist
      page to have a link to that. If the handbook hasn't been provided to the
      app it tells the starter to go and ask their group admin instead.
      cd897435
    • Dr Catherine Pitt's avatar
      Catch BadTimeSignature in check_token decorator · e083e476
      Dr Catherine Pitt authored
      This is another possible exception that can be thrown by a bad token, so
      we should handle it.
      e083e476
    • Dr Catherine Pitt's avatar
      Attach safety handbook to new starter emails if available · 201d373f
      Dr Catherine Pitt authored
      If the safety handbook is available, add it as an attachment to the new
      starters email.
      201d373f
    • Dr Catherine Pitt's avatar
      Provide a endpoint for safety handbook for form generators · d67b4d3a
      Dr Catherine Pitt authored
      This provides and endpoint for group admins to get the safety handbook
      from so they can easily give a copy to their new starters. The endpoint
      checks REMOTE_USER which is set by the use of Raven protection, so only
      members of the department allowed to generate registration forms can
      access it.
      
      The form generation page is updated to warn if the handbook is not
      available. Later we'll link the handbook here if it is available.
      d67b4d3a
  7. Apr 12, 2023
    • Dr Catherine Pitt's avatar
      Add function to check if safety handbook is available · 9c36f5c3
      Dr Catherine Pitt authored
      Because we can't commit the secret safety handbook to this repository we
      need to ensure that the application behaves well if we should
      accidentally deploy it without giving it access to a copy. This adds a
      function to check that.
      9c36f5c3
    • Dr Catherine Pitt's avatar
      Add config for including safety handbook PDF · f6c7d63f
      Dr Catherine Pitt authored
      The safety handbook can no longer be made available on our website
      without password protection (see RT 226276) and so this application must
      have access to a copy and be able to serve it up to people who request
      it and are authorized to see it. This change adds a 'documents'
      directory to hold the handbook PDF and possibly other sensitive
      documents, a placeholder file to use in tests of the handbook
      functionality, and config to tell the application the filename to find
      the handbook at. The real handbook can't be committed to this
      repository as it's public.
      f6c7d63f
  8. Mar 16, 2023
  9. Jan 24, 2023
    • Dr Catherine Pitt's avatar
      Merge branch 'navigation_improvements' into 'main' · e2e909dd
      Dr Catherine Pitt authored
      Improvements to navigation
      
      See merge request !4
      v55
      e2e909dd
    • Dr Catherine Pitt's avatar
      Improvements to navigation · 81417497
      Dr Catherine Pitt authored
      People are still failing to complete the safety stages of registration.
      
      This change adds styling to the 'tasks to be done' sections of the main
      navigation template to try to make it even clearer that there's more
      than one thing to be done. Because this trains the user to take action
      on items coloured pink and therefore they may now ignore everything
      else, I've also styled the reminder about getting a photograph taken to
      match even though it's something that happens outside this system.
      
      The submit button text on the personal details form is also updated to
      imply there are subsequent tasks after that form is submitted.
      81417497
    • Dr Catherine Pitt's avatar
      Merge branch 'photograph_changes' into 'main' · 6d8b2788
      Dr Catherine Pitt authored
      Replace photo uploads with reminder to make appointment
      
      Closes #9
      
      See merge request !3
      6d8b2788
    • Dr Catherine Pitt's avatar
      Replace photo uploads with reminder to make appointment · 469f8f93
      Dr Catherine Pitt authored
      Instead of having people upload photographs and affirm they've done this
      we now want to ask them to make an appointment with Photography to have
      a photo taken in-house. ( RT 224010 ).
      
      This removes the personal data form question about uploading photos and
      replaces the instructions for the photo with a pointer to Photography.
      The photo upload URL setting is removed as it's no longer needed. The
      navigation page template is updated to include a reminder to arrange for
      a photograph to be taken once the registration is complete. The email to
      Photography is retained, as that's how they will keep track of who needs
      to be photographed, but the text is updated.
      
      Closes #9 as we no longer need to implement this.
      469f8f93
  10. Nov 24, 2022
    • Dr Catherine Pitt's avatar
      v54
      da6f4c1f
    • Dr Catherine Pitt's avatar
      Post category picklists have no default · ca7c75a0
      Dr Catherine Pitt authored
      We've been having problems with Visitors selecting 'Embedded company
      staff' as their post category when they very clearly are not; embedded
      company staff don't get Chemistry IT resources and so we find this out
      when we get tickets about them not having access to things they should.
      The most obvious reason for the bad choice is that it's the default
      selection and they simply don't read the form carefully enough.
      
      This commit changes the post category questions on the various types of
      from to have no default entry, hopefully encouraging people to make a
      considered choice.
      ca7c75a0
  11. Oct 27, 2022
    • Dr Catherine Pitt's avatar
      Fix tests to reflect template changes · 2eb39a44
      Dr Catherine Pitt authored
      The previous commit changed a template which affected one of the tests.
      This updates the text to be matched.
      2eb39a44
    • Dr Catherine Pitt's avatar
      Put incomplete tasks first on navigation page · 1c7166f0
      Dr Catherine Pitt authored
      Some people are still filling in the personal details form but
      apparently not noticing the instruction that they also need to complete
      their safety checklist. They are then surprised when their registration
      doesn't go through because they thought it was complete. This causes
      extra work for the admin team and delay for the starter.
      
      This change moves the list of incomplete tasks to the top of the
      navigation page in the hope that they will be easier to notice there.
      The header text for incomplete tasks is updated to be in <em> tags to
      match other sections containing things that need action.
      1c7166f0
  12. Oct 26, 2022
    • Dr Catherine Pitt's avatar
      Remove DTC Postgrads as a category · 113b710e
      Dr Catherine Pitt authored
      DTC postgrads do an initial year where they are not assigned to any
      particular group or even department; they cycle around a few. Because of
      this there have been issues with them being unable to get a safety
      induction at Chemistry in order to complete a registration, and Alice
      Wood has suggested they should instead get signed in as short term
      visitors for the occasions on which they need to physically enter the
      department.
      
      Once they finish their initial year and get assigned to a research group
      in Chemistry they can and should register with us as ordinary postgraduate
      students.
      
      This change removes all the logic for the DTC postgraduate category from
      the app. We also need to clean up a reference in the database view
      registration.crsids_allowed_to_generate_forms in the database although
      the example SQL here has been updated.
      113b710e
  13. Oct 19, 2022
    • Dr Catherine Pitt's avatar
      Merge branch 'require_crsids_for_postgrads' into 'main' · 2d52de45
      Dr Catherine Pitt authored
      Better help for crsid field, compulsory for postgrads
      
      Closes #71
      
      See merge request !1
      2d52de45
    • Dr Catherine Pitt's avatar
      Better help for crsid field, compulsory for postgrads · 2e722d1c
      Dr Catherine Pitt authored
      This year we have had several postgrads fail to enter their CRSID on
      their registration form. This was missed when the forms were imported
      which led to several duplicate entries in the database requiring tedious
      manual merging.
      
      I believe all postgrads have a CRSID at the point they register with us,
      as they're issued when they apply to Cambridge, so there's no reason we
      should not make it compulsory to enter it. Other categories may not have
      CRSIDs at the point of registration and so the field must remain
      optional for them. This change makes the CRSID field compulsory for
      postgraduates, including DTC postgraduates.
      
      The change includes more assistance with putting the right thing into
      the CRSID field. The field now always has a placeholder value that
      matches the one used by Raven, and for the postgraduates an explanation
      that the CRSID is the thing before @cam.ac.uk in their email address. I
      have not added that explanation for other categories as they won't
      necessarily have a Cambridge email address.
      2e722d1c
  14. Oct 13, 2022
    • Dr Catherine Pitt's avatar
      WSGI uses daemon mode · 68b0c159
      Dr Catherine Pitt authored
      A regular annoyance with this application is needing to restart Apache
      to reload it when the code changes. If we run it in WSGI daemon mode
      rather than embedded mode it will automatically restart when
      starters.wsgi changes, which is an improvement.
      v53
      68b0c159
    • Dr Catherine Pitt's avatar
      All forms reload hid choices on instantation · 392d7e2a
      Dr Catherine Pitt authored
      The forms that load lists of choices from the database do that at class
      definition time, so every instantiated form inherits the lists loaded
      when the app started up. This is annoying when things change in the
      database because the changes are not reflected until the webserver
      restarts.
      
      This change overrides the WTForms form constructor where needed to load
      the choices there instead, so they are loaded fresh for every
      instantiation of a form object. It supercedes and so undoes the change
      in the previous commit which manually reloaded the list of safety
      signers.
      v52
      392d7e2a
    • Dr Catherine Pitt's avatar
      Reload supervisors list when safety form loaded · 74c5c2ee
      Dr Catherine Pitt authored
      See RT 221400. The list of people who are allowed to sign off safety
      forms is generated from the database. Because of the way WTForms works,
      the list is set when the code to define the safety form class is first
      run, and each safety form instance that is created gets the same list
      from the class. This is annoying when new people have been added to the
      list, as the applicaton doesn't see them until it restarts and hence
      re-runs the code to define the class.
      
      This change reloads the choices on the safety induction signer field on
      instances of the safety form immediately after they are created in the
      safety checklist view, thus immediately picking up new signers.
      74c5c2ee
Loading