Hi Moodlers,
I would really appreciate some helps to be able displaying assignment feedback comment as HTML, as the current result display all HTML Tag as the outcomes.
The SQL code used as the following:
SELECT
CONCAT(u.firstname,' ',u.lastname) AS Student,
c.fullname AS Course_Name,
a.name AS Assignment_Name,
DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(ag.timemodified),'+00:00','+10:00'),'%d-%M-%Y') AS Assignment_Date,
IF (ag.grade=2,'C','NYC') as Assignment_Result,
CONCAT(ug.firstname,' ',ug.lastname) AS Assessor,
afc.commenttext AS Comment,
afc.commentformat AS Comment_Format
FROM prefix_course AS c
JOIN prefix_assign AS a ON a.course = c.id
JOIN prefix_assign_grades AS ag ON ag.assignment = a.id
JOIN prefix_assignfeedback_comments AS afc ON afc.grade= ag.id
JOIN prefix_user AS u ON u.id = ag.userid
JOIN prefix_user AS ug ON ug.id = ag.grader
WHERE ag.grade > 0
AND ag.timemodified > UNIX_TIMESTAMP(DATE_SUB(NOW(),INTERVAL :how_many_days_back_to_check DAY))
ORDER BY u.firstname, u.lastname, c.fullname, a.name, ag.timemodified DESC
And the outcome is displayed as the following
It will be reader friendly if the Comment can be displayed in the HTML form so all the tags will help to format the comment.
Thank you
Regards,
Riady