// Set table rows for all customers foreach ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getAllCustomers() as $customerID => $customerName) { $content->setCurrentBlock("BLOCK_CUSTOMERS"); $content->setVariable("CUSTOMER_ENTRY", $viewHelper->getCustomerRow($customerID, $customerName, $GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getObjectDesc($customerID))); $content->parse("BLOCK_CUSTOMERS"); } // Add some JavaScript $portal->add_javascript_code("usermanagement_index", $viewHelper->jsSetCommandValue()); // Set context $usermanagementHTMLTemplate->set_context("customers"); break; case "courses-overview": $counter = 0; foreach ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->getCourseDataForCustomer($_SESSION["CURRENT_CUSTOMER_ID"]) as $courseID) { $content->setCurrentBlock("BLOCK_COURSES_ENTRY"); $content->setVariable("COURSE_ENTRY", $viewHelper->getCourseRowOverview($courseID)); $content->parse("BLOCK_COURSES_ENTRY"); $counter++; } if ($counter == 0) { $content->setVariable("FORM_STYLE", "display:none;"); $content->setVariable("INFO_TITLE", "Keine Kurse verfügbar"); $content->setVariable("INFO_TEXT", "Für ihr Unternehmen wurden noch keine Kurse freigeschaltet"); } else { $content->setVariable("INFO_STYLE", "display:none;"); $content->setVariable("HEADLINE", "Für ihr Unternehmen verfügbare Kurse"); $content->setVariable("TABLE_COL_1", "Kursname und -informationen"); $content->setVariable("TABLE_COL_2", "verfügbare Lizenzen"); } $usermanagementHTMLTemplate->set_context("courses"); break;