So I have discovered that allowing a course facilitator (teacher) to send bulk html edited messages to their students comes up with links removed and added as footnotes and other lovely things to make it look completely disgusting. So I decided I would remove the html editor and swap it out for a normal textarea.
I started with the sitewide bulk messaging as a test run which required a simple edit in the admin\user\user_message_form.php file. Because it was using the addElement function the swap out was easy.
Then I looked into change it for the messaging course participants page. Not so easy. I am confronted with these two lines in user/messageselect.php
$usehtmleditor = can_use_html_editor();
So I tried commenting out the "$usehtmleditor = can_use_html_editor();" line, which just returns a boolean based on a setting elsewhere in moodle, and I put in this line instead to make sure it was told not to use the html editor.
$usehtmleditor = false;
This makes the code use a different path through an if statement in the "user/message.html" file that is "required" from withing the messageselect.php file. It now tries to fire this function call off
choose_from_menu(format_text_menu(), "format", $format, "");
which is a depricated function that I am informed through the developer debugging has been replaced by the "html_writer::select()" function and I can't for the life of me figure out what parameters I need to put into the new function based on the variables and info I have to pass at this point in the message.html file.
Can anyone help me change this instance of the old choose_from_menu functino into the new html_write::select function please?
Should that deprecated function still be in the code?
Moodle release I am running is 2.1.4 on my testing server.
I should note that the live version I eventually want the fix for is 2.1.5 but I am imagining it will be a similar fix.
Any help on this would be appreciated.