Skip to content

Commit

Permalink
https://github.com/center-for-learning-management/eduvidual-src/issue…
Browse files Browse the repository at this point in the history
…s/1615

remove wordpress logic
  • Loading branch information
prowebat committed Mar 9, 2024
1 parent 4955a4a commit 8345501
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 243 deletions.
7 changes: 0 additions & 7 deletions classes/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,11 +853,6 @@ public function store_package($data) {
}
$this->set(',' . implode(',', $_channels) . ',', 'channels');

$wordpressaction = 'updated';
if (empty($this->get('id'))) {
$wordpressaction = 'created';
}

$this->exacompetencies();

// Now store all data.
Expand Down Expand Up @@ -995,8 +990,6 @@ public function store_package($data) {
$DB->update_record('course', $course);
rebuild_course_cache($course->id, true);
$this->store_package_db();

\block_edupublisher\wordpress::action($wordpressaction, $this);
}

/**
Expand Down
130 changes: 0 additions & 130 deletions classes/wordpress.php

This file was deleted.

1 change: 0 additions & 1 deletion externallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,6 @@ public static function trigger_active($packageid, $type, $to) {
\rebuild_course_cache($course->id, true);

\block_edupublisher\lib::toggle_guest_access($package->get('course'), $package->get('active'));
\block_edupublisher\wordpress::action((!empty($package->get('active')) ? 'published' : 'unpublished'), $package);

$published = $package->get('published', 'etapas');
if (!empty($published)) {
Expand Down
57 changes: 0 additions & 57 deletions lang/de/block_edupublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,63 +375,6 @@
$string['type'] = 'Typ';
$string['votes'] = 'Stimme(n)';

$string['wordpress:notification:subject_created'] = 'Das neue Lernpaket "{$a->title}" wurde erstellt!';
$string['wordpress:notification:subject_published'] = 'Das Lernpaket "{$a->title}" wurde soeben veröffentlicht!';
$string['wordpress:notification:subject_unpublished'] = '{$a->title} wurde inaktiv gestellt!';
$string['wordpress:notification:subject_updated'] = '{$a->title} wurde akualisiert!';
$string['wordpress:notification:subject_deleted'] = '{$a->title} wurde gelöscht!';

$string['wordpress:notification:text_created'] = '
<p>Lieber Nutzer/innen,</p>
<p>Das neue Lernpaket mit dem Titel <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> wurde erstellt. Wir werden es so rasch als möglich veröffentlichen!</p>
<p>Die Beschreibung dieses Lernpakets lautet wie folgt:</p>
<p>{$a->default_summary}</p>
<p>Mit besten Grüßen,<br />Ihr Team von {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_published'] = '
<p>Lieber Nutzer/innen,</p>
<p>Das Lernpaket mit dem Titel <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> wurde soeben veröffentlicht!</p>
<p>Die Beschreibung dieses Lernpakets lautet wie folgt:</p>
<p>{$a->default_summary}</p>
<p>Mit besten Grüßen,<br />Ihr Team von {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_unpublished'] = '
<p>Lieber Nutzer/innen,</p>
<p>Das Lernpaket mit dem Titel <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> wurde inaktiv gestellt.</p>
<p>Mit besten Grüßen,<br />Ihr Team von {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_updated'] = '
<p>Lieber Nutzer/innen,</p>
<p>Das Lernpaket <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> wurde aktualisiert.</p>
<p>Mit besten Grüßen,<br />Ihr Team von {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_deleted'] = '
<p>Lieber Nutzer/innen,</p>
<p>Leider mussten wir das Lernpaket <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> entfernen.</p>
<p>Mit besten Grüßen,<br />Ihr Team von {$a->moodlesitename}</p>
{$a->wpshortcodes}';

$string['wordpress:settings'] = 'Wordpress settings';
$string['wordpress:settings:description'] = 'For each kind of action, you can set a particular e-mail address to which a notification will be sent. If it is empty, no e-mail will be send whatsover. Also, for each kind of action you can customize shortcodes. Shortcodes can be used to customize how wordpress handles your posts. Please refer to the following <a href="https://wordpress.com/support/post-by-email/" target="_blank">page</a>.';
$string['wordpress:settings:email'] = 'E-Mail';
$string['wordpress:settings:postifcreated'] = 'Post if created';
$string['wordpress:settings:postifpublished'] = 'Post if published';
$string['wordpress:settings:postifunpublished'] = 'Post if unpublished';
$string['wordpress:settings:postifupdated'] = 'Post if updated';
$string['wordpress:settings:postifdeleted'] = 'Post if deleted';
$string['wordpress:settings:shortcodes'] = 'Shortcodes';

$string['wordpress:settings'] = 'Wordpress Einstellungen';
$string['wordpress:settings:description'] = 'Für jede Art von Aktion können Sie eine separate E-Mailadresse angeben, an die eine Benachrichtigung geschickt wird. Sofern keine E-Mailadresse angegeben wird, wird keine Benachrichtigung geschickt. Außerdem können Sie für jede Art von Aktion unterschiedliche Shortcodes eingeben. Mit Shortcodes kann gesteuert werden, wie Wordpress mit den Beiträgen umgeht. Mehr Informationen finden Sie auf der folgenden <a href="https://wordpress.com/support/post-by-email/" target="_blank">Seite</a>.';
$string['wordpress:settings:email'] = 'E-Mail';
$string['wordpress:settings:postifcreated'] = 'Beitrag bei Erstellung';
$string['wordpress:settings:postifpublished'] = 'Beitrag bei Veröffentlichung';
$string['wordpress:settings:postifunpublished'] = 'Beitrag bei Inaktivschaltung';
$string['wordpress:settings:postifupdated'] = 'Beitrag bei Aktualisierung';
$string['wordpress:settings:postifdeleted'] = 'Beitrag bei Löschung';
$string['wordpress:settings:shortcodes'] = 'Shortcodes';


$string['evaluation_by'] = 'Evaluation von {$a->fullname}';
$string['evaluation_introtext'] = 'Bevor Sie eine Evaluation erfassen, sollten Sie das Lernpaket mit einer tatsächlichen Klasse und echten Schüler/innen ausprobiert haben. Bitte teilen Sie danach anderen Lehrer/innen mit, wie die Qualität dieser Lernressource war und welche Verbesserungen für den Lernprozess damit möglich wurden, indem Sie das folgende Evaluationsformular ausfüllen.';
$string['evaluation_none'] = 'Bisher wurde keine Evaluation durchgeführt.';
Expand Down
46 changes: 0 additions & 46 deletions lang/en/block_edupublisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,52 +397,6 @@
$string['type'] = 'Type';
$string['votes'] = 'Vote(s)';

$string['wordpress:notification:subject_created'] = 'A new learning package "{$a->title}" was created!';
$string['wordpress:notification:subject_published'] = 'A new learning package "{$a->title}" was published!';
$string['wordpress:notification:subject_unpublished'] = '{$a->title} was unpublished!';
$string['wordpress:notification:subject_updated'] = '{$a->title} was updated!';
$string['wordpress:notification:subject_deleted'] = '{$a->title} was deleted!';

$string['wordpress:notification:text_created'] = '
<p>Dear users,</p>
<p>a new learning package with the title <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> was created. It will be published soon, so please stay tuned!</p>
<p>The description of this learning package is as follows:</p>
<p>{$a->default_summary}</p>
<p>Best regards,<br />Your team of {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_published'] = '
<p>Dear users,</p>
<p>a new learning package with the title <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> was published.</p>
<p>The description of this learning package is as follows:</p>
<p>{$a->default_summary}</p>
<p>Best regards,<br />Your team of {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_unpublished'] = '
<p>Dear users,</p>
<p>the learning package with the title <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> was unpublished.</p>
<p>Best regards,<br />Your team of {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_updated'] = '
<p>Dear users,</p>
<p>the data of the learning package with the title <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a> was update.</p>
<p>Best regards,<br />Your team of {$a->moodlesitename}</p>
{$a->wpshortcodes}';
$string['wordpress:notification:text_deleted'] = '
<p>Dear users,</p>
<p>unfortunately, we had to remove the learning package <a href="{$a->moodlecourseurl}" target="_blank">{$a->title}</a>.</p>
<p>Best regards,<br />Your team of {$a->moodlesitename}</p>
{$a->wpshortcodes}';

$string['wordpress:settings'] = 'Wordpress settings';
$string['wordpress:settings:description'] = 'For each kind of action, you can set a particular e-mail address to which a notification will be sent. If it is empty, no e-mail will be send whatsover. Also, for each kind of action you can customize shortcodes. Shortcodes can be used to customize how wordpress handles your posts. Please refer to the following <a href="https://wordpress.com/support/post-by-email/" target="_blank">page</a>.';
$string['wordpress:settings:email'] = 'E-Mail';
$string['wordpress:settings:postifcreated'] = 'Post if created';
$string['wordpress:settings:postifpublished'] = 'Post if published';
$string['wordpress:settings:postifunpublished'] = 'Post if unpublished';
$string['wordpress:settings:postifupdated'] = 'Post if updated';
$string['wordpress:settings:postifdeleted'] = 'Post if deleted';
$string['wordpress:settings:shortcodes'] = 'Shortcodes';

$string['evaluation_by'] = 'Evaluation of {$a->fullname}';
$string['evaluation_introtext'] = 'Prior to making an evaluation, you should have tested the resource with an actual class and real students. Please share your insights into the quality and the improvements made to the learning process with others by filling out the linked evaulation form.';
$string['evaluation_none'] = 'No evaluation was made by now!';
Expand Down
1 change: 0 additions & 1 deletion pages/remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
'url' => $CFG->wwwroot . '/my',
);
echo $OUTPUT->render_from_template('block_edupublisher/alert', (object)$params);
\block_edupublisher\wordpress::action('deleted', $package);
} else {
$params = array(
'title' => get_string('removal:title', 'block_edupublisher'),
Expand Down
1 change: 0 additions & 1 deletion settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,5 @@
);

\block_edupublisher\groups::admin_settings_page($settings);
\block_edupublisher\wordpress::admin_settings_page($settings);
}
}

0 comments on commit 8345501

Please sign in to comment.