Forums | Mahara Community
View Feedback & 'commentfiles'
18 May 2011, 7:06 AM
At the moment, when feedback is left on a view and a file attached to that feedback, it is put in the users folder called 'commentfiles'.
I think this is an awesome feature for assessment records and an assessment process as a whole. However, the commentfiles are all bunched together from every view.
Does anyone know if it is possible to put the feedback attachments in a folder for that particular view instead? Then there would be more organised feedback.
I can hack around with code, but would certainly appreciate some guidance and/or direction!
19 May 2011, 4:47 PM
Hi Tom, the place to hack around with the code is in the function add_feedback_form_submit in htdocs/artefact/comment/lib.php, that's where the attachments are saved. That $folderid variable is the current folder, but you'll need to get/create a subfolder of that with the view name or id.
Something similar is done with subfolders when copying views, so have a look at default_parent_for_copy() which gets a subfolder (creating it if necessary I think).
06 June 2011, 5:42 PM
We had a hack around with the code in htdocs/artefact/comment/lib.php and changed:
It has the desired effect, but will also create another subfolder when the view title is changed... which is not exactly what I planned originally
Comments are welcome, please! :P
06 June 2011, 10:49 PM
If you want to avoid creating new subfolders when the view title changes, use the view id in the subfolder title, and put the view title into the subfolder description.