Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33382

Model answers set to display after submission are visible if the student saves as draft

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 11.3
    • Fix Version/s: 12.0, 19.0
    • Component/s: Assignments
    • Labels:
    • 12 status:
      Resolved
    • 11 status:
      Won't Fix
    • Test Plan:
      Hide

      1) Create an assignment that has a model answer set to be shown after students submit
      2) Access the assignment as a student user; save as draft
      3) Access the assignment as the same student user again; model answer is shown (but it shouldn't be)

      Show
      1) Create an assignment that has a model answer set to be shown after students submit 2) Access the assignment as a student user; save as draft 3) Access the assignment as the same student user again; model answer is shown (but it shouldn't be)

      Description

      Saving as draft allows the student to see the model answer, even though they technically haven't submitted.

      This is technically a regression introduced in SAK-32436, by removing the check on s.getSubmitted(). Before Earle's Assignments refactor, the JavaDocs for this property indicated it's used to determine draft status:

      	/**
      	 * Get whether this is a final submission.
      	 * 
      	 * @return True if a final submission, false if still a draft.
      	 */
      	public boolean getSubmitted();
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  agschmidt Andrea Schmidt
                  Reporter:
                  bjones86 Brian Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code