moosh icon indicating copy to clipboard operation
moosh copied to clipboard

Plugin Install: Argument names/descriptions do not match behaviour

Open janeklb opened this issue 8 years ago • 1 comments

  • moosh version: as early as 0.21, up to 0.23
  • moodle version: any
    • database: any
  • php version: any
  • operating system: Debian/Ubuntu (though should be any)

Actual behaviour

moosh plugin-install requires 3 arguments: plugin_name moodle_version plugin_version. The moodle_version argument actually maps to a "moodle release", though this is not really an issue, only mentioning it because of what comes next. The plugin_version argument maps to a moodle version, and doesn't check the plugin version whatsoever. Meaning, this command will only ever install a plugin if you pass in a Moodle "release version" (eg. 3.1) and a Moodle version (eg. 2016050400 - though which version timestamp that is exactly, i don't know - part of the mystery of https://download.moodle.org/api/1.3/pluglist.php :) ).

Expected behaviour

Have some way of specifying the plugin version. Also, maybe there's no point in specifying the moodle version, since moosh will be able to automatically pick up the moodle version from the current path. Overall, the syntax for this command is a bit lacking. A new approach could be favourable.

Steps to reproduce

Taking mod_attendance as an example: https://moodle.org/plugins/pluginversions.php?plugin=mod_attendance

Right now, the latest plugin version is 2016052201. So, in according to the command docs, you should be able to run moosh plugin-install mod_attendance 3.1 2016052201. This results in Couldn't find mod_attendance 3.1

janeklb avatar Aug 10 '16 07:08 janeklb

The behavior is still the same in 0.23

alform avatar Sep 09 '16 14:09 alform