TEXT EDITOR DEFAULT

TEXT EDITOR DEFAULT

ved kevin andree viveros -
Antal besvarelser: 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

Bilag Captura.PNG
Gennemsnitsbedømmelse: -
I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af 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);

    }


I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved 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 ..



Bilag DUMMIES.PNG
I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af 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" )

I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved 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 smiler

Bilag DUMMIES.PNG
Bilag recibo.png
I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af 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.

I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af 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);
I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers

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

I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved 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?

Bilag IMAGEN 1.png
Bilag IMAGEN 2.png
I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers
I don't understand your question, could you explain further?
I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved 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

I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af 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?

I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved kevin andree viveros -

¡¡¡Sí!!! smiler

I svar til kevin andree viveros

Re: TEXT EDITOR DEFAULT

ved Marcus Green -
Billede af Core developers Billede af Particularly helpful Moodlers Billede af Plugin developers Billede af Testers

Based on watching Clint Eastwood western movies in my youth I will take that as a yes smiler

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. 

I svar til Marcus Green

Re: TEXT EDITOR DEFAULT

ved 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 trist 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. smiler I would be very useful smiler


the diagram bd gapfill! smiler

Gennemsnitsbedømmelse:Useful (1)