Plugins directory code update

Plugins directory code update

by David Mudrák -
Number of replies: 24
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Last week, the Plugins directory site was updated with some minor improvements. Here comes a short overview of changes.

  • When registering a new plugin, or uploading a new version of an existing plugin, users are now asked to explicitly declare they have checked the plugin contribution checklist. We believe this won't be simply ignored as "yet another must-agree-or-nothing" widget. In the checklist, we try to summarize common issues often seen in new plugins. Some of these issues are harder to get right once the plugin is published and we may send the plugin back to the maintainer because of them. By checking your code before submitting it, you help the plugin reviewers to not waste their time by repeating same comments over and over again. Thanks for understanding.

  • Validation rule for the $plugin->requires declaration was fixed (see MDLSITE-3753 for details).

  • The Supported Moodle versions is now required field. This field is essential to make the available updates notification, automatic updates deployment and on-click plugin installation work. Shortly, it plays important role when determining the most recent plugin version that should be used at the given Moodle version site. The importance of the field was not obvious in the previous UI.

  • Plugin and plugin version pages and editing forms were slightly reorganised to provide a bit more friendly and intuitive interface (among others, the plugin description and the version release notes are now displayed at more prominent place).

  • Plugin main pages now have nicer URL.

  • The option 'Rename root directory' is now enabled by default when uploading a new ZIP.

  • The validator makes use of $plugin->component declaration in the version.php file when auto-detecting the type of the uploaded plugin. Warning is displayed when this declaration is not present as it will be required for Moodle 3.0 (MDL-48494).

  • We are trying to re-organise the current "Other plugins" category to reflect various reasons the plugin may end up there.

As usually, the backlog of things to fix and improve is much longer than the one above. Particularly, I would like to get to overall review and clean-up of the plugins related Moodle documentation soon, to make it up-to-date and easier to navigate.

Finally, thanks all the contributors for your awesome work on various Moodle plugins. It's always pleasure to see innovative, useful and well written plugins that extend the Moodle standard functionality. Also, big thanks to our Plugin guardians for providing peer-reviews on submitted plugins on community self-help basis.

Average of ratings: Useful (3)
In reply to David Mudrák

Re: Plugins directory code update

by ryan sanders -

to state some things in another way... www.moodle.org/plugins  and then www.yoursite.com/moodle/ -> login as site admin -> site admin menu -> notifications...

you are building towards kinda of a joomla and/or opencart. back end in site admin menu. for installing / upgrading plugins.

i am assuming... site admin menu -> plugins -> manage plugins  has a few extra columns and/or buttons displaying information about an upgrade or not?

and information, entered at www.moodle.org/plugins  is going to be pulled up into (site admin menu -> plugins -> plugin manger)?  vs browsing to www.moodle.org/plugins ? through an I-frame or direct database calls back to www.moodle.org/plugins (what ever database is setup for the plugins) err or some sort of combo there of? 

i assume.. the... $plugin->requires in version.php will eventually give possible automatic installation. of required plugins, if person choose a plugin that requires some other plugin, it will installed required plugin first, before install plugin choosen? and install updates first to required plugin, before upgrading stuff that requires the given plugin?  

  • example foobar_tree requires foobar to be installed,  foobar gets installed and/or updated first, before foobar_tree gets installed/updated?



In reply to David Mudrák

Re: Plugins directory code update

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks David. 

Its great to see the plugins database getting developer time. Keep up the good work.

In reply to David Mudrák

Re: Plugins directory code update

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi David,

Congratulations on all the plugins page improvements.

But today I tried to read the full review (by Gavin Henrick) of the progress bar plugin at https://moodle.org/plugins/reviews.php?plugin=block_progress  (https://moodle.org/plugins/reviews.php?version=7&review=3 ) and I got a 'You do not have permission to view this version' error.

Could you please login to this page as a mere mortal and check this error ?

Also, could you please describe the nature (cause) of the error, and what the user should/might do about it, in the documentation page at https://docs.moodle.org/28/en/error/local_plugins/exc_cannotviewversion ?

Thanks in advance for your help.

In reply to Germán Valero

Re: Plugins directory code update

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Hi German. This is known issue to me. There were some issues with the existing reviews system detected and unless they are resolved, the whole reviews feature was hidden from the UI and the capability to see existing reviews was removed from all users.

I don't even think that that thrown exception is correct one. Can you please report this post as a new bug in the tracker for me? (MDLSITE, component "moodle.org/plugins"). Thanks,

In reply to David Mudrák

Re: Plugins directory code update

by Brendan Heywood -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Can I suggest a new feature for the plugin directory:

