Moodle

Develop "moodle" plugin to browse distant Moodle sites via mnet

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0
  • Fix Version/s: DEV backlog
  • Component/s: Repositories
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

This plugin should allow someone to browse a foreign Moodle site connected via Mnet and to see all the raw files they have access to there.

Specification: http://docs.moodle.org/en/Development:Moodle_Repository_Plugin

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

Should tie in with your WS knowledge

Show
Martin Dougiamas added a comment - Should tie in with your WS knowledge
Hide
Jerome Mouneyrac added a comment -
Show
Jerome Mouneyrac added a comment - functional specification can be find at http://docs.moodle.org/en/Development:Moodle_Repository_Plugin
Hide
Jerome Mouneyrac added a comment -

As the Remote plugin use Local code, we need first to make the local code working properly

Show
Jerome Mouneyrac added a comment - As the Remote plugin use Local code, we need first to make the local code working properly
Hide
Jerome Mouneyrac added a comment -

Ok I commited the first version of the remote plugin. It works just need to test and check that all is ok about security

Show
Jerome Mouneyrac added a comment - Ok I commited the first version of the remote plugin. It works just need to test and check that all is ok about security
Hide
Jerome Mouneyrac added a comment -

You can currently test it and it works, but I did it wrong.
I created and called a mnet system method. I should add a published mnet method and call this one.

Still need to be done:

  • Communication process needs to be modified.
  • Check that the moodle version is >2.0 (just check that the new mnet method is returned by system/methodList)
  • Clean code
Show
Jerome Mouneyrac added a comment - You can currently test it and it works, but I did it wrong. I created and called a mnet system method. I should add a published mnet method and call this one. Still need to be done:
  • Communication process needs to be modified.
  • Check that the moodle version is >2.0 (just check that the new mnet method is returned by system/methodList)
  • Clean code
Hide
Jerome Mouneyrac added a comment -

Ok, plugin works now with mnet service (not system method). The search works as well. An error message appears when you try to connect to a server that doesn't have the remote method implemented (moodle < 2.0)

Still need to be done:

  • some part of the code (file listing) are pretty similar to the local plugin, it would be good to make a unique function managing the few difference
  • still need more cleaning and comment
Show
Jerome Mouneyrac added a comment - Ok, plugin works now with mnet service (not system method). The search works as well. An error message appears when you try to connect to a server that doesn't have the remote method implemented (moodle < 2.0) Still need to be done:
  • some part of the code (file listing) are pretty similar to the local plugin, it would be good to make a unique function managing the few difference
  • still need more cleaning and comment
Hide
Jerome Mouneyrac added a comment -

The communication also needs to be checked by a token process (primary task to do)

Show
Jerome Mouneyrac added a comment - The communication also needs to be checked by a token process (primary task to do)
Hide
Jerome Mouneyrac added a comment - - edited

In the two new implemented mnet methods, the server checks that the user exists for the MNET_REMOTE_CLIENT, and it checks user permission on a requested file. I don't think we need a token process.

I also cleaned and commented the code.

Still need to be done:

  • display a message if no peers are set (administration)
  • merge local-remote code together (the function build_tree() is very similar and the function encode_path() is identical)
  • improve this similar code in order to not display a folder if it doesn't contains any files
Show
Jerome Mouneyrac added a comment - - edited In the two new implemented mnet methods, the server checks that the user exists for the MNET_REMOTE_CLIENT, and it checks user permission on a requested file. I don't think we need a token process. I also cleaned and commented the code. Still need to be done:
  • display a message if no peers are set (administration)
  • merge local-remote code together (the function build_tree() is very similar and the function encode_path() is identical)
  • improve this similar code in order to not display a folder if it doesn't contains any files
Hide
Jerome Mouneyrac added a comment -

After fixing the Local plugin, the code is similar. Common code needs to be merged into one function.

Show
Jerome Mouneyrac added a comment - After fixing the Local plugin, the code is similar. Common code needs to be merged into one function.
Hide
Jerome Mouneyrac added a comment -

I commited the local/remote common code into repository lib

Still need to do:

  • write administrator manual in the moodle docs
  • display a message if no peers are set (link to the moodle docs)
  • improve the common code (repository_get_user_file_tree()) in order to not display a folder if the folder doesn't contain any files
Show
Jerome Mouneyrac added a comment - I commited the local/remote common code into repository lib Still need to do:
  • write administrator manual in the moodle docs
  • display a message if no peers are set (link to the moodle docs)
  • improve the common code (repository_get_user_file_tree()) in order to not display a folder if the folder doesn't contain any files
Hide
Jerome Mouneyrac added a comment -

Local and Remote plugin display now only folders containing a file.

Show
Jerome Mouneyrac added a comment - Local and Remote plugin display now only folders containing a file.
Hide
Jerome Mouneyrac added a comment -
Show
Jerome Mouneyrac added a comment - documentatio is here: http://docs.moodle.org/en/admin/managerepository/remotemoodle
Hide
Jerome Mouneyrac added a comment -

follow the changes on the local plugin. Once local plugin is marked as resolved, please adapt the remote plugin to reflect the local plugin changes. Thanks.

Show
Jerome Mouneyrac added a comment - follow the changes on the local plugin. Once local plugin is marked as resolved, please adapt the remote plugin to reflect the local plugin changes. Thanks.
Hide
Lailatul Hidayah added a comment -

could I see the code? where can I download it?

Show
Lailatul Hidayah added a comment - could I see the code? where can I download it?
Hide
Jerome Mouneyrac added a comment -

it's on Moodle CVS, however it needs full refactoring. It was done before the file API 2.0 and it was based on the local plugin. Since this time file API has been fully implemented, local plugin has been changed and Mnet is not working on 2.0 at this moment. We need to fix mnet first.

Show
Jerome Mouneyrac added a comment - it's on Moodle CVS, however it needs full refactoring. It was done before the file API 2.0 and it was based on the local plugin. Since this time file API has been fully implemented, local plugin has been changed and Mnet is not working on 2.0 at this moment. We need to fix mnet first.
Hide
Lailatul Hidayah added a comment -

hmm..seems that I need to know more about API 2.0. thanks for your information _

Show
Lailatul Hidayah added a comment - hmm..seems that I need to know more about API 2.0. thanks for your information _
Hide
Martin Dougiamas added a comment -

Let's bounce this after 2.0. Can you move this to contrib please Dongsheng?

Show
Martin Dougiamas added a comment - Let's bounce this after 2.0. Can you move this to contrib please Dongsheng?
Hide
Jerome Mouneyrac added a comment -

It is "planned" for 2.1.
If you want it please vote for it.

Show
Jerome Mouneyrac added a comment - It is "planned" for 2.1. If you want it please vote for it.

People

Vote (2)
Watch (2)

Dates

  • Created:
    Updated: