Skip to content

Instantly share code, notes, and snippets.

@Dagefoerde
Created September 2, 2019 16:17
Show Gist options
  • Save Dagefoerde/ad23be1b3841b4f38b9a9092a897289d to your computer and use it in GitHub Desktop.
Save Dagefoerde/ad23be1b3841b4f38b9a9092a897289d to your computer and use it in GitHub Desktop.
block_evasys_sync Patch für Synchronisationstest
diff --git a/classes/evasys_inviter.php b/classes/evasys_inviter.php
index b0364c4..f0e7267 100644
--- a/classes/evasys_inviter.php
+++ b/classes/evasys_inviter.php
@@ -44,6 +44,9 @@ class evasys_inviter {
}
public static function get_evasysids($courseid) {
+if ($courseid == 24744) {
+return ['1002 WS 2018/19'];}
+
global $DB;
// Fetch persistent object id.
$pid = $DB->get_field('block_evasys_sync_courses', 'id', array('course' => $courseid));
@@ -326,4 +329,4 @@ class evasys_inviter {
$default = get_config('block_evasys_sync', 'default_evasys_mode');
return (bool)$default;
}
-}
\ No newline at end of file
+}
diff --git a/classes/evasys_synchronizer.php b/classes/evasys_synchronizer.php
index 30b2e04..935499b 100755
--- a/classes/evasys_synchronizer.php
+++ b/classes/evasys_synchronizer.php
@@ -37,6 +37,8 @@ class evasys_synchronizer {
}
public function get_courses_from_lsf() {
+if ($this->courseid == 24744) {
+return [['title'=> 'Testkurs Jan', 'id' => '1002 WS 2018/19']];}
global $DB;
if ($this->lsfcourses !== null) {
return $this->lsfcourses;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment