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

file upload question, in student view, remove link doesn't remove the uploaded file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.1, 2.7.0
    • Labels:
      None
    • Environment:
      Sakai 2.6rc01, rc06, MacOSX, mysql 4.1.22
    • Previous Issue Keys:
      SAK-16761, SAM-722

      Description

      On assessment contains file upload questions, the remove link doesn't work .
      From the student view, when you try to remove the uploaded file by clicking remove link, after the remove confirm page, the file still shows on the assessment page. From the database, the record of that intended removed file is still in the DB table, SAM_MEDIA_T.

      Steps to reproduce the problem:
      1. Create and publish a new assessment with one question of type 'File Upload'
      2. As a student, take the assessment and respond to the question by clicking 'Choose File', selecting a file, then clicking 'Upload'.
      3. Attempt to remove that file by clicking the 'Remove' link next to the file name, then clicking the 'Remove' button on the confirmation screen. The file should still show when the browser returns you to the question page.
      4. Repeat step 3, the browser should take a lot longer to respond. You should eventually get sent back to the question page where the file still persists.

      The problem is in AssessmentGradingFacadeQuesries.java,
      function removeMediaById(Long mediaId, Long itemGradingId),
      after
      statement.executeUpdate();

      There is no commit statement to commit the change. It assumes that auto-commit is true, the change will be auto-committed to the DB when the connection is closed. But this is not always the case.
      the fix should be:

      after statement.executeUpdate();
      add:

      if (!conn.getAutoCommit())
      conn.commit();

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                kimhuang Kim Huang (Inactive)
                Reporter:
                kimhuang Kim Huang (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 hour
                    1h
                    Remaining:
                    Remaining Estimate - 1 hour
                    1h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified

                      Git Integration