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); foreach ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getAllCourseIDs() as $courseID) { $data = $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getCourseData($courseID); if ($data["customerID"] == $customerID && $customerID != "") { $content->setCurrentBlock("BLOCK_COURSES_ENTRY"); $content->setVariable("COURSE_ENTRY", $viewHelper->getCourseRowAssignCSV($courseID)); $content->parse("BLOCK_COURSES_ENTRY"); } }