How can i set a limit only for the images uploaded in course/edit.php in moodle?

Re: How can i set a limit only for the images uploaded in course/edit.php in moodle?

by Michael Milette -
Number of replies: 2
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Retete,

Did you find a solution to your question? If so, any chance you could share it?

Michael
In reply to Michael Milette

Re: How can i set a limit only for the images uploaded in course/edit.php in moodle?

by Catalin Baron Damaschin -
Hello Michael,

I have found that Atto editor icons are mini plugins. You can find this structure in: lib/editor/atto/plugins/.
I tried to set a limit on the image plugin lib/edior/atto/plugins/image/yui/src/js/button.js

 function image.onload = function() 
 on the variables currentwidth and currentheight 

It doesn't work, I am trying to better understand the code from the button.js file.

 I get this far smile
Catalin Baron Damaschin



In reply to Catalin Baron Damaschin

Re: How can i set a limit only for the images uploaded in course/edit.php in moodle?

by Catalin Baron Damaschin -
My approach is to develop a new modular plugin with upload and resize image functionality. This plugin can be linked to an Atto editor icon with the desired function attached. The plugin can be written in javascript code which is the base language for the Atto editor.