Skip to content

Commit

Permalink
feature: enable branding;
Browse files Browse the repository at this point in the history
  • Loading branch information
ernst-metaventis committed Oct 6, 2021
1 parent f9d28c9 commit b1ffc62
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion insert.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
}

$edusharing->id = $id;
$edusharing->src = $CFG->wwwroot . '/mod/edusharing/pix/edusharing.png';

$edusharing->src = $CFG->wwwroot . '/lib/editor/edusharing/images/edusharing.png';

header('Content-type: application/json', true, 200);
echo json_encode($edusharing);
Expand Down
8 changes: 4 additions & 4 deletions lang/de/atto_edusharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['pluginname'] = 'edu-sharing';
$string['dialogtitle'] = 'edu-sharing Material';
$string['pluginname'] = get_config('edusharing', 'application_appname');
$string['dialogtitle'] = get_config('edusharing', 'application_appname') . ' Material';
$string['settings'] = 'edu-sharing (Atto)';
$string['insert'] = 'EINFÜGEN';
$string['update'] = 'AKTUALISIEREN';
Expand All @@ -39,11 +39,11 @@
$string['dimensionsWidth'] = 'Breite';
$string['dimensionsheight'] = 'Höhe';
$string['openRepo'] = 'REPOSITORIUM ÖFFNEN';
$string['hint1'] = 'Wählen Sie ein edu-sharing Objekt aus dem Repositorium, um es in Moodle einzubinden. Klicken Sie dazu auf "REPOSITORIUM ÖFFNEN".';
$string['hint1'] = 'Wählen Sie ein '.get_config('edusharing', 'application_appname').' Objekt aus dem Repositorium, um es in Moodle einzubinden. Klicken Sie dazu auf "REPOSITORIUM ÖFFNEN".';
$string['hint2'] = 'Suchen Sie nun das gewünschte Objekt und betätigen Sie die "ÜBERNEHMEN" Schaltfläche.';
$string['skipHint'] = 'Beim nächsten Mal direkt zur Suche springen.';
$string['directoryHint'] = 'Der Ordner wird eingebunden. Elemente des Ordners werden angezeigt, nicht aber weitere Unterordner.';
$string['privacy:metadata'] = 'Das edu-sharing atto-Plugin speichert keine Benutzerdaten.';
$string['privacy:metadata'] = 'Das '.get_config('edusharing', 'application_appname').' atto-Plugin speichert keine Benutzerdaten.';

$string['edusharing:visible'] = 'edu-sharing atto-plugin Sichtbarkeit';

Expand Down
8 changes: 4 additions & 4 deletions lang/en/atto_edusharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

$string['pluginname'] = 'edu-sharing';
$string['dialogtitle'] = 'edu-sharing material';
$string['pluginname'] = get_config('edusharing', 'application_appname');
$string['dialogtitle'] = get_config('edusharing', 'application_appname').' material';
$string['settings'] = 'edu-sharing (Atto)';
$string['insert'] = 'EMBED';
$string['update'] = 'UPDATE';
Expand All @@ -39,11 +39,11 @@
$string['dimensionsWidth'] = 'Width';
$string['dimensionsheight'] = 'Height';
$string['openRepo'] = 'OPEN REPOSITORY';
$string['hint1'] = 'Select an edu-sharing object from the repository to embed it in Moodle. Click on "OPEN REPOSITORY".';
$string['hint1'] = 'Select an '.get_config('edusharing', 'application_appname').' object from the repository to embed it in Moodle. Click on "OPEN REPOSITORY".';
$string['hint2'] = 'Search for the desired object and click the "APPLY" button.';
$string['skipHint'] = 'Open the search engine right away next time.';
$string['directoryHint'] = 'The folder was embedded. Elements of the folder will be displayed, but not its subfolders.';
$string['privacy:metadata'] = 'The edu-sharing atto-plugin does not store any user data.';
$string['privacy:metadata'] = 'The '.get_config('edusharing', 'application_appname').' atto-plugin does not store any user data.';

$string['edusharing:visible'] = 'edu-sharing atto-plugin visibility';

Expand Down
7 changes: 7 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@ function atto_edusharing_params_for_js() {
$params['disabled'] = true;
return $params;
}


$params['disabled'] = false;
$params['repourl'] = trim(get_config('edusharing', 'application_cc_gui_url'), '/');
$params['courseid'] = $COURSE->id;
$params['buttonTitle'] = 'edu-sharing';

if (!empty(get_config('edusharing', 'application_appname'))){
$params['buttonTitle'] = get_config('edusharing', 'application_appname');
}

return $params;
}
Expand Down
2 changes: 1 addition & 1 deletion styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ input#edusharing_title:hover + #edusharing_title_pencil {
background-color: #efefef;
background-repeat: no-repeat;
background-size: 16px;
background-image: url('[[pix:atto_edusharing|/icon]]');
background-image: url('[[pix:edusharing|icon]]');
}

.editor_atto img.edusharing_atto {
Expand Down
6 changes: 3 additions & 3 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

defined('MOODLE_INTERNAL') || die();

$plugin->version = 2021093001; // The current plugin version (Date: YYYYMMDDXX).
$plugin->version = 2021100603; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2013110500; // Requires this Moodle version.
$plugin->component = 'atto_edusharing'; // Full name of the plugin (used for diagnostics).
$plugin->maturity = MATURITY_STABLE;
$plugin->dependencies = array(
'mod_edusharing' => 2018110801
'mod_edusharing' => 2021100601
);
// Human readable version information.
$plugin->release = '5.0';
$plugin->release = '6.0';


Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ Y.namespace('M.atto_edusharing').Button = Y.Base.create('button', Y.M.editor_att
}
this.addButton({
icon: 'icon',
iconComponent: 'atto_edusharing',
iconComponent: 'edusharing',
buttonName: 'icon',
title: this.get('buttonTitle'),
callback: this._displayDialogue,
callbackArgs: 'icon',
tags: '.edusharing_atto',
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ Y.namespace('M.atto_edusharing').Button = Y.Base.create('button', Y.M.editor_att
}
this.addButton({
icon: 'icon',
iconComponent: 'atto_edusharing',
iconComponent: 'edusharing',
buttonName: 'icon',
title: this.get('buttonTitle'),
callback: this._displayDialogue,
callbackArgs: 'icon',
tags: '.edusharing_atto',
Expand Down
3 changes: 2 additions & 1 deletion yui/src/button/js/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ Y.namespace('M.atto_edusharing').Button = Y.Base.create('button', Y.M.editor_att
}
this.addButton({
icon: 'icon',
iconComponent: 'atto_edusharing',
iconComponent: 'edusharing',
buttonName: 'icon',
title: this.get('buttonTitle'),
callback: this._displayDialogue,
callbackArgs: 'icon',
tags: '.edusharing_atto',
Expand Down

0 comments on commit b1ffc62

Please sign in to comment.