60518 Commits

Author SHA1 Message Date
David Mudrák
3ca1b54642 MDL-39087 Use progress_trace class to display uninstallation progress
This is much better API than using the array passed by reference. At the
moment, it is pretty hacky as it abuses text_progress_trace to output
raw HTML echoed by uninstall_plugin() but that will be improved later
while moving the logic out of that function into the plugin_manager.
2013-04-12 04:02:28 +02:00
David Mudrák
c2d2001a14 MDL-39087 Improve the Plugins overview renderer
As suggested by Tim Hunt during the peer-review, rendering methods
should not set properties of the page they are producing HTML code for.
Additionally, the page now uses correct check that the uninstalling can
happen.
2013-04-12 03:32:35 +02:00
David Mudrák
ccc6c15fd2 MDL-39087 Fix plugin_manager::can_uninstall_plugin() implementation
There was a false positive result for subplugin required by other
subplugin. See the unit test.
2013-04-12 03:23:47 +02:00
David Mudrák
54d7589397 MDL-39087 Improve the Plugins overview table layout
This patch returns the layout of the Uninstall | Settings links to two
columns. There is no space saved on the screen by using the single
column and two columns align better. The reasoning for using single
column was that there would be multiple links in the 'Actions' column
but that does not seem to happen anytime soon.
2013-04-12 01:44:35 +02:00
David Mudrák
73658371eb MDL-39087 Simplify get_uninstall_url() interpretation
The get_uninstall_url() method of all subclasses of plugininfo_base
class is now expected to always return moodle_url. Subclasses can use
the new method is_uninstall_allowed() to control the availability of the
'Uninstall' link at the Plugins overview page (previously they would do
it by get_uninstall_url() returning null). By default, URL to a new
general plugin uninstall tool is returned. Unless the plugin type needs
extra steps that can't be handled by plugininfo_xxx::uninstall() method
or xmldb_xxx_uninstall() function, this default URL should satisfy all
plugin types.

