Closed lethevinh closed 6 years ago
-All Words are formatting as Bold/Italic...Font Color..and all are not affected when using WordSelect . should we fix issue
I don't quiet understand, are you saying you want them formatted and they are not formatted, or that they are formatted and you don't want them formatted?
i want them formatted and they are not formatted.
OK I understand what you are asking now. You want selectable correct and incorrect text to be formatting as in the example you give. I am currently working on a version 2 of the plugin that I hope will support that possibility. The current code comes closer to that and I will bear you request in mind as I develop. My most recent work was to try to ensure that mathjax (maths) formatted text would be selectable.
Please , Review code and let me know what you think.
I was reviewing it and creating a Unit test just as your message came in. I have taken your pad_angle_brackets modified it and added it to the branch I have been working on and it looks good. I will be adding text to the sample questions that demonstrates this capability.
Yes, thank you very much. Please let me know immediately the feedback or bug you found. I will fix them.
I have just noticed you created a behat test, that is wonderful!
Will be adding this unit test public function test_pad_angle_brackets(){ $questiontext = '
The cat [sat]';
$question = qtype_wordselect_test_helper::make_question('wordselect', $questiontext);
$paddedquestiontext= $question::pad_angle_brackets($questiontext);
/note the gap added between and The
The cat [sat]",'padding of html tags failed'); / tags retained are 'sub', 'sup', 'i', 'u', 'b' / $this->assertContains("[sat]",$paddedquestiontext,'formatting tags not retained '); }
I have run your behat and unit test and smoke test. everything is fine.
I have added big sections of your code and a credit for your work in the release notes file https://github.com/marcusgreen/moodle-qtype_wordselect/blob/master/releasenotes.md
Please let me know what features you upgrade to the next version and what are your plans ?
Hi My current plan is to update the little icon for the plugin and then release to the Moodle plugins database. I am not certain of the timescale yet. I have set up a course with the current code for people to experiment with.
http://vledevelop.co.uk/moodle/ You can log in as a teacher as username:t1 password:test
Would you email me directly at marcusavgreen at gmail dot com, as there is a question I would like to ask you.
current , not support the word from the colour format and format attribute html other, <span class="" style="color: rgb(0, 61, 245);">text</span>
text, please review my code part.
$questiontext = preg_replace_callback('/<([a-zA-Z]*)[ ]*([a-zA-Z0-9\# =\'\"\:\(\,\;\)]*)\>/', function($a) use ($tags) {
That looks very interesting. I will review and get back to you.
Do you have an idea for how to support color?
I will use the regular expressions php to the identifier the selectword has html attribute. Tell me your idea?
I am waiting for your review, please let me know your feedback. please help me. thank you.
CWhat am I reviewing, can you create a new pull?
Ok, I have seen your pull. I am travelling at the moment (writing this on mobile phone). Will look more closely when I get home. What is kbd by the way?
kbd tag is keyboard input, I want handle case end user copy and paste content to editor.
Did a small amount of testing and accepted your pull. Will update the example questions and and do some more testing before releasing a version 2.1. Excellent work. The travis testing is broken because I have not set up the jshint correctly. Will work on configuring that.
thank you so much
thank you so much
I am impressed with your contributions, could you email me at marcusavgreen@gmail.com. I may have something of interest to you.
this code is now in the v2.1 release available from the plugins database at moodle org https://moodle.org/plugins/qtype_wordselect
Could you email me at marcusavgreen@gmail.com, I may have an opportunity for some paid Moodle work for you.