113 Commits

Author SHA1 Message Date
mjollnir_
f2e933bb09 MDL-16516 - fixing bad regression in mahara portfolio plugin 2008-09-15 17:14:51 +00:00
nicolasconnault
795ad63034 MDL-15666 Testing a matrix of portfolio caller/plugin. Starting the new cleanup method in unit tests (max id) 2008-09-15 13:18:44 +00:00
mjollnir_
9d7432f650 MDL-16423 - changed button->set_formats to respect more general formats (for later when we have richer export formats that aren't mostly based on mime) 2008-09-15 13:13:21 +00:00
mjollnir_
de01a5071e MDL-14591 - added some phpdocs, moved the transfer log insert into its own method and streamlined how it's called.
Also added a parameter to verify reawaken so that when we are just viewing queued transfer logs it can be in a different session (sesskey verification)
2008-09-12 15:31:17 +00:00
mjollnir_
37f03ea00b MDL-15666 - change all the portfolio plugins and callers to use exceptions
rather than relying on return values (send_package and prepare_package)

move zipping of temporary files into the exporter class so it can be overridden during unit tests

fix a small todo in mahara plugin
2008-09-12 11:22:15 +00:00
mjollnir_
0d06b6fda7 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.
2008-09-11 13:42:58 +00:00
mjollnir_
ce09fecc99 MDL-16423 - refactor of portfolio_add_button into class for much better usability
currently portfolio_add_button still exists and just acts as a wrapper around the class
so i have not changed any calling code to use the new objects yet.
2008-09-10 16:34:08 +00:00
mjollnir_
36b1cfd6c2 MDL-14591 - fix misnamed member variable in exporter class 2008-09-10 13:51:01 +00:00
mjollnir_
d5d9b23989 MDL-14591 - add get_base_file_url for pull portfolio plugins to use 2008-09-10 12:49:14 +00:00
mjollnir_
2e0c7925ec MDL-16403A - save state in portfolio before redirecting to steal control url. 2008-09-09 14:08:59 +00:00
mjollnir_
a200c487f2 MDL-16405 - throw the right exception during admin operations to avoid unnecessary debugging notice. 2008-09-09 13:44:16 +00:00
mjollnir_
2ddd044af8 MDL-16390 - detect duplicates when copying files to portfolio export area and handle it nicer
this will mean that there will only be one file, and the filename will be set to whatever the first one was, but it's better than getting the error.
2008-09-09 09:56:56 +00:00
mjollnir_
87fcac8d78 MDL-14591 - split portfoliolib into logical parts for better readability
Especially as some of the functions shared by base classes (portfolio plugin vs caller) were the same
it was getting a bit unweildy to have all this in one file.
2008-09-08 13:44:36 +00:00