Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Portfolio
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      After a brainstorming session with Nico, who is fast becoming number 2 portfolio api ninja, we thought the following was the best approach:

      • change supported_formats in the caller to always be called statically and accept the caller object optionally. This means it can essentially support static and not static calls, by the implementer testing for empty($caller) rather than having to do isset($this) && $this instanceof whateverclass (which I thought was too hard for implementers to have to worry about)
      • allow an extra argument to portfolio_add_button - so that if the calling code knows better than the static function in the caller class does about what formats are going to be allowed (eg if it knows a file is an image) it can override it.

      I'm going to sit on this for a little bit in case I have any further ideas, but that's the current plan.

        Gliffy Diagrams

          Attachments

            Activity

            mjollnir Penny Leach created issue -
            Hide
            mjollnir Penny Leach added a comment -

            committed to head. example in forum attachments that are images.

            Show
            mjollnir Penny Leach added a comment - committed to head. example in forum attachments that are images.
            mjollnir Penny Leach made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            dougiamas Martin Dougiamas made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 28016 ] MDL Workflow [ 60623 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 60623 ] MDL Full Workflow [ 89799 ]

              People

              • Assignee:
                mjollnir Penny Leach
                Reporter:
                mjollnir Penny Leach
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10