diff --git a/README.md b/README.md index c93d109..72e2b6b 100755 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # block_timetable # -TODO Describe the plugin shortly here. +block_timetable is a moodle-block-plugin that provides timetables based on Untis export data. -TODO Provide more detailed description here. +![timetable text](doc/timetable1_small.png) + +The plugin requires that the mod_timetable plugin is installed. ## License ## diff --git a/block_timetable.php b/block_timetable.php index 40a4d90..4338613 100755 --- a/block_timetable.php +++ b/block_timetable.php @@ -89,9 +89,9 @@ class block_timetable extends block_base { $today = new \DateTime(); $week = $today->format("W"); $dayofweek = $today->format('w'); - if ($dayofweek > 5 + get_config('timetable', 'saturday')) { + if ($dayofweek > 5 + get_config('timetable', 'saturday') || ($dayofweek == 0)) { $week++; - } + } //$ttable = new \mod_timetable\timetable('teacher','Da'); $ttable->read_db($week); diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/timetable1.png b/doc/timetable1.png new file mode 100644 index 0000000..5ca0612 Binary files /dev/null and b/doc/timetable1.png differ diff --git a/doc/timetable1_small.png b/doc/timetable1_small.png new file mode 100644 index 0000000..4ce3478 Binary files /dev/null and b/doc/timetable1_small.png differ diff --git a/lang/de/block_timetable.php b/lang/de/block_timetable.php index 0cc3c12..fa518bc 100755 --- a/lang/de/block_timetable.php +++ b/lang/de/block_timetable.php @@ -25,4 +25,4 @@ defined('MOODLE_INTERNAL') || die(); -$string['pluginname'] = 'timetable'; +$string['pluginname'] = 'Stundenplan'; diff --git a/lang/en/block_timetable.php b/lang/en/block_timetable.php index 663c9d8..25780bf 100755 --- a/lang/en/block_timetable.php +++ b/lang/en/block_timetable.php @@ -25,6 +25,6 @@ defined('MOODLE_INTERNAL') || die(); -$string['pluginname'] = 'Stundenplan'; +$string['pluginname'] = 'timetable'; $string['timetable:addinstance'] = 'add timetable'; $string['timetable:addmyinstance'] = 'add timetable'; diff --git a/version.php b/version.php index b5af583..57d2397 100755 --- a/version.php +++ b/version.php @@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'block_timetable'; $plugin->release = '0.1.0'; -$plugin->version = 2020091801; +$plugin->version = 2020112101; $plugin->requires = 2020061500; $plugin->maturity = MATURITY_ALPHA; $plugin->dependencies = [