Hi Helen,
not sure why I didn't received that message (the one talking about the help button) by email. Strange.
In any case... I'd keep this resolved and perhaps continue the discussion in the original bug (MDL-13371). IMO there are various alternatives open there (help icon near each menu, inline scale description...) and we should agree about them there. More now, if we want to show things differently between AJAX/no AJAX ratings.
Perhaps we can address MDL-13371 for 1.9.5 and introduce there the AJAX/no AJAX variants to see if the discussion evolves (there or in moodle.org forums). Does this sound ok?
Attaching patch (for HEAD) that implements AJAX forum ratings.
Notes:
Future improvements:
Seems to be working, ok. Security implemented by sesskey only (and enough I think). Please review.
Ciao
- Minimum changes in current forum code. Just added the $return parameter to one function, enclosed the ratings summary into one needed <span> and added simple condition to decide between normal and ajax behaviour.
- Uses YUI 100% of course.
- rate_ajax.js, where all the JS lives.
- rate_ajax.php, server-side script to handle them (90% equivalent to rate.php).
Future improvements:- Put all the common code in rate.php and rate_ajax.php in some function to be used by both.
- wrap all js functions into some object.
Seems to be working, ok. Security implemented by sesskey only (and enough I think). Please review. Ciao