Text doesn't appear in Moodle Forum

Re: Text doesn't appear in Moodle Forum

by Edgar Garcia -
Number of replies: 0

This is by no means a fix, but it is a work-around.  Given the aforementioned debug messages, I decided to kill the CROT plugin -- and voila, it worked! 

 

So then, I decided to look for clues inside the CROT lib.php file, and noticed a syntax error with the library path:

//get global class from the original plugin showed (line 33-35)
global $CFG;
require_once($CFG->dirroot.'/plagiarism/lib.php');

 

This was the wrong path!  What tipped me off was looking further down in the code; I noticed this line (which made more sense):

$output .= "<br><b> <a href=\"../../plagiarism/crot/index.php?id_a=$crot_doc_rec->id&user_id=$userid&cid=$cid\">".$perc."%</a></b>";

 

Long story short, I needed to add /crot/ to the code:

//get global class
global $CFG;
require_once($CFG->dirroot.'/plagiarism/crot/lib.php');

 

 

Moral of the story, again, RUN DEBUGGING to isolate the issue!!!