Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Ratings 2.0: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 24: Line 24:


--[[User:Andrew Davis|Andrew Davis]] 6:06 AM, 25 January 2010 (UTC)
--[[User:Andrew Davis|Andrew Davis]] 6:06 AM, 25 January 2010 (UTC)
Good answers.
5. Sam can explain renderers to you. I think the renderer should go in mod/ratings/renderer.php. The class would be called core_rating_renderer, and that is a core renderer with subtype rating. That is, you create one with a call to ...->get_renderer($PAGE, 'core', 'rating');
8. I was not getting mixed up. I just thought it was worth deciding how similar, or not, the two were. The answer seems to be not.

Revision as of 10:30, 25 January 2010

  1. I think it would be clearer to move the userid column later in the database table, to just before timecreated.
  2. What value will be in the userid field if one user sets one rating, then a different user changes it?
  3. I think the content column would be easier to understand if you called it 'comment'.
  4. Is there any way of knowing which scale the rating is against, other than by asking the plugin? Have you considered a scaleid column in the table?
  5. class rating really should be split into class rating for the back-end, and care_rating_renderer for the GUI.
  6. Why do plugins need to implement so many callbacks to use ratings?
  7. You say the interface won't be changed, but that AJAX could be implemented in future. Well, forum already has AJAX rating!
  8. Manual grading in the quiz have never been handled in the same ways as rating elsewhere, for good reasons. However, you might like to look at how manual grading of quiz questions works.
  9. What happens in the scenario where a teacher sets a forum to be rated using Scale A, then rates some posts, then tries to change the forum to be rated by Scale B?

--Tim Hunt 11:03, 20 January 2010 (UTC)

Hi Tim, I've added comments in brackets. If there is a smarter way for me to comment on your comments let me know :)

  1. done
  2. User A rating an item is independent of user B rating an item. Two users rating something will result in two rows.
  3. Ccontent column? I started with a copy of the Comments 2.0 document. You may have read it while I was still working on the first version.
  4. Adding a scaleid column could result in potentially thousands of rows containing the scaleid which seems odd. Actually, that would help with what to do if the scale gets changed. I have added a scaleid column.
  5. I'm now reading through the code to get a sense of how renderers work.
  6. I'm not sure the plugins do need to implement so many callbacks. That was largely copied from Comments.
  7. I'll add more detail as to what I mean re ajax. Thanks for the heads up.
  8. re manual grading in the quiz be aware that rating and grading are largely unrelated. Grading is a teacher assigning a single grade to a single item. Rating is a student or teacher giving a mark to a thing based on how good they think it is. There will be numerous ratings for a single item. I'm not sure if you're getting them mixed up or if I'm not understanding what you're saying :)
  9. re the teacher changing the scale after students have begun to give ratings I think we will store the scale id in every row. That way we can say "here are the N ratings using scale A. Here are the N ratings after you changed to scale B. We could potentially offer to scale up or down the previous ratings ie if they move from 1-5 to 1-100 multiply the rating by 20 and update the scaleid column.

--Andrew Davis 6:06 AM, 25 January 2010 (UTC)


Good answers.

5. Sam can explain renderers to you. I think the renderer should go in mod/ratings/renderer.php. The class would be called core_rating_renderer, and that is a core renderer with subtype rating. That is, you create one with a call to ...->get_renderer($PAGE, 'core', 'rating');

8. I was not getting mixed up. I just thought it was worth deciding how similar, or not, the two were. The answer seems to be not.