85 Commits

Author SHA1 Message Date
Sam Marshall
bf81b16824 Unit tests MDL-24981 Fixed portfolio unit test so it at least runs (albeit with 23 exceptions and only 2 passes) 2010-11-01 18:00:57 +00:00
Petr Skoda
7c109ea3f0 MDL-24276 "static abstract" combination is deprecated since PHP 5.2, replacing with our coding_style exception 2010-09-19 18:43:52 +00:00
Penny Leach
2ae76ab6ed portfolio MDL-24267 fixing misnamed variable 2010-09-18 11:50:39 +00:00
Penny Leach
86fef7764a portfolio MDL-24266 fixing a typo in class name instance of check found by petr's insane new toy 2010-09-18 11:50:12 +00:00
Petr Skoda
c983324336 fixed invalid form setType() call 2010-09-18 10:56:15 +00:00
Petr Skoda
520ab2b1b0 removed unnecessary break that was breaking code inspection 2010-09-18 10:51:24 +00:00
Petr Skoda
7def9d4345 improved docs 2010-09-18 10:50:50 +00:00
Penny Leach
90636e2b41 portfolio MDL-24251 make sure $PAGE context is set up properly 2010-09-17 09:39:56 +00:00
Petr Skoda
0424cfe307 fixed comment typos 2010-09-03 15:59:25 +00:00
Penny Leach
ebb7e78267 portfolio/leap2a MDL-23955 updated leap2a support to 2010-07 version 2010-08-28 10:00:27 +00:00
Petr Skoda
ede7252234 MDL-23784 finally getting rid of all legacy .gif and .png extensions, yay! fixing issues with incorrect & in JS code 2010-08-12 20:37:24 +00:00
Petr Skoda
0972665f65 MDL-21249 improved php docs and adding direct access prevention in portfolio 2010-07-25 14:02:59 +00:00
Dan Marsden
dab61f9af9 Portfolio MDL-22950 regression - fix usage of archive_to_storage using new component var 2010-07-05 03:10:10 +00:00
Petr Skoda
64f93798d4 MDL-22950 adding new component column to the files table, unfortunately this change requires changes in all 2.0dev code, please review all custom code that was already upgraded to 2.0; fixing multiple problems and regressions in mod/assignment 2010-07-03 13:37:13 +00:00
Martin Dougiamas
6010eda22d MDL-22813 Thanks to Mark Nelson from Pukunui Technologies, Portfolio management now looks like Repository. 2010-06-28 06:02:55 +00:00
Petr Skoda
5ebb660ebd MDL-14589 fixed incorect php docs return type 2010-05-03 20:13:56 +00:00
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
9d429f0bae portfolio api MDL-14591 fixing small bugs and removing debugging 2010-05-02 18:00:52 +00:00
Penny Leach
38652d9076 portfolio MDL-22264 made supported_formats non static 2010-05-01 14:40:38 +00:00
David Mudrak
8e642e1f26 MDL-22212 Fixing portfolio format Leap2A strings location
I took all strings from legacy /lang/en/portfolio_format_leap2a.php plus
added a missing one for emptyselection exception.
2010-04-27 12:56:25 +00:00
Penny Leach
a1e1af19ef portfolio MDL-16124 improved the portfolio_formats conflict resolution 2010-03-21 17:19:56 +00:00
Penny Leach
29fc57afa5 portfolio/leap2a MDL-21030 fixed a syntax problem in category schemes 2010-03-21 17:19:42 +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
50938e30b8 portfolio MDL-21878 fixed image export format conflicts 2010-03-20 13:14:02 +00:00
Dan Poltawski
3c29e96a77 portfolio MDL-20896 - update documentation to not lie ;-) 2010-03-20 10:41:07 +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
Penny Leach
491fff6497 portfolio/leap MDL-21030 fixed a namespace problem in the leap2a relationships 2010-03-01 13:45:05 +00:00
Penny Leach
fba249c9c5 portfolio/leap MDL-21030 fixed a namespace problem in the leap2a relationships 2010-02-26 14:13:18 +00:00
Penny Leach
b8824f38e4 portfoli MDL-21699 workaround for php 5.3 reference changes in call_user_func 2010-02-23 11:25:32 +00:00
Penny Leach
287efec6f6 mnet MDL-21276 get rid of all the $MNET* globals 2010-02-02 03:13:40 +00:00
Penny Leach
de260e0f7b mnet MDL-21261 large overhaul. This commit changes:
- The way that mnet rpc functions are registered.  Plugins must now
  create db/mnet.php which is an array, similar to services.php.  This
  *replaces* the old mnet_publishes() functions.  version.php must be
  bumped to trigger this.

