MDL-16423 - big refactor of the way callers interact with the portfolio code
authormjollnir_ <mjollnir_>
Thu, 11 Sep 2008 13:42:58 +0000 (13:42 +0000)
committermjollnir_ <mjollnir_>
Thu, 11 Sep 2008 13:42:58 +0000 (13:42 +0000)
commit0d06b6fda771f5369509361ec46dce67a1b9c398
tree31be5090ac89dc8fbd8672ec807385bebaab13ae
parent2e6a355ddb66952f0c3e6827c0ab75c0b645af1b
MDL-16423 - big refactor of the way callers interact with the portfolio code

added two new contract methods to the caller class, load_data and expected_callbackargs (static)
this means that the base class is the only place that needs a constructor
and that no data loading happens in the constructor
this in turn means we can check callback argument validity much more lightly

also completely remoted portfolio_add_button function and replaced with a class
as the argument list was getting out of control.  it's now much more readable.
15 files changed:
lang/en_utf8/portfolio.php
lib/portfolio/caller.php
lib/portfoliolib.php
mod/assignment/lib.php
mod/assignment/type/online/assignment.class.php
mod/assignment/type/upload/assignment.class.php
mod/chat/lib.php
mod/chat/report.php
mod/data/lib.php
mod/forum/discuss.php
mod/forum/lib.php
mod/glossary/export.php
mod/glossary/lib.php
mod/resource/lib.php
portfolio/add.php