File attachments to forum posts

Bug #1440916 reported by Dirk Meyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Robert Lyon

Bug Description

Currently, a user is able to add files to feedback on a page and comments on an artifact but not in a forum post. It seems to be a valuable feature for enhancing discussion.

Thanks to Recording Arts Canada and Verein zur Förderung eines Offenen Deutschen Schul-Netzes for sponsoring this feature.

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Wishlist
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Dirk,

Do you want it to work similarly to notes where you can attach files and they are then shown in retracted with "Attached files" and the number of the attached files or did you have something else in mind?

Cheers
Kristina

Changed in mahara:
status: New → Confirmed
Revision history for this message
Aaron Wells (u-aaronw) wrote :

I'm surprised we didn't already have a wishlist item for attachments for forum posts! In fact, when we were discussing the new TinyMCE image button (which lets you put your Mahara images into forum posts) I assumed there was a wishlist item for file attachments as well: https://mahara.org/interaction/forum/topic.php?id=6221&offset=10

Well, I'm for this. It would be a medium-small bit of work. Requires adding the image picker to the forum post screen (can copy the code for that from the comments screen), and we'd need to add some data structures in the database to keep track of which files are attached to which forum posts. For images Mike Kelly got around the need for new database structures by using a regex to look for a link to the image, in the body of the forum post.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Actually, yeah, forget about Feedback. As far as the UI goes, it would be better to copy the way that the Note block does it. Both for the input (using the filepicker) and the display of the attachments.

Another thing to keep in mind, is that the system needs to be able to handle it when files get deleted later on. Perhaps showing a "(File attachment deleted)" message when you look at the post.

tags: added: snack-sized
Revision history for this message
Dirk Meyer (dirkca68) wrote :

Yes, using the approach already in place with the Notes block would work nicely. The request came about a particular workflow for a particular project. All users are members of a group and the intent is to encourage discussion around a particular idea and/or document. We think the forum is a good choice for this but adding documents to discussions would be required. Taking this a step further, it would be desirable if documents attached to discussions could be displayed in list form somewhere to make it easy to find them.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hm, the best thing, for generating that list of all attached files, is if we could make that flow organically from the forum file attachment feature.

You could do that by encouraging people to upload the files into the group's file area instead of into their own file area, perhaps by opening the filepicker to the "group" tab by default. Or maybe even have a "quick file attachment" button that automatically uploads the file into a folder (named after that particular forum) in the group file area. Then you could use the "Files to download..." block to generate that report.

Revision history for this message
Robert Lyon (robertl-9) wrote :

Looking at this again we would want:

- It must be possible to attach multiple files to a forum post and thus be available for download by everyone who has access to the forum post.

- It must be possible that the user can attach existing files from any area in Mahara (personal, groups, institution and site) as long as the user attaching the file has the permission to use them.

- The user can decide to upload a file from their computer to either their personal files or to the group's files if I am a member.

- When a file is attached to a forum post and the file is not from that group's file area, it stays in its original place and is not copied into the group's file area.

- If a file is deleted from its original location, a popup is displayed that lets the person know that the file is used in a forum post and whether they want to continue. If they do continue, the file will not be available anymore on the forum post.

- If a forum post is edited, an already attached file can be deleted, but it is not possible to attach a new file if the notification has already gone out to the forum subscribers.

- The email notification should mention that a file / multiple files are attached with links to the files.

Changed in mahara:
milestone: none → 19.04.0
assignee: nobody → Robert Lyon (robertl-9)
status: Confirmed → In Progress
Revision history for this message
Robert Lyon (robertl-9) wrote :
Revision history for this message
Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

Preconditions:
------------------------
1) group exists (Group one)
2) Forum exists (SIte admin Forum)
3) Topic exists (The Secret Of WORLD)
4) User exists that has access to the following files (User1- site admin. inst admin, group admin)
--- a. My files (user has image, doc, pdf, video and audio files available)
--- b. Group files (Group has image, doc, pdf, video and audio files available)
--- c. Institution files (Institution has image, doc, pdf, video and audio files available)
--- d. Site files (Site has image, doc, pdf, video and audio files available)

Test Steps:
------------------------
1) Log in as user that
2) Browse to your Group > Forum > Topic
3) Make a reply to the topic
4) ensure that you add a file from My files, Group files, Institution files, Site files
5) Verify that user can attach existing files from any area in Mahara (personal, groups, institution and site) as long as the user attaching the file has the permission to use them. ✔
6) Verify that user can decide to upload a file from their computer to either their personal files or to the group's files if I am a member. ✔
7) Verify that when a file is attached to a forum post and the file is not from that group's file area, it stays in its original place and is not copied into the group's file area ✔
8) Verify that if a file is deleted from its original location, a popup is displayed that lets the person know that the file is used in a forum post and whether they want to continue. If they do continue, the file will not be available anymore on the forum post. ✘
9 ) If a forum post is edited, an already attached file can be deleted, but it is not possible to attach a new file if the notification has already gone out to the forum subscribers. N/A
10) Verify that the email notification should mention that a file / multiple files are attached with links to the files. ✔Environment tested: Master

BUGS
--------------
1) modal does not close after selecting a file from My files, Group, Institution and site files
2) error message when trying to add group files to topic post (You do not have permission to add content to this folder.)
3) display issue when trying to upload a file to a topic post after user tried to post and got error message becasue theyt forgot to add a post message
4) If a file is deleted from its original location, NO popup is displayed that lets the person know that the file is used in a forum post and whether they want to continue. If they do continue, the file will not be available anymore on the forum post. ✘

NOTE: I also need clarification on what this means and how can I test this.
9) If a forum post is edited, an already attached file can be deleted, but it is not possible to attach a new file if the notification has already gone out to the forum subscribers. N/A

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

"modal does not close after selecting a file from My files, Group, Institution and site files" is existing behavior in Mahara and if it needs to be fixed would be dealt with elsewhere.

Revision history for this message
Steven (stevens-q) wrote :

BUG - error message when trying to add group files to topic post (You do not have permission to add content to this folder.)

Preconditions:
1) User belongs to Group one and Group Four
2) Group one has group files
3) Group Four does not have any group files

Test Steps:
1) User logs in and browses to a Group forum topic
2) User replys to the topic - enters a subject and message
3) User clicks add file button
4) modal window pops up
5) User clicks Group files and Group Four loads as the default group in the Group dropdown → Group Four displayed because group drop down is sorted alphabetically
6) User then clicks the correct Group from the Group drop down

Expected result: User should see all Group files displayed with the ability to select a file. User should not see an error message. If user selects My files tab User should see all of their own files and User should not see an error message.

Actual result: Once the error message is triggered and even though the user sets the correct group in dropdown or selects My files tab; the error message is still displayed

Revision history for this message
Steven (stevens-q) wrote :

BUG - display issue when trying to upload a file to a topic post after user tried to post and got error message becasue theyt forgot to add a post message

Preconditions:
1) User belongs to Group one

Test Steps:
1) User logs in and browses to a Group forum topic
2) User replys to the topic - User does NOT enter a subject and message
3) User clicks add file button and adds a file from My files tab that they have already in their files area
4) User clicks the "Post" button
5) User then corrects the issue and adds a subject and a message
6) User then decides to add another image file

Expected result: The add image modal opens to default tab "My files" and all images user has are displayed and available to select. There should only be one modal window open

Actual result: The add image modal opens to default tab "My files" and all images user has are displayed and available to select. There is what looks like; another window open behind the Upload file modal window

tags: removed: snack-sized
summary: - File attachments to forum posts is important
+ File attachments to forum posts
Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Steven - I've fixed problems 1-4 of comment 8

1) There is a 'x' in top right to close modal - also clicking on screen outside modal box will close it as well

2) Ok go the message to disappear when switching from group where one can't upload to one where they can - also made notice less alarming / more accurate

3) Fixed this up - was a generic problem that also occured for editing resume options as well

4) I see an alert asking if I want to delete file containing info about forum posts if applicable

Revision history for this message
Steven (stevens-q) wrote :

Bugs fixed

1) There is a 'x' in top right to close modal - also clicking on screen outside modal box will close it as well ✔

2) Ok go the message to disappear when switching from group where one can't upload to one where they can - also made notice less alarming / more accurate ✔

3) Fixed this up - was a generic problem that also occured for editing resume options as well ✔

4) I see an alert asking if I want to delete file containing info about forum posts if applicable ✔

5) If a forum post is edited, an already attached file can be deleted, but it is not possible to attach a new file if the notification has already gone out to the forum subscribers. ✔

