Moodle

refactor portfolio_add_button to allow files to be passed (for mime detection) and audit callers

Details

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

Description

callers can pass supportedformats currently but it's possibly easier to allow them to pass files too. or at least audit the callers to make sure they're passing formats where they can.

Activity

Hide
Penny Leach added a comment -

I actually audited this and decided this is ok. I added notes to the docs about it too.

Show
Penny Leach added a comment - I actually audited this and decided this is ok. I added notes to the docs about it too.
Hide
Penny Leach added a comment -

still not happy with this, so reopening.

Show
Penny Leach added a comment - still not happy with this, so reopening.
Hide
Penny Leach added a comment -

hehe, massive refactor.

also talking about creating a new abstract method in the caller base class so that the callers will do all their heavy work in that (load or init or something) sot hat the constructors of the callers can be JUST used to validate $callbackargs.

This means code can easily create and throw away caller objects without worrying about performance.

Show
Penny Leach added a comment - hehe, massive refactor. also talking about creating a new abstract method in the caller base class so that the callers will do all their heavy work in that (load or init or something) sot hat the constructors of the callers can be JUST used to validate $callbackargs. This means code can easily create and throw away caller objects without worrying about performance.
Hide
Penny Leach added a comment -

yay. much happier with this now!

Show
Penny Leach added a comment - yay. much happier with this now!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: