TEXT EDITOR DEFAULT

TEXT EDITOR DEFAULT

از kevin andree viveros در
Number of replies: 14

Hola......! Estoy tratando de hacer una especie de pregunta que yo estoy usando la brecha plugin de llenado es grande, pero me pregunto si alguien sabe cómo colocar un texto predefinido en el editor donde se coloca la pregunta porque quiero tener un texto predefinido

Attachment Captura.PNG
میانگین امتیازات: -
In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

  public function set_data($question) {

        /* accessing the form in this way is probably not correct style */

        $wronganswers = $this->get_wrong_answers($question);

        $this->_form->getElement('wronganswers')->setValue(array('text' => $wronganswers));

        $this->_form->getElement('questiontext')->setValue(array('text' => 'mi gato le gusta comer queso'));

        parent::set_data($question);

    }


In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در

Thank you very much for your attention! his answer was very helpful, I could do what I wanted and been very satisfied

one more thing if it is not too much trouble is that by putting the formualario I wanted the editor area was small I stay.


there or is there any way to change that Tano or done automatically resizable ..



Attachment DUMMIES.PNG
In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

Do you mean the entry box was small or the text was small? If you are asking about the text then use standard HTML tags (e.g. style="font-size: xx-large" )

In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در

MARCUS HELLO! THANKS FOR friendly response


NO TEXT SIZE EDITOR.

It could give the dimensions EDITOR?

I have some forms that are a little wider and the scroll bars are activated vertical and horizontal

in the following image resize the editor but manually fix it with the mouse cursor


THANKS AGAIN very grateful لبخند

Attachment DUMMIES.PNG
Attachment recibo.png
In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

I suspect you may need to do something in renderer.php to ensure the display area is bigger, but I am not entirely sure what.

In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

I misunderstood your question, any solution will not be in renderer, because that is what controls how the completed question displays to student at runtime. It might be possible to make the editor bigger with this code in your edit_qtype_php file (where qtype is your question type name ) . They key to this is that the field was originally added in the edit_question_form.php file. Note that I have not tested this code so it might not work.

/*question text was added in the ancestor class so remove it */
$mform->removeelement('questiontext');
/*then add it back with new size parameters */
$mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'),
                array('size'=>110,'rows' => 20), $this->editoroptions);
In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

That work you were doing looked really interesting, how is it progressing?

In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در

marcus hello, thank you very much for the code, it worked great!!, but doing it this way the elements (Figure 1) were disrupted, and to organize the default interface should do the same process with others.

I have a question, you may be able to get the form done in GapFill the editor?

because being an editor the user can modify (delete) any form element that should be static.

or is there any way to prevent this?

Attachment IMAGEN 1.png
Attachment IMAGEN 2.png
In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers
I don't understand your question, could you explain further?
In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در

hello marcus, the idea is to block the predefined text, for example: date (fecha), city (ciudad), received (recibido), address (dirección) and other so they can not be deleted

In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

Do you mean you want to block teachers from changing it when creating a new question so they can only change what is between the braces?

In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در

¡¡¡Sí!!! لبخند

In reply to kevin andree viveros

Re: TEXT EDITOR DEFAULT

از Marcus Green در
تصویر Core developers تصویر Particularly helpful Moodlers تصویر Plugin developers تصویر Testers

Based on watching Clint Eastwood western movies in my youth I will take that as a yes لبخند

Assuming you want a single template that all teachers will use you will need to abandon the use of the Moodle editor and put the template text into standard web form items leaving the gaps for where the "variables" are going to be to be completed by the teacher. If you are going to do that you may as well offer multiple "templates" as a possibility to get the most from the concept. 

In reply to Marcus Green

Re: TEXT EDITOR DEFAULT

از kevin andree viveros در


jajajaj yeah


hello marcus thank you for your support and help keep working on that , sorry for not responding in time , I only had a problem with the internet and had no service for a long time ناراحت I still documentandome your wonderful development soon will show you what I try implement your development GapFill is a beta version .


 Thank you very much for your help was vital for me I wanted to ask a favor then and searched the web a diagram of how it works GapFill but can not find that information is not available ??? UML diagrma your plugin. لبخند I would be very useful لبخند


the diagram bd gapfill! لبخند