<th>1)</th>
                 <th>2)</th>
             </tr>
         </thead>
         <tbody>';
 foreach ($moodle->result as $row) {
     $lv = new lehrveranstaltung($row->lehrveranstaltung_id);
     $lehreinheit = '';
     // wenn LE übergeben lade dazugehörige LV
     if ($row->lehreinheit_id != '') {
         $le = new lehreinheit();
         $le->loadLE($row->lehreinheit_id);
         $lv->load($le->lehrveranstaltung_id);
         // alle LEs von Moodlekurs holen
         $moodle_help = new moodle();
         $help = $moodle_help->getLeFromCourse($row->mdl_course_id);
         $count = 0;
         foreach ($help as $h) {
             $count++;
             $lehreinheit .= $h;
             if ($count != count($help)) {
                 $lehreinheit .= ', ';
             }
         }
     }
     echo '
             <tr>
                 <td>' . $lv->bezeichnung . '</td>
                 <td>' . $lehreinheit . '</td>
                 <td>' . $lv->kurzbz . '</td>
                 <td>' . $row->mdl_course_id . '</td>