New Moodle and Etherpad Collaborative Doc Plugin

New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Number of replies: 22
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Guys,

We have been working with some developers to finally integrate Etherpad Collaborative Document Editor and Moodle!  The plugin adds an "Etherpad" activity which allows students to work on a document together.  The plugin automatically pulls the usernames from Moodle into the Etherpad Editor.   So far it works really well.  

Here is a link to a demo video on my blog.  We hope to have this out in the community very soon! http://blog.dearbornschools.org/webmaster/2012/04/02/etherpad-and-moodle-integration-moduleplugin-demo-video/

Average of ratings: -
In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

This looks really exciting Chris - looking forward to trying it out as soon as you release it. Online collaboration within moodle (ie not having to go out to googledocs) is a frequently requested feature here!

Are you using a self-hosted etherpad instance? How easily is that set up?

Richard

In reply to Richard Oelmann

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

We are self hosted and it took longer to setup the VM than to install Etherpad.  It was no more complicated than installing Moodle.  You will need a Etherpad API Key in order to use the plugin which comes from installing it on your own server.  The server load is minimal as well.  

We are working with John McLear (of Etherpad Foundation) to get the plugin developed.  We are just working out a few details and we hope to have it released soon.  

We have been searching high and low for such a plugin for Etherpad and finally my District decided we would fund the development of this plugin.    It is one more tool to be used for online learning/flipped classrooms.

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by William Lu -
Picture of Particularly helpful Moodlers

The video of your Moodle module looks really good.

Looking forwards to using it.

 

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

We just finished the installation video.  

  The new plugin should be available on http://etherpad.org this week.

Average of ratings: Useful (1)
In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by David Reid -

Really excited about this. Do you have any update on when the plug-in will be available? Went to the Etherpad site but nothing there. Also, will this be tied to Etherpad Lite or the old Etherpad?

Thank you!

David

4/28/2012

In reply to David Reid

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello David,

The plugin was added to Etherpad.org today!  I also submitted it to the Moodle Plugin repository.  It is pending review.

The plugin will work with Etherpad-Lite as this is the version being developed and maintained.

let me know if you have any issues or suggestions.

http://etherpad.org/2012/04/30/moodle-say-hello-to-etherpad/

-Chris

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Syamsul Anwar -

Hello Chris

Ok I've set up the plugin on a Moodle test site along with my own test instance of Etherpad Lite.

I must say - it works very beautifully! Thank you for making this available! I can see many possibilities for collaborative writing using this!

Perhaps the only functionality that did not seem to be working as I expected is Groups mode - despite the Etherpad assignment being set to "Separate Groups", students of different groups end up working on the same Etherpad lite document.It would be great if every group sees a different Etherpad lite document, even though it is the same assignment.

Are there plans to get this working too?

Thank you!

In reply to Syamsul Anwar

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I am looking into it, but it was not part of the initial scope of the project.  We just wanted to get a working plugin developed for the community that integrated Moodle and Etherpad.  Now that the hard work is done, anyone can contribute to the project and add features.  So if anyone wants to look at the code and add group permission please do so.  That would be a great feature for version 2.

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Gavin Henrick -
Picture of Plugin developers

I had installed it to review and tried to configure it using your demo site, but the add-activity crashed out with various errors.

Then the plugin overview screen said there were 2 instances of it, but yet there was none in the course.

I had to install a local windows etherpad to be able to test it rather than the public test one.

In reply to Gavin Henrick

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

There might be an issue with the demo Etherpad site as it is one the developers hammer on.  

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Gavin Henrick -
Picture of Plugin developers

I understand, but that was not my concern.

My concern was the code was not gracefully handling the lack of the server and had some "ghost" instances in its tables when the Moodle site did not  have them on the course.

Gav.

In reply to Gavin Henrick

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Gavin,

I guess I am not following you.  On our setup which is M2.2.1 when I go to Site Admin > Plugins Overview  there is only one Etherpad Activity.

Are you saying that a course that never had the etherpad activity added to it somehow has ghost tables of the etherpad activity?

We worked with a developer and Etherpad.org to handle the coding of the plugin.  What should I ask him to look into to fix this?

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Jean FRUITET -

Hi,

I have installer an Etherpad-lite- on Windows Seven.

Its Works fine.

Then I have tried to install the Moodle Etherpad module for Moodle 2.3

I get some errors :

The module etherpad does not define the standard capability mod/etherpad:addinstance
  • line 3420 of \course\lib.php: call to debugging()
  • line 1921 of \course\lib.php: call to course_allowed_module()
  • line 1794 of \course\lib.php: call to get_module_metadata()
  • line 659 of \course\format\renderer.php: call to print_section_add_menus()
  • line 52 of \course\format\topics\format.php: call to format_section_renderer_base->print_multiple_section_page()
  • line 281 of \course\view.php: call to require()
 

I have corrected ./mod/etherpad/db/access.php, adding the new capacitie.

    'mod/etherpad:addinstance' => array(
        'riskbitmask' => RISK_XSS,

        'captype' => 'write',
        'contextlevel' => CONTEXT_COURSE,
        'archetypes' => array(
            'editingteacher' => CAP_ALLOW,
            'manager' => CAP_ALLOW
        ),
        'clonepermissionsfrom' => 'moodle/course:manageactivities'
    ),

That does't fix this error...

I have added some langage strings

./mod/etherpad/lang/en/etherpad.php

// Begin help strings for Moodle2

$string['etherpad:addinstance'] = 'Add an Etherpad instance';
$string['etherpad:debugger'] = 'Debugger';
$string['etherpad:student'] = 'Student';
$string['etherpad:teacher'] = 'Teacher';
$string['modulename_help'] = '"Etherpad lite" allows you to edit documents collaboratively in real-time, much like a live multi-player online editor, allowing you to write articles, proposals, press releases and the like, together with your friends, your fellow students or your colleagues, working on the same document at the same time. It even supports rich text editing! Additionally, Etherpad lite provides access to all data through a well-documented HTTP API and supports import/export to many major data exchange formats. The built-in plugin system makes extending the core functionality a breeze, regardless of whether you\'re adding support for inserting images or videos or allowing users to collaborate on tables.';

Alas, when trying to create a new etherpad instance I get that error :

Debug info:
Error code: generalexceptionmessage
Stack trace:
  • line 63 of \mod\etherpad\etherpad-lite-client.php: UnexpectedValueException thrown
  • line 30 of \mod\etherpad\etherpad-lite-client.php: call to EtherpadLiteClient->call()
  • line 241 of \mod\etherpad\etherpad-lite-client.php: call to EtherpadLiteClient->post()
  • line 27 of \mod\etherpad\lib.php: call to EtherpadLiteClient->createPad()
  • line 447 of \course\modedit.php: call to etherpad_add_instance()
Output buffer: <div class="notifytiny">The module etherpad does not define the standard capability mod/etherpad:addinstance<ul style="text-align: left"><li>line 3420 of \course\lib.php: call to debugging()</li><li>line 64 of \course\modedit.php: call to course_allowed_module()</li></ul></div><br>DEBUG :: lib.php :: 24 :: CLE: 'MGAyu430bWRZLWLtSfG5W6GPl1e6POIy', URL:'http://localhost:9001/api'<font color=#ff0000><br /> <b>Warning</b>: fopen(http://localhost:9001/api/1/createPad) [<a href='http://fr2.php.net/manual/fr/function.fopen.php'>function.fopen.php</a>;]: failed to open stream: HTTP request failed! in <b>D:\xampp\htdocs\moodle23\mod\etherpad\etherpad-lite-client.php</b> on line <b>58</b><br /> </font>

Something I can do ?

In reply to Jean FRUITET

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

We have only tested this with Etherpad Lite installed on Linux.  Do you have PHP Curl enabled on the server.  I think it relies on that to communicate with the Etherpad Server.

I am not much of a WIndows server expert.  We have it running on Linux and Moodle 2.4 latest.  No issues.  

 

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Jean FRUITET -

Yes, Curl is OK.

But I have found and corrected the error. It's the Post protocol which is not supported by Etherpad server.

 

Regards.
Jean.

In reply to Jean FRUITET

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of Testers

We have it running succesfully on our Windows server in the university, with Moodle2.3 with no changes. The error message shows up if debugging is turned on, but doesn't prevent use when debugging is set to None - the adding capability is on my list of things to do before our upgrade to 2.5 in the summer though smile

Richard

In reply to Richard Oelmann

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Jean FRUITET -

@richard

>the adding capability is on my list of things to do before our upgrade to 2.5 in the summer

Done.
Get the new version archive up there wink

In reply to Jean FRUITET

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Jean FRUITET -

Hi,

Don't ask why but the creation of a new instance of EtherPad with he Post protocol does not work on my EtherPad server.

So I have made a couple of corrections.

Modification 1) Script ./mod/etherpad/lib.php

function etherpad_add_instance($etherpad) {
    global $CFG, $USER, $DB;

    $etherpad->timemodified = time();
    $etherpad->padname = etherpad_padname();
    
    $id = $DB->insert_record("etherpad", $etherpad);

    $etherpadcfg = get_config('etherpad');
    
    require_once("etherpad-lite-client.php");
    $epad = new EtherpadLiteClient($etherpadcfg->etherpad_apikey,$etherpadcfg->etherpad_baseurl.'/api');
    // DELETED : $epad->createPad($etherpad->padname, strip_tags($etherpad->intro));

// replaced by
    $epad->createPad_Get($etherpad->padname, strip_tags($etherpad->intro));
    return $id;
}

Modification 2) In script ./mod/etherpad/etherpad-lite-client.php

Add this new function before public function createPad($padID, $text){

 

// creates a new pad (JF)
  public function createPad_Get($padID, $text){
    return $this->get("createPad", array(
      "padID" => $padID,
      "text"  => $text
    ));
  }

All the stuff in the archive mod_etherpad_moodle23_2013032900.zip,

with access.php corrected, ./lang/en and lang/fr completed.

Enjoy Etherpad.

JF.

 

 

In reply to Jean FRUITET

Re: New Moodle and Etherpad Collaborative Doc Plugin : A lot or errors

by Jean FRUITET -

 2013/03/30 - jean.fruitet@univ-nantes.fr
------------------------------------
On my server (Windows Seven) I can't create a new instance of etherpad with the Post protocol.
So I use the Get protocol everywhere in the script ./mod/etherpad/etherpad-lite-client.php

Code modification
---------------
ADD a new constant
// const POST_PROTOCOL          = 1; // (default value) if the Etherpad server answers to POST calls
   const POST_PROTOCOL          = 0; // if the Etherpad server does't answer to POST calls


Then for all the functions calling $this->post(...)
modify the source code following this model :

Example : Modify the createPad function

 // creates a new pad
  public function createPad($padID, $text){
    if (self::POST_PROTOCOL){
        return $this->post("createPad", array(
      "padID" => $padID,
      "text"  => $text
    ), 'POST');
    }
    else{
        return $this->get("createPad", array(
      "padID" => $padID,
      "text"  => $text
    ));

    }
  }

Alls these modifications are here in mod_etherpad_moodle23_2013033000.zip, plus ./mod/etherpad/db/access.php and languages modifications.

This version does work with Moodle 2.4 too.

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Georgios Koutras -

Dear all,

I would like to install this plugin in Moodle 2.0.3+ is there a way I can do that?

Kind regards,

George

In reply to Georgios Koutras

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Chris Kenniburg -
Picture of Particularly helpful Moodlers Picture of Plugin developers

I don't believe so.  It is for Moodle 2.2+ only.

In reply to Chris Kenniburg

Re: New Moodle and Etherpad Collaborative Doc Plugin

by Alan Azzera -

Greetings to all,

I'd like to keep Etherpad authenticated for my users who wish to use it independantly of Moodle. But at the same time I'd like to allow Moodle users to use it without a 2nd authentication.

Do you think it is possible ?

More precisely, I'm working in education. I installed Etherpad behind a reverse proxy and put an LDAP authentication at its level. Thus only teachers, whose credentials are store in the directory, can create pads. But pupils are not in this LDAP, they are only known in Moodle DB. Teachers log into Moodle, and need to authenticate again when using Etherpad from Moodle : it's a pain but it works. The main problem is that pupils can't !

I'm completely new to Etherpad, so I may miss many things. Thanks in advance for any help, which will be much appreciated.

Best regards,

Al