add moodle link to caldav

This commit is contained in:
OliiverHacker
2020-11-04 09:56:54 +01:00
parent 34bed51ff7
commit 1d35e88542
2 changed files with 12 additions and 4 deletions
+3 -3
View File
@@ -2763,8 +2763,8 @@ class wochenplan extends basis_db
for ($idx=0;$idx<count($this->std_plan[$i][$j]);$idx++)
{
$moodle_course = new moodle_course();
$leId = $this->std_plan[$i][$j][$idx]->unr;
$lvId = $this->std_plan[$i][$j][$idx]->lehrfach_id;
$leId = (isset($this->std_plan[$i][$j][$idx]->unr)?$this->std_plan[$i][$j][$idx]->unr:'');
$lvId = (isset($this->std_plan[$i][$j][$idx]->lehrfach_id)?$this->std_plan[$i][$j][$idx]->lehrfach_id:'');
$moodle_link = '';
if ($moodle_course->course_exists_for_le($leId))
@@ -2967,7 +2967,7 @@ class wochenplan extends basis_db
$UID = 'FH'.$lvb.$this->std_plan[$i][$j][$idx]->ort.$this->std_plan[$i][$j][$idx]->lektor.$lehrfach[$idx].$start_date_time_ical.$end_date_time_ical;
$Summary = $lehrfach[$idx].' '.$this->std_plan[$i][$j][$idx]->ort.' - '.$lvb;
$description = $lehrfach[$idx].'\n'.$this->std_plan[$i][$j][$idx]->lektor.'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:'');
$description = $moodle_link.'\n'.$lehrfach[$idx].'\n'.$this->std_plan[$i][$j][$idx]->lektor.'\n'.$lvb.'\n'.$this->std_plan[$i][$j][$idx]->ort.(LVPLAN_ANMERKUNG_ANZEIGEN?'\n'.$this->std_plan[$i][$j][$idx]->anmerkung:'');
$UID = str_replace(',',' ',$UID);
$Summary = str_replace(',',' ',$Summary);
+9 -1
View File
@@ -207,7 +207,15 @@ class MySabre_CalDAV_Backend extends \Sabre\CalDAV\Backend\AbstractBackend
{
die($stdplan->errormsg);
}
$val = $stdplan->draw_week_csv('return', LVPLAN_KATEGORIE);
if(file_exists(dirname(__FILE__).'/../addons/moodle/config.inc.php'))
{
$val = $stdplan->draw_week_csv_include_moodle('return', LVPLAN_KATEGORIE);
}
else
{
$val = $stdplan->draw_week_csv('return', LVPLAN_KATEGORIE);
}
;
if(!is_null($objectUri))
{
foreach($val as $row)