54 Commits

Author SHA1 Message Date
Meirza
ccac845f11 MDL-78166 lib: Added missing class properties in portfolio
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.

Removing the existing $id property at portfolio_format_leap2a_writer, because
the $id only needed inside the __construct().
2023-05-27 09:28:03 +07:00
Marina Glancy
8fc1486d36 MDL-77164 various: fix incorrect phpdocs 2023-04-13 11:35:06 +01:00
Marina Glancy
2d83a76ed7 MDL-62233 portfolio: check caller parent class 2018-05-10 09:13:03 +08:00
Petr Škoda
fd0e019286 MDL-42541 stop using events for porfolion cron 2014-02-13 12:09:24 +08:00
Frederic Massart
862ca7dbc1 MDL-41041 portfolio: Temporary solution for event portfolio_send
As we have deprecated events_trigger(), the portfolio cannot use it
any more. Though there is no easy solution to get rid of this event
as it is used to register a cron job. MDL-42541 has been raised to
refactor the portfolio code to solve this problem. In the meantime
events_trigger_legacy() will be used.
2013-10-25 14:54:34 +08:00
Dan Poltawski
e86a26c9b2 MDL-37332 portfolio: don't add double slashes
get_filepath() always returns trailing slash.

This breaks windows export - thanks to Jason Platts
2013-05-31 11:49:55 +08:00
Dan Poltawski
0e35ba6ffc MDL-36357 cleanup - remove double semicolons 2012-11-15 09:51:26 +08:00
Mark Nelson
3774324174 MDL-33791 Portfolio: Fixed security issue with passing file paths. 2012-11-08 00:26:13 +01:00
Frederic Massart
c31dc0b695 MDL-33828 Portfolio: prevent notices while exporting to portfolios 2012-07-03 09:33:17 +08:00
Sam Hemelryk
849b9a6af7 MDL-33399 mixed: Fixed up calls to get_area_files that used empty sorts 2012-05-29 16:44:28 +12:00
Sam Hemelryk
18cdcdbf89 MDL-30989 portfolio: Fixed up phpdocs 2012-02-15 15:33:06 +13:00
Rossiani Wijaya
93dd2725e8 MDL-30989 portfolio: updated portfolio phpdocs. 2012-01-30 15:37:46 +08:00
David Mudrak
bf0fc3c057 Improved portfolio export summary layout 2010-11-11 13:32:57 +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
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
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
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
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
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
40d6bc4825 portfolio NOBUG added some more helpful debugging information about common formats 2009-11-19 07:02:15 +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
086831a67c NOBUG - Added a bunch more phpdocs to the portfolio code 2009-11-16 12:57:15 +00:00
Petr Skoda
4a0e2e632f MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:42:23 +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
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
nicolasconnault
7e0d66753e MDL-19799 Converted all print_footer() calls 2009-08-06 14:21:34 +00:00
nicolasconnault
3c15938527 MDL-19799 Migrated calls to print_heading 2009-08-06 08:19:21 +00:00
mjollnir_
bcb39ec9e9 portfolio: removing suplerfluous error_log i forgot to remove earlier. 2009-06-09 19:54:22 +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_
d9c2628b58 MDL-16861 portfolio/export make sure to zip up files including the path info 2008-11-11 18:52:10 +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_
06844b49f4 MDL-16535 - better handling of the expired error 2008-09-16 18:17:28 +00:00
mjollnir_
c737eed82f MDL-16535 - nicer messages about invalid exports 2008-09-16 17:50:55 +00:00
mjollnir_
45b7e6104d MDL-14591 - better handling of variable headers in portfolio export 2008-09-16 14:22:26 +00:00
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_
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