$content->setVariable("VALUE_COURSE_ID", $request->getParameter("courseID")); $participants = $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getCourseParticipants($request->getParameter("courseID")); if (count($participants) == 0) { $content->setVariable("FORM1_STYLE", "display:none;"); $content->setVariable("INFO_TITLE", "Keine Teilnehmer verfügbar"); $content->setVariable("INFO_TEXT", "Diesem Kurs wurden noch keine Teilnehmer hinzugefügt"); } else { $content->setVariable("INFO_STYLE", "display:none;"); foreach ($participants as $userID => $login) { $content->setCurrentBlock("BLOCK_PARTICIPANTS_ENTRY"); $content->setVariable("PARTICIPANT_ENTRY", $viewHelper->getParticipantRow($userID)); $content->parse("BLOCK_PARTICIPANTS_ENTRY"); } } // The selection box with users that are currently not participants of the course $content->setVariable("PARTICIPANTS_SELECTION", $viewHelper->getParticipantSelection($_SESSION["CURRENT_CUSTOMER_ID"], $request->getParameter("courseID"))); $usermanagementHTMLTemplate->set_context("courses"); break; case "courses-assignCSV": $customerID = ""; // If current user is admin if ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->isAdmin($currentUserID)) { $customerID = $request->getParameter("customerID"); $content->setVariable("CUSTOMER_SELECTION", $viewHelper->getCustomersSelection("courses-assignCSV", $customerID)); } else { if ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->isCustomerAdmin($currentUserID)) { $customerData = $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getEmployeeCustomer($currentUserID); $customerID = $customerData["id"]; } } $content->setVariable("VALUE_CUSTOMER_ID", $customerID);