The overall logic is implemented in plugin_manager::can_install_plugin()
that respects the plugininfo class decision and vetoes it in certain
cases (typically when plugin or its subplugin is required by some other
plugin).
2013-04-12 01:44:35 +02:00
David Mudrák
d7d48b4091 MDL-39087 Add new helper methods to the plugin_manager API
These are mainly intended for callers that had to iterate over
get_plugins() result manually.
2013-04-12 01:44:34 +02:00
David Mudrák
c6f4c88ffb MDL-39087 Offer deleting for standard plugins if possible, too
The plugin_manager::is_plugin_folder_removable() method should do just
one thing and do it well. Also, as was raised during the peer-review,
there should not be technical differences between standard plugins and
add-ons.
2013-04-12 01:42:58 +02:00
David Mudrák
86a862cdc2 MDL-39087 Add missing unit tests for the plugin_manager
This patch improves and adds unit tests for the plugin_manager class.
These unit tests cover the existing functionalities. Tests for the
new features related directly with MDL-38259 will be added in a separate
commit (to make it clear what's related to it).
2013-04-12 01:42:58 +02:00
David Mudrák
7a46a55d00 MDL-39087 Fix plugin_manager::plugin_name() implementation
This is not directly related to the issue. However, it turned out that
if this method was called on plugin_manager without loaded plugins, it
would throw an error. This new implementation uses cleaner access to the
plugininfo subclass.
2013-04-12 01:42:58 +02:00
David Mudrák
bfaed43214 MDL-39087 Fix missing cronlib inclusion in file_storage::cron()
This is not actually related to MDL-38259 but it was discovered while
running unit tests for file_storage. When running the tests for this
class separately, the cronlib.php was not included (it is included
when this method is normally called during cron execution).
2013-04-12 01:42:58 +02:00
David Mudrák
546b886416 MDL-39087 Delete all component files in uninstall_plugin() 2013-04-12 01:42:58 +02:00
David Mudrák
5718a12313 MDL-39087 Purge all caches at the end of uninstall_plugin()
This is necessary now as many plugins management related features
started to use MUC intensively recently. During the development of this
issue, we realized that the plugin was still considered as installed if
caches were not purged.
2013-04-12 01:42:58 +02:00
David Mudrák
436d94478d MDL-39087 Implement a common interface for uninstalling general plugin
Plugins may use this general tool for uninstallation and eventually
removal of the deployed source code. At the moment, this is implemented
as a wrapper for the core function uninstall_plugin() with an extra hook
in the relevant plugin info subclass.

For non-standard add-ons, the tool can remove the deployed plugin source
code as well, if the web server has required write permissions. Ideally,
all add-ons installed via the new tool_installaddon should be removable
via the web interface as well.
2013-04-12 01:42:58 +02:00
David Mudrák
0b733dd9e2 MDL-39087 Clarify plugininfo_base::get_uninstall_url() return value
The method now returns null if there should be no 'Uninstall' link at
the Plugins management screen. For non-standard add-ons the method now
returns URL to a general uninstall tool.

Plugin info subclasses can still override the method to provide URL to
their own UI for uninstalling. If the plugin type wants to use the
general uninstall tool also for standard plugins, it should override
this method and explicitly return $this->get_default_uninstall_url().
Otherwise, the 'Uninstall' link will be provided for add-ons only.
2013-04-12 01:42:58 +02:00
Eloy Lafuente (stronk7)
b3661ab272 on demand release 2.5beta+ 2013-04-11 12:38:46 +02:00
Eloy Lafuente (stronk7)
f6cec2fd62 Merge branch 'install_master' of git://git.moodle.cz/moodle-install 2013-04-11 12:32:32 +02:00
Dan Poltawski
a96eb3a55f Revert "MDL-38254 Assignment Module: add avaialble message to all assignment types"
This reverts commit 2612e21bd4450bf94b7e5ac259e2d0b0b3bbcf7b.
2013-04-11 16:52:25 +08:00
Dan Poltawski
3ee53622bf Merge branch 'm25_MDL-39061_Trivial_incorrect_MD' of https://github.com/scara/moodle 2013-04-11 10:19:10 +08:00
Eloy Lafuente (stronk7)
e592ccd860 Merge branch 'MDL-38525-master' of https://github.com/damyon/moodle 2013-04-11 00:56:45 +02:00
Eloy Lafuente (stronk7)
2e140437b1 Merge branch 'MDL-38937_master' of git://github.com/dmonllao/moodle 2013-04-11 00:43:59 +02:00
Eloy Lafuente (stronk7)
2cef0f7c33 Merge branch 'MDL-38939_master' of git://github.com/dmonllao/moodle 2013-04-11 00:32:40 +02:00
Eloy Lafuente (stronk7)
a7ed1eca08 Merge branch 'MDL-38970_master' of git://github.com/dmonllao/moodle 2013-04-11 00:22:42 +02:00
Eloy Lafuente (stronk7)
b812305ef6 Merge branch 'w15_MDL-38989_m25_ttfinal' of git://github.com/skodak/moodle 2013-04-10 15:45:16 +02:00
David Monllao
fac8515d63 MDL-38970 behat: New test
According to MDLQA-65, a teacher can
prevent or allow assignment submission
changes.
2013-04-10 17:35:01 +08:00
David Monllao
9afb97a701 MDL-38939 behat: New test
According to MDLQA-33, a teacher can set
whether glossary entries are always editable.
2013-04-10 16:51:53 +08:00
David Monllao
6b9c866757 MDL-38939 behat: Allow admin setting to be set in non-JS sessions 2013-04-10 16:51:48 +08:00
David Monllao
8580cf8637 MDL-38937 behat: New test
According to MDLQA-39, a teacher can
choose whether to provide a printer-friendly
glossary entries list
2013-04-10 16:44:35 +08:00
Damyon Wiese
5e92828603 MDL-38525: Assignment upgrade - Error with comments for unenrolled students.
Students with comments on 'upload' assignments cause errors for the upgrade
tool if they are no longer enrolled. The solution is to allow siteadmin to
see student submissions even if the student is not currently enrolled (you
must be siteadmin to run the upgrade tool).
2013-04-10 16:09:56 +08:00
Petr Škoda
0ddd65d9e0 MDL-38989 add missing test timeout reset 2013-04-10 09:49:19 +02:00
Petr Škoda
71fc50031d MDL-38989 detect changed timeout in tests
The trouble is that PHPUnit should ideally test mostly low level libraries that should not change the timeouts.
2013-04-10 09:48:57 +02:00
Dan Poltawski
a4b524e931 Merge branch 'MDL-38973-master' of https://github.com/damyon/moodle 2013-04-10 14:48:49 +08:00
Ryan Panning
c6d7956e55 MDL-38525: Assignment - print exception message when assignment upgrade fails.
Change to use getMessage() from the Exception class will prevent "{$a}" when
$e->error is null.
2013-04-10 14:38:05 +08:00
Dan Poltawski
95cd4369bb Merge branch 'MDL-19072' of git://github.com/jmvedrine/moodle 2013-04-10 14:10:37 +08:00
Damyon Wiese
5ef72f85cf MDL-38973 Assignment - Attempt history not displaying for blind marking
This change makes the attempt history display for teachers and students
even when there is no grade (e.g. blind marking). It also will show the previous
attempt in the grading table when a submission has been newly reopened (instead
of a blank submission).
2013-04-10 13:44:42 +08:00
Mark Nelson
1711361042 MDL-26649 forms: ensure that both necessary variables are set before altering calendar image 2013-04-10 12:48:13 +08:00
Dan Poltawski
d2b11df8bd Merge branch 'wip-mdl-35883' of git://github.com/rajeshtaneja/moodle 2013-04-10 12:16:23 +08:00
Dan Poltawski
e870c16077 Merge branch 'MDL-38254' of git://github.com/rwijaya/moodle 2013-04-10 12:08:46 +08:00
Dan Poltawski
aefd2e5d35 Merge branch 'MDL-39041-master' of git://github.com/damyon/moodle 2013-04-10 11:57:49 +08:00
Damyon Wiese
5091b20052 MDL-39041 Assignment - Fix regression in "allow submission changes".
A typo was introduced in the assignment attempt history feature that broke
unlock submissions. This was detected by the new behat test in MDL-38970 (yay).
2013-04-10 11:30:41 +08:00
Damyon Wiese
f8ddbd24d7 Merge branch 'MDL-38935' of git://github.com/timhunt/moodle 2013-04-10 11:17:31 +08:00
Dan Poltawski
ac208538b7 Merge branch 'MDL-38030-master' of git://github.com/mouneyrac/moodle 2013-04-10 11:11:47 +08:00
Dan Poltawski
7f2ac368e8 Merge branch 'MDL-38933-master' of git://github.com/damyon/moodle 2013-04-10 11:09:05 +08:00
Dan Poltawski
bf11c1d128 Merge branch 'MDL-22153' of git://github.com/stronk7/moodle 2013-04-10 10:58:32 +08:00
Dan Poltawski
cfaacebb01 Merge branch 'MDL-39059-workshop-settype' of git://github.com/mudrd8mz/moodle 2013-04-10 10:55:45 +08:00
Dan Poltawski
fbd90ba191 Merge branch 'MDL-37410-master' of git://github.com/mouneyrac/moodle 2013-04-10 10:37:29 +08:00
Dan Poltawski
0bedc806f9 Merge branch 'MDL-38999' of git://github.com/stronk7/moodle 2013-04-10 10:35:40 +08:00
Petr Škoda
70faad655a MDL-38912 fix incorrect timeout reset 2013-04-10 00:06:34 +02:00
Eloy Lafuente (stronk7)
e6c7a5887b Merge branch 'MDL-38938_master' of git://github.com/dmonllao/moodle 2013-04-09 23:43:46 +02:00
Eloy Lafuente (stronk7)
3621633194 Merge branch 'MDL-38950_master' of git://github.com/dmonllao/moodle 2013-04-09 23:42:59 +02:00
Matteo Scaramuccia
67dfcb3df6 MDL-39061 Cache: (trivial) incorrect MD sublisting 2013-04-09 23:40:18 +02:00