oliviervalentin / moodle-mod_stickynotes

Sticky Notes is a Moodle activity for creating an interactive post-it wall. Students can create, move and vote for notes, under supervision of teacher which can define colors, lock fucntionnalities...
Other
4 stars 6 forks source link

Images within the activity description #15

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi Olivier,

Sorry but another error has appeared - I've put three images into the activity description. They display on the course page directly underneath the activity no problem. However on the activity page the following error occurs below the "display instructions" button.

Before calling format_text(), the content must be processed with file_rewrite_pluginfile_urls()

line 1347 of /lib/weblib.php: call to debugging()
line 252 of /mod/stickynotes/view.php: call to format_text()

Clicking on the button shows the instructions but without the images.

Hope this makes sense, Moodle 3.11.5

Best Regards

Dave

oliviervalentin commented 2 years ago

Hi Dave, problem identified : when I retrieve summary, content is formatted to keep only text !!

_$content = formattext($moduleinstance->intro);

I think that if I just remove "format_text" function, it would be fine... I will try this week to solve this problem and the title problem you encountered last time.

Best regards, Olivier

oliviervalentin commented 2 years ago

Problem fixed : I changed function called to display summary in view.php by calling "file_rewrite_pluginfile_urls". Now images in description should well be displayed in activity. Thanks for your message ! :) Olivier