Catalyst QA Approved ✔

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9359
Committed: https://git.mahara.org/mahara/mahara/commit/ca308ba547a6b1d049ae9d4438212b48669feab1
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit ca308ba547a6b1d049ae9d4438212b48669feab1
Author: Cecilia Vela Gurovic <email address hidden>
Date: Tue Nov 27 15:40:55 2018 +1300

Bug 1440916: Add attachment to forum posts

Allow one to attach files to forum topics/posts

Allow one to upload file to attach either to the user's section or to
group's section depending on which tab selected

Change-Id: I5feda5dd277ebbf70f6c494e2faa3b694ce1144d

tags: added: nominatedfeature
Changed in mahara:
status: In Progress → Fix Committed
description: updated
Changed in mahara:
status: Fix Committed → In Progress
Revision history for this message
Steven (stevens-q) wrote :

Bug Summary: Parent posts are not displaying attachments when a user edits their posted reply to a topic or another reply
===========================================

Environment tested: Master
Browser tested: Chrome

Preconditions:
------------------------
1) Group exists
2) Forum exists in the group
3) Topic exists in the Forum adn it has attachments
4) A reply exists in the topic and it has attachments

Test Steps:
------------------------
1) Log in as a user that belongs to a group that has a forum topic
2) Make a reply to a topic and post it
3) Edit the post you just made
4) Confirm that the parent post (topic) is displayed at the bottom of the page and that the attachments are displayed ✔

Catalyst QA Approved ✔

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/9383
Committed: https://git.mahara.org/mahara/mahara/commit/9cdece4dc2977dfdcb941da256a5c2c66acbc96f
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 9cdece4dc2977dfdcb941da256a5c2c66acbc96f
Author: Robert Lyon <email address hidden>
Date: Fri Dec 21 10:09:30 2018 +1300

Bug 1440916: Allow parent post to display attachements when editing post

behatnotneeded

Change-Id: If1e4aada3bc5fe747e1024dbb6b5d46367df946e
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → In Progress
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

Preconditions:
------------------------
1) Institution exists
2) Group exists and has a group forum page with a topic
3) Institution member exists that belongs to a group

Test Steps:
------------------------
1) Log in as Site admin
2) Verify file uploads are working and no errors messages are displayed for the following:
--- a) admin menu > Users > Add users by CSV - CSV file upload ✔
--- b) admin menu > Configure site > Skins > Import skins - file upload ✔
--- c) admin menu > Group > Add groups by CSV - CSV file upload ✔
--- d) admin menu > Group > Update group members bt CSV - CSV file upload ✔
--- e) admin menu > Configure site > Fonts > Install font - file upload ✔
--- f) admin menu > Configure site > Files - file upload ✔
3) Log in as Institution user
4) Verify file uploads are working and no errors messages are displayed for the following:
--- a) main menu > Manage > Import > Upload Leap2A file * - file upload ✔
--- b) main menu > Create > Resume > Education and employment > Education history - file upload ✔
--- c) main menu > Create > Resume > Education and employment > Employment history - file upload ✔
--- d) main menu > Create > Resume > Achievements > Certifications, accreditations and awards - file upload ✔
--- e) main menu > Create > Resume > Achievements > Books and publications - file upload ✔
--- f) main menu > Create > Resume > Achievements > Professional memberships - file upload ✔
--- g) main menu > Create > Resume > Goals and skills > Personal goals ✔
--- h) main menu > Create > Resume > Goals and skills > Academic goals ✔
--- i) main menu > Create > Resume > Goals and skills > Career goals ✔
--- j) main menu > Create > Resume > Goals and skills > Personal skills Edit ✔
--- k) main menu > Create > Resume > Goals and skills > Academic skills ✔
--- l) main menu > Create > Resume > Goals and skills > Work skills ✔

Catalyst QA Approved ✔

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/9385
Committed: https://git.mahara.org/mahara/mahara/commit/c95eb9cc43072abab2774fb7e798c16cb1aeb069
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit c95eb9cc43072abab2774fb7e798c16cb1aeb069
Author: Robert Lyon <email address hidden>
Date: Sat Dec 22 09:58:34 2018 +1300

Bug 1440916: Reduce code duplication when attaching/detaching artefacts

Via the filebrowser pieform element

Note - left the Resume composite one alone as that is a special case

behatnotneeded

Change-Id: Ia5cfe27c3d5f8b31640957c475fb25efcb506a3f
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.