-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
267 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
@@ -51,14 +50,14 @@ protected function define_structure() { | |
// Define sources | ||
$eplite->set_source_table('etherpadlite', array('id' => backup::VAR_ACTIVITYID)); | ||
|
||
// All the rest of elements only happen if we are including user info | ||
// All the rest of elements only happen if we are including user info | ||
if ($userinfo) { | ||
// The HTML content of the pad | ||
$modid = $this->task->get_activityid(); | ||
$padID = $DB->get_field('etherpadlite', 'uri', array('id' => $modid)); | ||
// The HTML content of the pad | ||
$modid = $this->task->get_activityid(); | ||
$padID = $DB->get_field('etherpadlite', 'uri', array('id' => $modid)); | ||
$html = $instance->getHTML($padID); | ||
$text = $instance->getText($padID); | ||
|
||
|
||
$content->set_source_array(array((object)array('html'=>$html->html, 'text'=>$text->text))); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,7 @@ | |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
@@ -52,31 +51,31 @@ protected function process_etherpadlite($data) { | |
$oldid = $data->id; | ||
$data->course = $this->get_courseid(); | ||
|
||
// php.ini separator.output auf '&' setzen | ||
$separator = ini_get('arg_separator.output'); | ||
ini_set('arg_separator.output', '&'); | ||
|
||
$instance = new EtherpadLiteClient($config->apikey,$config->url.'api'); | ||
|
||
try { | ||
$createGroup = $instance->createGroup(); | ||
$groupID = $createGroup->groupID; | ||
//echo "New GroupID is $groupID\n\n"; | ||
} catch (Exception $e) { | ||
// the group already exists or something else went wrong | ||
echo "\n\ncreateGroup Failed with message ". $e->getMessage(); | ||
} | ||
|
||
try { | ||
$newpad = $instance->createGroupPad($groupID, $config->padname); | ||
$padID = $newpad->padID; | ||
//echo "Created new pad with padID: $padID\n\n"; | ||
} catch (Exception $e) { | ||
// the pad already exists or something else went wrong | ||
echo "\n\ncreateGroupPad Failed with message ". $e->getMessage(); | ||
} | ||
|
||
// seperator.output wieder zur�cksetzen | ||
// php.ini separator.output auf '&' setzen | ||
$separator = ini_get('arg_separator.output'); | ||
ini_set('arg_separator.output', '&'); | ||
|
||
$instance = new EtherpadLiteClient($config->apikey,$config->url.'api'); | ||
|
||
try { | ||
$createGroup = $instance->createGroup(); | ||
$groupID = $createGroup->groupID; | ||
//echo "New GroupID is $groupID\n\n"; | ||
} catch (Exception $e) { | ||
// the group already exists or something else went wrong | ||
echo "\n\ncreateGroup Failed with message ". $e->getMessage(); | ||
} | ||
|
||
try { | ||
$newpad = $instance->createGroupPad($groupID, $config->padname); | ||
$padID = $newpad->padID; | ||
//echo "Created new pad with padID: $padID\n\n"; | ||
} catch (Exception $e) { | ||
// the pad already exists or something else went wrong | ||
echo "\n\ncreateGroupPad Failed with message ". $e->getMessage(); | ||
} | ||
|
||
// seperator.output wieder zur�cksetzen | ||
ini_set('arg_separator.output', $separator); | ||
|
||
$data->uri = $padID; | ||
|
@@ -101,20 +100,20 @@ protected function process_etherpadlite_content($data) { | |
$padID = $etherpadlite->uri; | ||
|
||
|
||
// php.ini separator.output auf '&' setzen | ||
$separator = ini_get('arg_separator.output'); | ||
ini_set('arg_separator.output', '&'); | ||
|
||
// php.ini separator.output auf '&' setzen | ||
$separator = ini_get('arg_separator.output'); | ||
ini_set('arg_separator.output', '&'); | ||
|
||
$instance = new EtherpadLiteClient($config->apikey,$config->url.'api'); | ||
|
||
try { | ||
$instance->setHTML($padID, '<html>'.$data->html.'</html>'); | ||
} catch (Exception $e) { | ||
// something went wrong | ||
echo "\n\nsetHTML Failed with message ". $e->getMessage(); | ||
} | ||
try { | ||
$instance->setHTML($padID, '<html>'.$data->html.'</html>'); | ||
} catch (Exception $e) { | ||
// something went wrong | ||
echo "\n\nsetHTML Failed with message ". $e->getMessage(); | ||
} | ||
|
||
// seperator.output wieder zur�cksetzen | ||
// seperator.output wieder zur�cksetzen | ||
ini_set('arg_separator.output', $separator); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,8 @@ | |
/** | ||
* Plugin capabilities | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,8 @@ | |
/** | ||
* Definition of log events | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
<?php //$Id: upgrade.php,v 1.2 2007/08/08 22:36:54 stronk7 Exp $ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This file keeps track of upgrades to | ||
* the etherpadlite module | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This is a helper class to communicate with the etherpadlite server | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @link https://github.com/TomNomNom/etherpad-lite-client | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
<?php // $Id: index.php,v 1.7.2.3 2009/08/31 22:00:00 mudrd8mz Exp $ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This page lists all the instances of etherpadlite in a particular course | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
<?php | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This file holds the german language | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
/** | ||
* This file holds the german language | ||
* | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
$string['etherpadlite'] = 'Etherpad Lite (beta)'; | ||
$string['modulename_help'] = 'Das Etherpad Lite modul erlaubt es Studenten und Lehrenden kollaborativ zu schreiben (Der Text wird synchronisiert, während sie schreiben) | ||
$string['modulename_help'] = 'Das Etherpad Lite modul erlaubt es Studenten und Lehrenden kollaborativ zu schreiben (Der Text wird synchronisiert, während sie schreiben) | ||
(Der Etherpad-Server, welcher hinter diesem Modul steht, ist noch im beta Stadium. Deshalb können Probleme auftreten, was allerdings nicht erwartet wird)'; | ||
|
||
$string['etherpadlite:addinstance'] = 'Neues Pad hinzufügen'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* This file holds the english language | ||
* | ||
* @package mod | ||
* @subpackage etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
// This file is part of Moodle - http://moodle.org/ | ||
// | ||
// Moodle is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Moodle is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
/** | ||
* This file holds the english language | ||
* | ||
* @package mod_etherpadlite | ||
* | ||
* @author Timo Welde <[email protected]> | ||
* @copyright 2012 Humboldt-Universität zu Berlin <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
$string['etherpadlite'] = 'Etherpad Lite'; | ||
|
@@ -49,7 +62,7 @@ | |
$string['ssl'] = 'Https Redirect'; | ||
$string['ssldesc'] = 'With this set, your site will redirect itself to https, if an etherpad is opened (eyecandy for the user)'; | ||
|
||
$string['checkssl'] = 'Verify HTTPS cert'; | ||
$string['checkssl'] = 'Verify HTTPS cert'; | ||
$string['checkssldesc'] = 'With this set, the HTTPS certificate of the etherpadlite server will be checked, to prevent man in the middle attacks'; | ||
|
||
$string['adminguests'] = 'Guests allowed to write?'; | ||
|
Oops, something went wrong.