As well as parsing the version.php for metadata, if it's a resource / module also do a very minimal bootstrap and execute pluginname_supports($feature) and then store all the results in the plugin directory metadata for each release of each plugin.

Then add an advanced search where you can filter for activities that support plagiarism, or grades, or groups etc.

And you could also add more tab to the plugin page:

Which would show a matrix of versions and features so you can easily see stuff like, "ooh in version X they added support for completion tracking"

This could also be a bit more generic so could show different metadata depending on the plugin type, eg you could show whether the course formats support Ajax and whether they use sections. Or whether what formats a block will work with etc


Average of ratings: Useful (1)
In reply to Brendan Heywood

Re: Plugins directory code update

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
It is doable indeed. However, I must admit I would consider it prioritised as nice-to-have rather than must-have feature. But these are very good points that we shall suggest to the plugin maintainers to be included in their README files, plugins descriptions and release notes.
In reply to David Mudrák

Re: Plugins directory code update

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Yes, that could be useful smile

I was also thinking to another thing : being able to know if (how much) a plugin is translated.

Would it be possible, in plugin page, next to the "Contribute translations for Language (xx)", to add something like "xx % translated."?

And perhaps also to add this information when you browse plugin categories, and/or to be able to do a search based on translation percentage.

Séverin

In reply to David Mudrák

Re: Plugins directory code update

by Brendan Heywood -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

What is the story with the directory code itself: There are references to this in the tracker of being a local plugin but I couldn't find it in moodle or moodlehq on github. Is there any reason why this couldn't be open sourced too and accepting pull requests for stuff like this?

In reply to Brendan Heywood

Re: Plugins directory code update

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm not releasing our plugins code because I want plugins development to be organised around one, clean, official plugins repository.  We as a community don't need the confusion and diffusion of different people setting up alternative repositories all over the place.


Help with design (via feedback, mockups, ideas) is necessary and always appreciated, though.

In reply to Martin Dougiamas

Re: Plugins directory code update

by Brendan Heywood -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yeah I completely agree with that sentiment and half expected that. I'm not interesting in a situation like the multiple android app stores.

I'm purely interested in the dev side, would you be open the private sharing, with distribution restrictions, to moodle partners and/or members of the plugins guardian program?

In reply to Brendan Heywood

Re: Plugins directory code update

by ryan sanders -

it would be nice for a little bit extra "text" to go with "site admin menu" -> notification page,   along with, "site admin menu" -> plugins -> update plugins to denote if you register your site with moodle.  you then get an actual site option within  moodle.org/plugins.    

was a bit uneasy registering site even "localhost" dev / test computer. not thinking it would work. and was impressed. all went fine. 

partial reason of "uneasy" was so use to say microsoft updates, antivirus updates. that do not send a whole lot of personal data. but moodle.org/plugins -> registar site.   i am a bit lost of functionality of it. 

though way you have been going at it david, and  i am wondering if not really yet worth time to put much effort into documentation, due to more changes in the works? 

and now i stated above.... *documentation is already there, just not aware of it*  all i see is "contribute your own code.... vs registering your site and get direct installs without messing with downloading and uploading of stuff. 

In reply to ryan sanders

Re: Plugins directory code update

by ryan sanders -

replying to this thread, beyond tracker and/or some other place (not sure where) 

spending roughly 3 to 5 days dealing with moodle 2.8, and then 2.7... and then third party plugins via moodle.org/plugins some issues that have came up.  

1) WAY WAY TOO MANY STEPS to install third party plugin (manual or auto through moodle.org/plugins -> sites

once initial moodle is installed, and turning on "developer debugging" via "site admin menu" -> developer...  and then going to "site admin menu" -> plugins -> "install plugins"  you are down to "right click open in new tab" and clicking back and forth. more than i care to remember. 

2) data i want to view, is separated on different tabs / pages

3) too many checks and balances on different pages if not same page, just stepping through steps within the code.

4) no easy / quick way to uninstall multiple plugins at one time. 

5) currently no "install option" for old plugins for newer versions of moodle.  instead forced to download and manually upload / install plugin. i would prefer to see a "WARNING" something like "NOT SUGGESTED"  

the above sentence i have issues with both ways. pro's / con's but still it was painful. seeing all these other plugins for other moodle versions. but then not an option to install them easily. 

6) there needs to be a way to "order" stuff. from name, to amount of downloads, to recently uploaded / updated. to installed, and like.

7) additional plugin required, for XYZ plugin. 

