Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22558 Database activity 2.0 inconsistencies
  3. MDL-23787

Fields of type textarea default to HTML editor. But it lacks lacks file area support, so it's impossible to add any image or similar.

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Labels:
      None
    • Testing Instructions:
      Hide

      Note to testers: This must be tested specially for 21 and 22 stables, due to the imminent (next week) point releases.

      1. Create Database activity with at least two textarea field
      2. Add entry, make sure you can embed images in textareas
      3. Edit entry, make sure you can edit and save entry with embedded images

      Show
      Note to testers: This must be tested specially for 21 and 22 stables, due to the imminent (next week) point releases. 1. Create Database activity with at least two textarea field 2. Add entry, make sure you can embed images in textareas 3. Edit entry, make sure you can edit and save entry with embedded images
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-23787-master

      Description

      " Fields of type textarea default to HTML editor. But it lacks lacks file area support, so it's impossible to add any image or similar. IMO we should support some sort of "data_content" file area (with itemid being data_content->id) for this field type (and others using the html editor). "

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            marina Marina Glancy added a comment -

            Apu, can you please look at the code

            Show
            marina Marina Glancy added a comment - Apu, can you please look at the code
            Hide
            nebgor Aparup Banerjee added a comment -

            Hi Marina,
            just done a code review :

            • consider wrapping lines if they are too long (or go too far right) - again that's for readability.

            looks good to me otherwise

            cheers,
            Aparup

            Show
            nebgor Aparup Banerjee added a comment - Hi Marina, just done a code review : !empty($content->id) ? (int) $content->id : null --> i'd take that out of file_prepare_draft_area() and into a separate variable for readability, see http://docs.moodle.org/dev/Coding_style#Wrapping_Control_Structures consider wrapping lines if they are too long (or go too far right) - again that's for readability. looks good to me otherwise cheers, Aparup
            Hide
            marina Marina Glancy added a comment -

            Apu, I finally finished it. Sorry it took so long. If you think this should be backported feel free to cherry-pick to previous versions

            Show
            marina Marina Glancy added a comment - Apu, I finally finished it. Sorry it took so long. If you think this should be backported feel free to cherry-pick to previous versions
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            nebgor Aparup Banerjee added a comment -

            err oops i was peer-reviewer - assigning to another integrator.

            Show
            nebgor Aparup Banerjee added a comment - err oops i was peer-reviewer - assigning to another integrator.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited

            Attaching unrelated, but discovered while looking to this, error about the "Add Entry" template becoming somehow broken by the configlib.stuff, completely displacing labels and contents.

            Crazy, crazy! Reproduced from 2.0 to 2.3.

            Edited: non-initialised $patterns and $replacements arrays @ mod/data/edit.php (global scope) are the cause for this, with those vars being used by configlib stuff. I'll add one extra commit here if finally this lands.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - - edited Attaching unrelated, but discovered while looking to this, error about the "Add Entry" template becoming somehow broken by the configlib.stuff, completely displacing labels and contents. Crazy, crazy! Reproduced from 2.0 to 2.3. Edited: non-initialised $patterns and $replacements arrays @ mod/data/edit.php (global scope) are the cause for this, with those vars being used by configlib stuff. I'll add one extra commit here if finally this lands.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks! (21, 22 & master).

            Note: I've added one extra commit to fix the global scope vars commented above.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21, 22 & master). Note: I've added one extra commit to fix the global scope vars commented above.
            Hide
            andyjdavis Andrew Davis added a comment -

            Tested on master, 2.2 and 2.1. Works as described. Passing.

            Show
            andyjdavis Andrew Davis added a comment - Tested on master, 2.2 and 2.1. Works as described. Passing.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!).

            icao_reverse('arreis olik rebemevon afla letoh ognat');

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!). icao_reverse('arreis olik rebemevon afla letoh ognat'); Closing, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12