- More information about each rpc-available function is stored in the
  database, including the class it belongs to, the file it is found in,
  and whether or not it is static.  Methods that are not static must be
  in a class with a constructor that takes no arguments (this can easily
  be achieved with a small wrapper if necessary)

- The xmlrpc dispatcher has been rewritten to remove all the
  dependencies on hardcoded information about auth,mnet,portfolio and
  repository, and just use the information in the database.

- The old hardcoded hidden mnet/testclient.php has been moved to the
  Admin menu under "Development" and rewritten.

- The xmlrpc introspection method profiling is now using php and zend
  reflection - which is a lot nicer than the old way, which was using a
  php-based php parser.  This fixes some inconsistent handling of
  methods without arguments that were advertising their return value as
  the only method parameter.  While this is a *fix*, it breaks BC
  slightly - the old 1.9 broken mnet/testclient.php will now not work
  properly with 2.0

- Dangerous mode is still supported, but old mod/*/rpclib.php is
  now unsupported, due to the fact that any plugin can export mnet
  functions with db/mnet.php.  This is a slight BC break.

Still TODO:

- TEST TEST TEST
- Document the two small BC breaks in release notes
- Document the contract for db/mnet.php
2010-01-28 05:25:50 +00:00
Penny Leach
6a2640d239 NOTABUG updated the portfolio plugin baseclass method signatures 2010-01-28 05:12:22 +00:00
Penny Leach
82e8d268de portfolio MDL-21156 added a missing lang string and removed a too strict exception 2010-01-04 03:20:48 +00:00
Penny Leach
8192522e63 portfolio: MDL-21156 portfolio export format specific pluginfile handling 2009-12-18 13:44:35 +00:00
Penny Leach
ed986e0082 portfolio: MDL-21030 added helper function to add multiple attachments 2009-12-18 13:44:23 +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
bce9a8198f portfolio/leap2a MDL-21036 & MDL-21034 : use proper date format in leap2a, and updated forum to use it 2009-12-05 09:42:42 +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
40d6bc4825 portfolio NOBUG added some more helpful debugging information about common formats 2009-11-19 07:02:15 +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
edf1fc350a portfolio: MDL-20892 moved portfolio/type/* plugins to portfolio/* 2009-11-18 13:27:38 +00:00
Penny Leach
5d0dbf130d portfolio MDL-20872 elegant handling of cleanup/display race condition
lots of work to elegantly resolve the issue between interactive browser
sessions and "pull" portfolio plugins that cause a race condition where we lose
the ability to display information to the user if the pull cleans up the export
first.  this also improves the portfolio transfer log display for later
2009-11-18 12:27:15 +00:00
Penny Leach
a67dc2746a portfolio: MDL-20872 - detect the case where a plugin has pulled the file before the user's browser is redirected gracefully 2009-11-18 10:09:48 +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
e1b9ac3ef8 portfolio - MDL-19356 - add instance column to portfolio_tempdata
this is the first step in moving towards supporting multiple exports per session.

however, some plugins aren't going to be able to support this (eg box.net) so
we add the instance to the tempdata table, so that we can quickly check whether
we have an export of the same *type* of plugin in the session.
2009-11-16 15:02:52 +00:00
Penelope Leach
384ba38af4 portfolio - MDL-19356 - rename allows_multiple to allows_multiple_instances
this disambiguates, so we can have a function called allows_multiple_exports
2009-11-16 12:57:59 +00:00
Penelope Leach
086831a67c NOBUG - Added a bunch more phpdocs to the portfolio code 2009-11-16 12:57:15 +00:00