Forums | Mahara Community
Developers
/
View Feedback & 'commentfiles'
18 May 2011, 7:06
Hi everyone!
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!
Cheers!
19 May 2011, 16:47
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, 17:42
We had a hack around with the code in htdocs/artefact/comment/lib.php and changed:
safe_require('artefact', 'file'); |
to:
safe_require('artefact', 'file'); |
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, 22:49
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.