File attachments aren't copied when note is copied

Bug #1390833 reported by Kristina Hoeppner on 2014-11-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Son Nguyen
1.10
Medium
Son Nguyen
1.8
Medium
Unassigned
1.9
Medium
Unassigned

Bug Description

reported by Stephen Bright on MyPortfolio:

When you have a note (text box up to 1.10), file attachments are not copied when somebody else copies the page that contains the note. When you yourself copy it, the attachment is retained, but not when somebody else copies it.

To reproduce:

1. Add a note to your page.
2. Add an attachment to the note.
3. Share the page with someone else and make it copyable.
4. Log in as that other person and copy the page.
5. The attachment is not on the page anymore.

Aaron Wells (u-aaronw) on 2014-11-09
Changed in mahara:
importance: Undecided → High
Robert Lyon (robertl-9) wrote :

What I suspect the problem here is:

When you copy your page the system checks to see if you have access to the artefact (which you do as they are your artefacts) and if so adds it as an attachement to the new page's note artefact.

But when another user copies the page the it checks the artefacts and says they don't have access to the artefact so doens't copy/add them to the new page's note artefact.

What I think will need to be done is to check the permission of the artefact in relation to original note block and page it was on.

Son Nguyen (ngson2000) on 2014-11-27
Changed in mahara:
assignee: nobody → Son Nguyen (ngson2000)
status: Confirmed → In Progress
Eduardo (o-eduardo) wrote :

Full testing method:

1. Log in as Admin
2. Go to Administration → Users → Add User “Bob”
3. Return to Site → Go to Portfolio → Create page “Testing page 1” → Save
4. “Expand General” node
5. Select “Note”
6. Click on Add a file → Add file
7. Click Save
8. Go to Share page
9. Share page with “Public”
10. Expand Advanced options
11. Check “Allow copying”
12. Click Save
13. Log out as Admin → Log in as user “Bob”
14. Go to Portfolio → Copy a page
15. Click “Testing page 1 copy page” button
16. Click Save
17. You should see “Note” with attached file → Passed
19. Click on Display page
20. Expand “Attached files” node
21. You should see the attached files → Passed
22. Go to Content → Files
23. You should see a folder “viewfiles” → Passed
24. Click “viewfiles” → You should see “Files copied from Testing page 1” → Passed

Reviewed: https://reviews.mahara.org/4045
Committed: http://gitorious.org/mahara/mahara/commit/925c5db114eb44cb6ae3678ef2d8a45e5c6a4708
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 925c5db114eb44cb6ae3678ef2d8a45e5c6a4708
Author: Son Nguyen <email address hidden>
Date: Fri Nov 28 11:19:04 2014 +1300

Add the method update_artefact_references() to HTML artefact (Note)

Bug 1390833

This will update all attachments to the artefact

Change-Id: Idc06d5ce35b2427575b44d53f4aa56dfc7b01cf8
Signed-off-by: Son Nguyen <email address hidden>

Robert Lyon (robertl-9) on 2015-02-24
Changed in mahara:
status: In Progress → Fix Committed

Reviewed: https://reviews.mahara.org/4315
Committed: http://gitorious.org/mahara/mahara/commit/852534f2142c01b5679fc8a236f5a7b8d60dd866
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.8_STABLE

commit 852534f2142c01b5679fc8a236f5a7b8d60dd866
Author: Son Nguyen <email address hidden>
Date: Fri Nov 28 11:19:04 2014 +1300

Add the method update_artefact_references() to HTML artefact (Note)

Bug 1390833

This will update all attachments to the artefact

Change-Id: Idc06d5ce35b2427575b44d53f4aa56dfc7b01cf8
Signed-off-by: Son Nguyen <email address hidden>

Reviewed: https://reviews.mahara.org/4316
Committed: http://gitorious.org/mahara/mahara/commit/ab4302ad60bee52b0307dbbe29159317e37c4076
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.9_STABLE

commit ab4302ad60bee52b0307dbbe29159317e37c4076
Author: Son Nguyen <email address hidden>
Date: Fri Nov 28 11:19:04 2014 +1300

Add the method update_artefact_references() to HTML artefact (Note)

Bug 1390833

This will update all attachments to the artefact

Change-Id: Idc06d5ce35b2427575b44d53f4aa56dfc7b01cf8
Signed-off-by: Son Nguyen <email address hidden>

Reviewed: https://reviews.mahara.org/4317
Committed: http://gitorious.org/mahara/mahara/commit/155f9f203562de2cce94f73d46040a268f00cc2a
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 155f9f203562de2cce94f73d46040a268f00cc2a
Author: Son Nguyen <email address hidden>
Date: Fri Nov 28 11:19:04 2014 +1300

Add the method update_artefact_references() to HTML artefact (Note)

Bug 1390833

This will update all attachments to the artefact

Change-Id: Idc06d5ce35b2427575b44d53f4aa56dfc7b01cf8
Signed-off-by: Son Nguyen <email address hidden>

Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers