98 Commits

Author SHA1 Message Date
Penny Leach
9d429f0bae portfolio api MDL-14591 fixing small bugs and removing debugging 2010-05-02 18:00:52 +00:00
Penny Leach
3cec7552ef portfolio MDL-21508 removed lots of debuging code (just commenting out because i still have work to do here) 2010-04-13 08:06:23 +00:00
Penny Leach
a1e1af19ef portfolio MDL-16124 improved the portfolio_formats conflict resolution 2010-03-21 17:19:56 +00:00
David Mudrak
16be897441 MDL-21652 html_table rendering refactored
* class html_component does not exist any more
* class html_table rendered via html_writer::table()
* html_table, html_table_row and html_table_cell have public $attributes property to set their CSS classes
* dropped rotateheaders feature, should be added again after more research of possible ways (<svg> is not nice IMHO)
* dropped possibility to define CSS classes for table heading, body and footer - can be easily done and better done using just table class and context
2010-03-20 22:15:54 +00:00
Penny Leach
549c1ae680 portfolio MDL-21508 fixed broken forum attachment export
- fixed a lot of logic in the format conflict stuff
- fixed a very specific bug in forum export when exporting a single
  attachment.
2010-03-16 19:07:53 +00:00
Petr Skoda
b9bc201962 MDL-21233 escaped parameter is far more importatnt than the overrideparams in out() method - especially all JS urls should be converted to out(false); also it is possible to create new url with overrided parameters in constructor which might be actually work around the double encoding problems in the url (we should never use the out() in moodle_url constructor itself!) 2010-01-17 09:50:55 +00:00
Petr Skoda
340d461269 MDL-21233 simplifying moodle_url->out() api 2010-01-17 09:18:11 +00:00
Petr Skoda
6ea66ff36c MDL-21233 obviously input tag writing does not belong into the moodle_url class, moving to html_writer instead + simplifying api 2010-01-17 09:06:55 +00:00
Penny Leach
8192522e63 portfolio: MDL-21156 portfolio export format specific pluginfile handling 2009-12-18 13:44:35 +00:00
Martin Dougiamas
b73d1651fe portfolio/lib MDL-15995 Added a missing global declaration for $CFG that broke cron 2009-12-17 03:33:45 +00:00
Petr Skoda
b5d0cafc6f MDL-20787 final switch to new $OUTPUT->pix_url() - yay! 2009-12-16 21:50:45 +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
add93b8f8f portfolio MDL-19356 fixing missing global user in multi-export check 2009-11-19 06:49:57 +00:00
Dan Poltawski
a9ec903149 portfolio: MDL-20897 Add additional format types
Added new specific formats for PDF, Document, Presentation and Spreadsheet

Allow the googledocs plugin to support all these formats
2009-11-18 17:33:19 +00:00
Penny Leach
887160c7cb portfolio MDL-20896 added mimetype checking for portfolio plugins for single-file exports 2009-11-18 15:34:58 +00:00
Penny Leach
3ec8d78626 portfolio MDL-20894 better checking of no common formats 2009-11-18 14:06:03 +00:00
Penny Leach
edf1fc350a portfolio: MDL-20892 moved portfolio/type/* plugins to portfolio/* 2009-11-18 13:27:38 +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
Petr Skoda
7c7d3afab5 MDL-20766 message_send() used intead of events, it will enable us to improve performance and solve db transactions issues independedntly from events, hopefully this will give us more options in future too because the events are designed specifically for communication "moodle-->external systems" 2009-11-07 10:27:57 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
nicolasconnault
642816a60c MDL-19799 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno 2009-08-20 08:50:50 +00:00
nicolasconnault
aa9a686740 MDL-19799 Upgraded calls to helpbutton, print_simple_box* and notify 2009-08-18 05:20:12 +00:00
skodak
98c8594a76 MDL-16438 fixed portfolio regression 2009-07-04 09:48:56 +00:00
tjhunt
f2a1963c43 MDL-19690 - lots more $CFG->pixpath to $OUTPUT->old_icon_url 2009-07-02 11:09:15 +00:00
skodak
17da2e6f28 MDL-16438 centralise information about plugins to avoid duplication, includes local customisation conversion to standard plugin structure + fixes for some recent regressions; see tracker for more details and links to docs and forums discussions 2009-06-19 14:25:56 +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
samhemelryk
50fcb1d835 lib MDL-19236 Added boilerplates and copyrights 2009-05-26 03:23:32 +00:00
skodak
d1aa1e4855 MDL-17758 fixed hardcoded /admin/ links 2009-01-01 14:25:29 +00:00
mjollnir_
6be1dcae99 MDL-16587 bit of a large refactor of the portfolio formats. still more to come. 2008-10-11 17:33:20 +00:00
mjollnir_
5f98870bf2 MDL-16526 - don't notify admins about misconfigured plugins, only plugin instances. 2008-09-18 09:57:08 +00:00
mjollnir_
2512cb3509 MDL-14591 - recover gracefully from portfolio cron 2008-09-16 21:41:26 +00:00
mjollnir_
b816c08a3f MDL-16526 - added admin notifications for misconfigured portfolio plugins.
does not get triggered while admin is currently editing, only when users use it.
2008-09-16 19:09:30 +00:00
mjollnir_
6e6cf8a366 MDL-16520 - print info about current export 2008-09-16 12:28:20 +00:00
mjollnir_
a476313639 MDL-16520 - make the already exporting portfolio error more user friendly 2008-09-16 10:41:17 +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_
11ae365cf2 MDL-16423 - fixing regression i introduced in refactor with missing global 2008-09-11 14:12:07 +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
nicolasconnault
ef6f0f603d MDL-15666 new unit test for new button class 2008-09-10 17:08:14 +00:00
mjollnir_
d1581fc53b MDL-16423 - make the button object more robust by detecting errors better 2008-09-10 16:46:23 +00:00
mjollnir_
380a251f58 MDL-16423 - fixing bugs in last commit (portfolio_add_button refactor) 2008-09-10 16:43:33 +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_
bee4bce2a9 MDL-15833 - provide helper functions to determine expected time, and allow admins to set thresholds. 2008-09-09 08:57:51 +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
mjollnir_
ea0de12f10 MDL-16360 - added support for mime-style subformat detection for portfolio supported formats
works well with flickr plugin (tested by uploading an image as a forum attachment and being offered flickr plugin but not for normal attachments)
2008-09-05 17:07:22 +00:00
mjollnir_
150533305c MDL-14591 - improved phpdocs in portfolio_exporter class, fixed 2 bugs 2008-09-05 12:40:46 +00:00
nicolasconnault
77ac22a5b6 MDL-15666 sha1 tests for glossary callers. Entry caller test currently fails. 2008-09-04 11:44:48 +00:00