Posts made by Itamar Tzadok

 Imagine the possibilities if there was drag and drop?

Imagined and realized in a multi-purpose multi-choice question type that I developed and used a couple of years ago but has never gotten to release.

A fairly simple solution for modern browsers under the assumption that when you dnd an image into the editor it creates an img tag with the image content in base64. Then it is simply parsing the content of the editor on submission, extracting the base64 image tags from the content, converting to system files (in the user draft area, to be processed with all the other draft files) and replacing in the content with the appropriate pluginfile links.

It worked effectively for my purposes. I don't know how cross-browser/platform such a solution is, but it may be worth examining.

smile

Wrong forum (note the forum description).

Best practice, google the the debug message with moodle and you may find relevant discussions and sometimes useful suggestions. For instance this thread 

with the suggestion to change the max_allowed_packet in my.cnf to 512M or higher if needed.

hth smile

When writing a long scenario with repeating steps in an acceptance test feature I sometimes want to try only a certain part of the scenario, as running the whole scenario may be time consuming (scenario outlines are not a viable option as they repeat too much). Using # to comment out lines may be tedious. Gherkin doesn't seem to support block comments. I found at  http://stackoverflow.com/questions/7113594/how-to-do-block-comments-in-gherkin, item 7, a suggestion to use PyStrings type comments, which seems to work quite nicely.

So for example, all the steps in the illustration below will be ignored when running the feature.

"""
        When I go to manage dataform "views"
        And I follow "id_editview1"
        And I expand all fieldsets       
        And I fill textarea "Entry template" with "Checkbox 01\nEAC:edit\nEAC:delete"
        And I press "Save changes"
        And I follow "Browse"
        And I follow "id_editentry1"
        And I set the field "CB 01" to "checked"
        And I press "Save"
        Then I should see "CB 01"
...
"""

In this particular scenario I have about 11 50-steps sections and as I'm adding each section I'm commenting out all others (except for the opening section that is needed for all the others) and trying only that part before adding the next sections.

 

smile

 

 

Average of ratings: Useful (2)