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

Web service for finding & fixing broken attachments in Samigo pools

    XMLWordPrintable

    Details

    • Test Plan:
      Hide

      -Add one user X to a site A.
      -Enter as X and browse to site A.
      -Edit a pool and add a question with:
      1) One attachment added in CKEditor from site's resources.
      2) One attachment added in CKEditor uploaded from user's local computer.
      3) One equation added from fMath editor inside CKEditor.
      4) Out of CKEditor, one file added as attachment from site's resources.
      5) Out of CKEditor, one file uploaded from user's local computer.
      -Delete user X from site A.
      -Enter as user X in another site B and edit the pool question. All attachments are broken.
      -Run the web service passing user X, poolId and site B as parameters. Attachments will be copied into site B and will be fixed in the pool.

      Show
      -Add one user X to a site A. -Enter as X and browse to site A. -Edit a pool and add a question with: 1) One attachment added in CKEditor from site's resources. 2) One attachment added in CKEditor uploaded from user's local computer. 3) One equation added from fMath editor inside CKEditor. 4) Out of CKEditor, one file added as attachment from site's resources. 5) Out of CKEditor, one file uploaded from user's local computer. -Delete user X from site A. -Enter as user X in another site B and edit the pool question. All attachments are broken. -Run the web service passing user X, poolId and site B as parameters. Attachments will be copied into site B and will be fixed in the pool.

      Description

      Samigo pools manage images and attachments in a weird way that has caused for us a lot of trouble in the past. Though pools are related to users and only visible by them, their images and attachments are stored in private resources of the site where user is working in the moment of creating the pool.

      When user lose access to the site where pool attachments were stored, those attachments are not available in the pool anymore.

      This issue is currently being addressed in SAM-2257 but, while it is not finished, attachments keep giving trouble. So I have done a webservice which, for a specified user, search in their pools looking for broken attachments, returns a report with all the found info and, optionally, fixes the broken attachments doing a copy in another site context and replacing the link to the new one.

      The webservice needs to add some new code into Samigo QuestionPoolService.

      I have attached a client example too. It needs CXF libraries to compile.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  daniel.merino Daniel Merino Echeverría
                  Reporter:
                  daniel.merino Daniel Merino Echeverría
                  Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration