Forums | Mahara Community
Leaving feedback on artefacts
10 June 2013, 11:00 PM
I'm sure I'm missing something obvious here, but I can't seem to get 'Place Feedback' to appear on any of my artefact views.
I've had a small dig around in the code and it seems like my $artefact->get('allowcomments') is set to 0, which indicates a setting somewhere that I should be able to change but I can't find where.
The artefact I'm trying it on (mainly) is a standard text box, but I have now added in all of the other file types (as per the bottom section of here) and they still don't show up either (I'm guessing if I turned debugging back on I'll get the same 'allowedcomments' => 0).
Can anyone point me where I need to set this? It works for pages fine, just within artefacts it doesn't.
Oh, and I'm using 1.6.
11 June 2013, 1:10 AM
I may be wrong but I think that before 1.7 only a few artefacts can be commented. An still with 1.7 the text boxes can't have feedback.
11 June 2013, 8:06 AM
Actually, you can put comments on all files and notes. There are a few things you might want to check:
- Check that comments are allowed on file artefacts. That is in the plugin adminstration (see http://manual.mahara.org/en/1.6/administration/extensions.html#artefact-type-file at the bottom of the screenshot under "Comments")
- Notes can have comments, but we don't yet have a default setting for them. Authors will need to go to Content -> Notes and enable comments there when they edit a note (see http://manual.mahara.org/en/1.6/content/notes.html#edit-your-notes ). I know it's a bit clumpsy right now. You could probably though change your code to allow comments per default.
- However, these are only default settings. Users can always disable comments directly on their artefacts, including file artefacts.
11 June 2013, 8:25 PM
That helps a bit. I'd already done the first bit, but never thought of your second point (I knew it before, just didn't think of it).
If I wanted to make a new artefact blocktype (which uses the image selector and text notes as a base), where is the best place to set allowcomments to 1 (as default)?
I'm guessing as the new artefact is pushed to the database, but not sure where this occurs.
13 June 2013, 9:04 PM
I'm afraid I'm not the best person to ask the technical question. As for the UI, I'd suggest to put a checkbox directly in the pop-up of the block. The problem with the current notes implementation is that you can only set the "Allow comments" when you are under Content -> Notes, but you cannot set this when you are on the actual block. For images however, you can do so when you edit them - both under Content -> Files and in the block pop-up.
20 June 2013, 7:03 PM
I don't know if you still need the answer to this question, but the way the ArtefactTypeBlogPost artefact does it, is to set $this->allowcomments = 1 in the constructor for new blog posts (i.e., ones where there's no ID, because it hasn't been inserted into the database yet). See the __construct() function for ArtefactTypeBlogPost in artefact/blog/lib.php