this one is a big one. while hosting provider is partial to be blamed. i have experienced this on local test computer setup as well.  if i go and try to install 3 or more plugins at a time. and 1 to 2 or more require an additional plugin, that is not yet uploaded into yoursite.com/moodle/*were ever additional plugin needs to be* everything slows down to a snail pace, and some issue start coming up. of html 500 error server not responding, or no data sent from server (not even sure if there is a custom 404, 500, 301 like html errors for this).  due to no data is sent from the server and obtained at the browser.  at times i had to settle to install 1 or 2 plugins at a time. vs running up say 10 to 40 plugins. due to issues of "required additional plugins" for XYZ plugin. 


==============================

what i want / need. to help speed things up. 

1) MAJOR WANT  abilty to compare what is currently installed and what is avilable at moodle.org/plugins 

2) i want a spread sheet, with column / rows. 

  • row 1 
    • name (is it part of a set)
    • total amount of downloads
    • add favorite
    • check box to include in install
    • plus sign, (see row1.1) that expands downwards. (think vertical menus aka "site admin menu") that reveals extra information. 
  • row 1.1
    • short description
    • support thread notation
    • currently installed or not installed 
    • if installed ( version #, and uninstall button with an option multi uninstall "check box" )

to above i need information to STAY VISIBLE. and not have to click back and forth between current (description, download, stats)

i do not care if i send my "moodle plugin info" to moodle.org  or if i download something from moodle.org and everything happens within my site, or moodle.org site and/or both.  i want a spreadsheet like notation or drop down vertical menu, that i can click "check boxes" and then at bottom of page click "next" to install multi plugins at one time, and/or uninstall multi plugins at one time. 

www.phpbb.org and www.joomla.org, and maybe www.zencart.com, come to mind as a nice uninstall / install options 

================

below notations / pages major issues with.

  • yoursite.com/moodle/admin/index.php
  • yoursite.com/moodle/admin/upgradesettings.php
  • logging into moodle at yoursite.com/moodle  and then trying to expand the "site admin menu"  you had to type in something like yoursite.com/moodle/admin/plugins.php  (anything but... yoursite.com/moodle/admin/  or yoursite.com/moodle/admin/index.php)  to gain access to to the site admin menu. and avoid checks and gain access to uninstall plugins, or turn on/off features to see what was going on. 

90% if not 100% of above was due to a third party plugin causing issues to above. and this was for both moodle 2.7 and 2.8 versions. 

some hassles may have been less, if there was a "file manager" something like "file explorer / windows explorer" via third party plugin for moodle. to access physical site files at yoursite.com/moodle/*these files* there was a couple "sql buddy, and one other plugin" do not remember right off. that dealt with database access, that made some things a bit easier / faster, than trying to go through hosting provider / and/or local test computer database pages.

some extra issues. if moodle.org/plugins loaded up in an "iframe" or like within mysite.com/moodle/admin/plugins/yada_yada to much time passing between mysite and moodle.org website.

===========================

while the install from moodle.org/plugins works, and allows for multipuple installs of moodle to happen. just way too many steps, and no easy way to sort stuff. and install / uninstall stuff easily.  more so on the uninstall stuff, more so uninstalling when there are errors due to bad third party plugins and breaking moodle site admin menu "menu itself" and notification / install plugin pages.

=================

overall issues that came up...

to many redirect issues, blank pages, language $strings, ?> after it, use of echo and other notations of pushing info to the browser, additional plugin required,  issues with local plugins, and admin tools plugin types, i had more trouble with.  though plenty of other type of plugins had issue with. most plugins went easy, but the handful of plugins. when install in batches of 5 to 20 at a time of third party plugins...  and then going back and trying to uninstall stuff a couple at a time to narrow down problem plugin...

off to make individual notes on various plugins. 

In reply to ryan sanders

Re: Plugins directory code update

by Derek Chirnside -

Just briefly Ryan.  You say:

once initial moodle is installed, and turning on "developer debugging" via "site admin menu" -> developer...  and then going to "site admin menu" -> plugins -> "install plugins"  you are down to "right click open in new tab" and clicking back and forth. more than i care to remember. 

I can do this quicker.  I think you have some extra steps in here.  Maybe when I get some time later, I'll post.

The fact is, what you describe may be true: whether your organisation has 5,000 students or 50.  I think VLE's are just like that.  I have yet to decide if Moodle is more like that than others.  I actually suspect not.  Chaotic yes,but with a little more freedom.  In the end it depends what you want.

Our test upgrade on my biggest server 2.6 > 2.8 took 8 hours. Then the real thing happened in 3.  But the preparation was quite long as we entered non-updated plugin territory.

But in the midst of your comments, some things probably deserve a tracker vote or a new tracker item.

-Derek

In reply to Derek Chirnside

Re: Plugins directory code update

by ryan sanders -

an example of installing "static pages" a local plugin in moodle 2.7

- = con / negative

+ = pro / postive notation

-/+ = mixed feelings

1) mysite.com/moodle/ (login to set cookie)
2) moodle.org (login to set cookie)
3) moodle.org/plugins -> local plugins 
    • -just short description
    • +supports moodle version.  
    • +latest release date
4) moodle.org/plugins -> local plugins -> Static Pages 
  • DESCRIPTION
    • +total downloads
      • -favorite / likes *meh* not worth it. more folks download it, more likely it is being used and things figured out. 
      • +install now button (for a single listing this is good) but want a check box for multi installs.
      • +download button (for  single lsiting this is good)
      • -/+short description needs a "drop down menu" that i can click say an arrow or + / - sign to hide short description
      • +useful links needs + / - sign to hide/show
      • +screenshots links needs + / - sign to hide/show
      • +contributors links needs + / - sign to hide/show
      • +comments links needs + / - sign to hide/show
    • +DOWNLOAD VERSIONS this needs to be moved to "description" page, with a + / - sign to hide/show
    • +STATS  this needs to be moved to "description" page, with a + / - sign to hide/show
5) moodle.org/plugins -> local plugins -> Static Pages -> clicked on "install now" button
6) moodle.org/plugins -> local plugins -> Static Pages -> clicked on "install now" button -> clicked "install now (one of mysites)"


7) mysite.com/admin/tool/installaddon/index.php?installaddonrequest=*removed code on purpose*=0

  •  -this page is waste of time to me.  all i see is blah blah blah... in a long sentence that is hard to read. and only thing it does is a stop gap between downloading plugin to mysite.com and check if plugin is already installed. 

8) mysite.com/admin/tool/installaddon/index.php?installaddonrequest=*removed code on purpose*=0 -> clicked "continue" button

9) mysite.com/admin/tool/installaddon/validate.php?sesskey=*removed code n purpose*&zip=downloaded.zip&type=local

  •  ++ and one more + plus.  this page is useful. 
  • i need this information covered in the spreedsheet like table at... 

edit forgot to take screen shot

Plugin package validation

Validation passed!
StatusMessageInfo
OKName of the plugin to be installed
stack
OKPlugin version
2014111200
OKRequired Moodle version
2013101800
OKFull component name
qtype_stack
OKDeclared maturity level
MATURITY_STABLE
OKPlugin release
3.3.3 for Moodle 2.6+
DebugFound language file
qtype_stack
OKWrite access check
mysite.com/question/type


10) mysite.com/admin/tool/installaddon/validate.php?sesskey=*removed code n purpose*&zip=downloaded.zip&type=local -> clicked *install plugin* button

  •   +has nice "install update" 
  •  +has nice showing of other plugins that are required
    •  -ugly page. if more than a couple plugins require extra plugins that are not yet installed. mysite.com becomes slow.
    •  -if a plugin required another plugin and that extra plugin was not yet installed it would not finish out installing other plugins. that were green and ready to install
  •  +directory listing

NEED ON THIS PAGE

  •   +delete button.  nothing been installed. but just files uploaded to mysite.com  i need a simple delete button, that removes files from site. from FTP to SSH to other and massive moving of third party plugins into moodle structure. to mis-clicks. it would be nice to have a "delete files" thing. vs going through a bunch of extra steps via hosting provider or other. to remove stuff. 
  • +need to disable updates per plugin. 
  • +need short name for example mod_bigbluebuttonbn   qbehaviour_adaptivemultipart  for main plugin names


Plugin nameDirectorySourceCurrent versionNew versionRequiresStatus
Activity modules
 attcontrol/mod/attcontrolAdditional2014082800
  • Moodle 2013040500
To be installed
There is a new version 2014082801 available!
Release 1.0.0Stable versionDownloadMore info...
 RecordingsBN/mod/recordingsbnAdditional2014070401
  • Moodle 2010112400
  • mod_bigbluebuttonbn (2014070310)
    Install | 
To be installed
Question types
 STACK/question/type/stackAdditional2014111200
  • Moodle 2013101800
  • qbehaviour_adaptivemultipart (2014092500)
  • qbehaviour_dfexplicitvaildate (2014092500)
  • qbehaviour_dfcbmexplicitvaildate (2014092500)
To be installed
Authentication methods
 Auth Development tools/auth/devAdditional2014051200
  • Moodle 2013111800
To be installed
There is a new version 2014051300 available!
Release 1.0Stable versionDownloadMore info...
Local plugins
 Static Pages/local/staticpageAdditional2014051200
  • Moodle 2014051200
To be installed

11) mysite.com/admin/tool/installaddon/validate.php?sesskey=*removed code n purpose*&zip=downloaded.zip&type=local -> clicked *install plugin* button -> clicked "upgrade moodle database" button

+all good

12) green / white listing of updating. have had a couple errors come up on this page.  by default this page auto redirects.  but it would be nice for an optional "check mark" or something for auto redirect for page time outs and like. 

+continue button at very bottom. be nice if auto scrolled to continue button if all was good. 

13) mysite.com/admin/upgradesettings.php?

-/+ mixed feelings. it is good. or less errors come up during installation....

14) admin/upgradesettings.php ((shows up after saving changes to above settings if any))

-problems with errors but not listing the "output of errors"

This page should automatically redirect. If nothing is happening please use the continue link below.
(continue)

Error output, so disabling automatic redirect.

14) mysite.com/admin/index.php?cache=1

FINALLY DONE

=================================

=================================

=================================

it would be awesome to include everything in a couple pages.... 

granted i realize there are extra code and checks that need to happen. i fully understand that. and all the checks are there! and do work. but was hoping for reduce amount of steps.

if i could get  mysite.com/admin/plugins.php to show all the listings at moodle.org/plugins with drop down menus per say of a vertical javascript menu notation. to show extra stuff that shows on moodle.org/plugins pages. along with all the categories.  it would be awesome. so i could see plugins installed, plugins updated, plugins recently released, plugins not installed, and with a click of a - or + icons, see links of where to find information about given plugin.  toss in some checkmark boxes, to "multi" install / uninstall.  

alright time to go track down the step 13) error 

In reply to David Mudrák

Re: Plugins directory code update

by Derek Chirnside -

Just putting this out there as my number one request David:

A place to go to see reverse chronological order of new plugins.

Everything else depends on this.

The plugin landscape is so swiftly changing.  I can always check the posts in the database forums for a plugin - IF I know the new plugin has landed.  

Anything else if difficult at the moment.  There is often doubt about the basics . . .

  1. knowing if a plugin is supported
  2. Knowing if it is up to date 
  3. stable . . .  
  4. What special tweaks are needed to get a thing installed.
  5. where to go to get help etc.  (take your pick: Git, contrib, plugins, forum post, other!!) 
you guys in the coding could spend a lot of time on this aspect, even just trying to indicate what plugins are 'supported' and 'current' - and still not get a good solution.

My 2c worth.

[After the fraught job of getting plugins sorted for an upgrade, killing off the unsupported ones . . .  Now it is looking good]

-Derek


In reply to Derek Chirnside

Re: Plugins directory code update

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Top left of https://moodle.org/plugins/, there is a section Keep up-to-date with some RSS feeds. What do they lack that you need?

(You may need to use the right browser to view them. Firefox worked for me.)


In reply to Tim Hunt

Re: Plugins directory code update

by Derek Chirnside -

@Tim.

Formatting.

In Chrome:


Attachment 16 RSS.jpg
In reply to Derek Chirnside

Re: Plugins directory code update

by Just H -

Derek, you need to use an RSS reader, not just click the link, unless the browser has one built in or you've installed a plugin (for example for Chrome https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd?hl=en).

See https://docs.moodle.org/28/en/RSS_feeds and https://docs.moodle.org/28/en/Remote_RSS_feeds_block

In reply to Derek Chirnside

Re: Plugins directory code update

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

So, don't use Chrome wink

In reply to Tim Hunt

Re: Plugins directory code update

by Derek Chirnside -
Sounds a bit like "fix the user" Tim

Now that I've tried Firefox, it only goes back a small way back in time.  It does look a little better.

-Derek

In reply to Derek Chirnside

Re: Plugins directory code update

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Sounds a bit like "fix the user" Tim

No, it is just a case of Chrome not adding its own formatting to an RSS page, this would be true of other plain RSS pages.  MS IE and Firefox happen to do this. We should fix the user wherever possible of course.
In reply to Tim Hunt

Re: Plugins directory code update

by Derek Chirnside -

So just a quick followup on this.

Is an RSS reader able to go back in time, or only the last few entries?

-Derek

In reply to Derek Chirnside

Re: Plugins directory code update

by Brendan Heywood -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes in theory, if the RSS feed supports pagination, and your RSS client supports pagination.

In this case the rss recent plugins feed doesn't support this so no (but HQ could add this)

In reply to Derek Chirnside

Re: Plugins directory code update

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Derek, I can see the usefulness of such report being built into the Plugins directory page directly (without the need to use the RSS reader). Can you please report a new feature request into the tracker please? (project MDLSITE, component moodle.org/plugins). Thanks in advance.