41 Commits

Author SHA1 Message Date
Penny Leach
11fbe3fc79 portfolio api MDL-14591 fixed some get_string issues and tiny usability fixes 2010-05-02 18:01:05 +00:00
Penny Leach
67aec4423e portfolio MDL-21233 fixed a regression in the change to moodle_url 2010-02-26 15:30:59 +00:00
Petr Skoda
a685593466 MDL-21233 moodle_url improvemewnts, code simplification, more diagnostics; fixed several regressions 2010-01-16 15:39:56 +00:00
Petr Skoda
3ba60ee16a MDL-21235 new single button rendering 2010-01-14 19:18:04 +00:00
Petr Skoda
dc6896efe0 MDL-21198 used new simple_button class when doing OUTPUT->confirm() - more consistent and hopefully easier to remember than html_form::make_button() ;-) 2010-01-03 20:47:13 +00:00
Penny Leach
521a6ab04d portfolio MDL-20896 added the ability to set mime info for "intended" files
This means for places in Moodle that are going to write a file, like a
CSV file, they can set the intended mimetype of the generated file.

Previously you had to use a stored_file object.

This also gets rid of portfolio_fake_add_url function and replaces the
data module implementation with a button.  I also refactored
portfolio_add_button::to_html to use moodle_url so it's easy to return
the same parameters to hidden form fields, an escaped url (for a link),
and a non escaped url (to redirect to, which is what the data module
does)
2009-12-15 12:36:49 +00:00
Penny Leach
24ba58ee9a portfolio MDL-21079 be more selective about including libraries.
this involves moving all formslib includes to where they're actually needed.
it also moves the portfolio stuff from assignment,data,chat,forum and glossary
into a locallib.php which involved creating it for many of those modules.
2009-12-12 11:27:07 +00:00
Penny Leach
59dd457e4b portfolio: MDL-21030 - leap2a portfolio format support.
This commit includes:

- leap2a portfolio format, and xml writer
- proof of concept implementation in forum and assignment modules
- a lot of refactoring of the portfolio formats in general:
    - addition of "abstract" formats - this is necessary for plugins to be able to support groups of formats
    - addition of the idea of portfolio formats conflicting with eachother - eg richhtml & plainhtml

it touches modules other than assignment and forum, because the format api
changed and now each place in moodle that exports portfolio content has to deal
with the formats it supports slightly differently.

At the moment the Mahara portfolio still doesn't support this format, because I
haven't done the Mahara side yet. The "file download" plugin supports it
though.

Still todo:

- Add support for the other places in Moodle (glossary, data, etc)
- Write tests, once the rest of the portfolio tests have been updated to use the new DB mocking stuff
- Fix a bunch of TODOs
2009-12-03 14:26:37 +00:00
Penny Leach
b12fbe8e4c portfolio MDL-20905 fixing errors that affected box.net plugin 2009-11-19 07:03:53 +00:00
Penny Leach
c95a609597 Portfolio MDL-19356 removal of session reliance completely.
For plugins that don't support it, we can work around the external
redirect issue by returning to a special url.

This also adds on selective cancelling/continuing of current exports.

It needs a lot of testing, but seems to be working reasonably well.

Some plugins need updating now, however
2009-11-17 14:01:25 +00:00
Penny Leach
f1d2641df6 portfolio: MDL-20850 fixed some navigation/output 2009-11-17 14:01:06 +00:00
Penelope Leach
aa37986599 portfolio MDL-20850 adding $PAGE->set_url 2009-11-16 14:57:42 +00:00
Petr Skoda
4317f92f3f MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 12:51:40 +00:00
samhemelryk
de6d81e667 admin MDL-19799 Upgraded print_header and build_navigation calls to use PAGE and OUTPUT equivilants 2009-09-03 06:59:25 +00:00
nicolasconnault
de2bd9df22 no message 2009-08-18 05:18:28 +00:00
nicolasconnault
e6e565ab20 MDL-19819 Converted all print_footer() calls 2009-08-06 14:09:50 +00:00
mjollnir_
780de011da portfolio: MDL-19358 added $cm to require_login check. this will have to change as soon as we implement portfolio exporting for something other than a course module (eg, a blog, blog post, etc) 2009-06-01 18:53:54 +00:00
mjollnir_
766d61cbb8 portfolio: MDL-19358 and MDL-19354 added sesskey() protection when first initating a portfolio export; verify callback class is part of the portfolio_caller_base hierarchy; re-check permissions in the caller when waking up the portfolio exporter object (between requests) 2009-06-01 17:06:28 +00:00
mjollnir_
9e7d38b11a portfolio/ replaced course_setup with $PAGE->set_course which seems to have been missed 2009-05-09 13:15:41 +00:00
mjollnir_
4c7a4ef9df MDL-18734 - documentation and coding style in portfolio/*
Added much needed documentation to the portfolio "scripts" (the libs are all
fine), and moved all parameter fetching from the body of the file to the top.
2009-05-02 13:23:22 +00:00
skodak
98335b2da8 MDL-14591 adding standard access control 2009-03-28 22:02:00 +00:00
mjollnir_
c737eed82f MDL-16535 - nicer messages about invalid exports 2008-09-16 17:50:55 +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_
9f3ef2238d MDL-14591 - fixed some comments and changed some print_errors to exceptions in portfolio/add 2008-09-04 10:32:17 +00:00
skodak
90658eefb0 MDL-16166 centralised enabling of subsystems, fixed some warnings and general cleanup 2008-08-26 05:45:07 +00:00
mjollnir_
4dc67f1e92 MDL-15768 - set userobject in the caller before checking permissions. 2008-08-22 16:35:26 +00:00
mjollnir_
5012851256 MDL-14591 - fixups related to cancelling requests and reawakening them 2008-08-22 13:25:53 +00:00
mjollnir_
beb4ac1a5d MDL-14591 - better security when reawakening an interupted export 2008-08-20 15:58:29 +00:00
mjollnir_
349242a31d MDL-16127 - smarter handling of supported formats in callers 2008-08-20 13:30:37 +00:00
mjollnir_
3403520190 MDL-16134 - exception handling in portfolio code 2008-08-19 14:20:32 +00:00
mjollnir_
ac6a549219 MDL-16047 - nicer handling of interupted exports 2008-08-19 10:17:39 +00:00
mjollnir_
f812bbe834 MDL-14591 - fixed a bug and a notice 2008-08-13 15:37:02 +00:00
mjollnir_
d96a1acc0b MDL-15777 more fixes for portfolio to use file api
this introduces portfolio/file.php to serve portfolio related files - access check is delegated to the plugin.
and also two new classes in the portfolio plugin tree - push vs pull.
2008-08-12 13:17:34 +00:00
mjollnir_
d67bfc32a1 MDL-15777 - updated most of the portfolio code to use files api.
Not done:

- forum (the rest of the module isn't using files api yet)
- database mod (touches other parts of the code (ods and excel libs)
- portfolio download plugin (needs discussion with petr about userfiles)

all of these have been disabled in the meantime.
2008-08-09 14:24:58 +00:00
mjollnir_
84a449853f MDL-15777 - move all portfolio storage to portfolio_tempdata rather than session.
This allows us to always have a unique id for a portfolio export which can be used as itemid for files api.
Also it makes the session smaller :)
2008-08-06 15:27:42 +00:00
mjollnir_
6fdd8fa76f MDL-14591 portfolio: small fixes and improvements. 2008-08-04 16:07:37 +00:00
mjollnir_
7c61a8f047 MDL-14591: portfolio - fixing regression I introduced when refactoring 2008-08-02 09:02:00 +00:00
mjollnir_
9eb0a77292 MDL-14591 many small fixes to portfolio 2008-08-01 12:23:32 +00:00
mjollnir_
ffcfd8a777 MDL-15762 log portfolio transfers and notify the user when there are dups 2008-07-30 16:38:13 +00:00
mjollnir_
a239f01e57 MDL-15860 - add global portfolio enabled switch 2008-07-29 11:27:16 +00:00
mjollnir_
67a87e7db2 portfolio checkin-
see http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/portfolio for changelog

commit point is this hash on that branch: f9642af4e8bd319d4ecdfd83589db61a8fa6fef2

This comes with two plugins, box.net & download
2008-07-25 08:14:11 +00:00