Render page with assessment(s) result.
@throws \common_exception_Error
@throws \common_exception_MissingParameter
@throws \oat\oatbox\service\ServiceNotFoundException
551
public function printReport()
    {
        if (!$this->hasRequestParameter('id')) {
            throw new \common_exception_MissingParameter('id');
        }
        $idList = $this->getRequestParameter('id');
        $context = $this->getRequestParameter('context');
        if (!is_array($idList)) {
            $idList = [$idList];
        }
        $result = [];

        /** @var ProctorService $deliveryService */
        $deliveryService = ServiceManager::getServiceManager()->get(ProctorService::SERVICE_ID);
        $currentUser = \common_session_SessionManager::getSession()->getUser();
        $deliveries = $deliveryService->getProctorableDeliveries($currentUser, $context);

        /** @var $assessmentResultsService AssessmentResultsService */
        $assessmentResultsService = $this->getServiceManager()->get(AssessmentResultsService::SERVICE_ID);

        foreach ($idList as $deliveryExecutionId) {
            $deliveryExecution = ServiceProxy::singleton()->getDeliveryExecution($deliveryExecutionId);
            $delivery = $deliveryExecution->getDelivery();
            if (!isset($deliveries[$delivery->getUri()])) {
                \common_Logger::i('Attempt to print assessment results for which the proctor ' . $currentUser->getIdentifier() . ' has no access.');
                continue;
            }
            $deliveryData = $assessmentResultsService->getDeliveryData($deliveryExecution);
            if (!$deliveryData['end']) {
                continue;
            }
            $result[] = [
                'testTakerData' => $assessmentResultsService->getTestTakerData($deliveryExecution),
                'testData' => $assessmentResultsService->getTestData($deliveryExecution),
                'resultsData' => $assessmentResultsService->getResultsData($deliveryExecution),
                'deliveryData' => $deliveryData,
            ];
        }

        $this->setData('reports', $result);
        $this->setData('content-template', 'Reporting/print_report.tpl');
        $this->setView('Reporting/layout.tpl');
    }
1265205
public function render()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $genericImport = oxNew(\OxidEsales\Eshop\Core\GenericImport\GenericImport::class);
        $this->_sCsvFilePath = null;

        $navigationStep = $config->getRequestParameter('sNavStep');

        if (!$navigationStep) {
            $navigationStep = 1;
        } else {
            $navigationStep++;
        }

        $navigationStep = $this->_checkErrors($navigationStep);

        if ($navigationStep == 1) {
            $this->_aViewData['sGiCsvFieldTerminator'] = \OxidEsales\Eshop\Core\Str::getStr()->htmlentities($this->_getCsvFieldsTerminator());
            $this->_aViewData['sGiCsvFieldEncloser'] = \OxidEsales\Eshop\Core\Str::getStr()->htmlentities($this->_getCsvFieldsEncolser());
        }

        if ($navigationStep == 2) {
            $noJsValidator = oxNew(\OxidEsales\Eshop\Core\NoJsValidator::class);
            //saving csv field terminator and encloser to config
            $terminator = $config->getRequestParameter('sGiCsvFieldTerminator');
            if ($terminator && !$noJsValidator->isValid($terminator)) {
                $this->setErrorToView($terminator);
            } else {
                $this->_sStringTerminator = $terminator;
                $config->saveShopConfVar('str', 'sGiCsvFieldTerminator', $terminator);
            }

            $encloser = $config->getRequestParameter('sGiCsvFieldEncloser');
            if ($encloser && !$noJsValidator->isValid($encloser)) {
                $this->setErrorToView($encloser);
            } else {
                $this->_sStringEncloser = $encloser;
                $config->saveShopConfVar('str', 'sGiCsvFieldEncloser', $encloser);
            }

            $type = $config->getRequestParameter('sType');
            $importObject = $genericImport->getImportObject($type);
            $this->_aViewData['sType'] = $type;
            $this->_aViewData['sImportTable'] = $importObject->getBaseTableName();
            $this->_aViewData['aCsvFieldsList'] = $this->_getCsvFieldsNames();
            $this->_aViewData['aDbFieldsList'] = $importObject->getFieldList();
        }

        if ($navigationStep == 3) {
            $csvFields = $config->getRequestParameter('aCsvFields');
            $type = $config->getRequestParameter('sType');

            $genericImport = oxNew(\OxidEsales\Eshop\Core\GenericImport\GenericImport::class);
            $genericImport->setImportType($type);
            $genericImport->setCsvFileFieldsOrder($csvFields);
            $genericImport->setCsvContainsHeader(\OxidEsales\Eshop\Core\Registry::getSession()->getVariable('blCsvContainsHeader'));

            $genericImport->importFile($this->_getUploadedCsvFilePath());
            $this->_aViewData['iTotalRows'] = $genericImport->getImportedRowCount();

            //checking if errors occured during import
            $this->_checkImportErrors($genericImport);

            //deleting uploaded csv file from temp dir
            $this->_deleteCsvFile();

            //check if repeating import - then forsing first step
            if ($config->getRequestParameter('iRepeatImport')) {
                $this->_aViewData['iRepeatImport'] = 1;
                $navigationStep = 1;
            }
        }

        if ($navigationStep == 1) {
            $this->_aViewData['aImportTables'] = $genericImport->getImportObjectsList();
            asort($this->_aViewData['aImportTables']);
            $this->_resetUploadedCsvData();
        }

        $this->_aViewData['sNavStep'] = $navigationStep;

        return parent::render();
    }
406275
public function render()
    {
        $paginationData = $this->paginator->getPages($this->scrollingStyle);
        $unorderedList  = $this->getElement()->spawnChild('ul');
        $previous       = $unorderedList->spawnChild('li');
        $previousAnchor = $previous->spawnChild('a')->setContent('&laquo;');

        $unorderedList->setAttributes($this->getListAttributes());
        $previous->setAttributes($this->getListItemAttributes());
        $previous->addAttributes($this->getPreviousAttributes());
        $previousAnchor->setAttributes($this->getAnchorAttributes());

        if (empty($paginationData->previous)) {
            $previous->addClass('disabled');
        } else {
            $previousAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->previous),
                    $this->getRouteParams()
                )
            ));
        }

        foreach ($paginationData->pagesInRange as $page) {
            $pageNumberElement = $unorderedList->spawnChild('li');
            $pageHref          = $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $page),
                    $this->getRouteParams()
                )
            );

            $pageNumberElement->setAttributes($this->getListItemAttributes());

            if ($page === $paginationData->current) {
                $pageNumberElement->addClass('active');
            }

            $anchorElement = $pageNumberElement->spawnChild('a')->addAttribute('href', $pageHref)->setContent($page);

            $anchorElement->addAttribute('data-page', $page);
        }

        $next       = $unorderedList->spawnChild('li');
        $nextAnchor = $next->spawnChild('a')->setContent('&raquo;');

        $next->setAttributes($this->getNextAttributes());

        if (empty($paginationData->next)) {
            $next->addClass('disabled');
        } else {
            $nextAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->next),
                    $this->getRouteParams()
                )
            ));
        }

        return $this->getElement()->render();
    }
993053
public function render()
    {
        parent::render();

        $soxId = $this->getEditObjectId();
        $sRemoxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("rem_oxid");
        if (isset($soxId) && $soxId != "-1") {
            $oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
            $oOrder->load($soxId);

            // all remark
            $oRems = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oRems->init("oxremark");
            $sUserIdField = 'oxorder__oxuserid';
            $sQuotedUserId = \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($oOrder->$sUserIdField->value);
            $sSelect = "select * from oxremark where oxparentid=" . $sQuotedUserId . " order by oxcreate desc";
            $oRems->selectString($sSelect);
            foreach ($oRems as $key => $val) {
                if ($val->oxremark__oxid->value == $sRemoxId) {
                    $val->selected = 1;
                    $oRems[$key] = $val;
                    break;
                }
            }

            $this->_aViewData["allremark"] = $oRems;

            if (isset($sRemoxId)) {
                $oRemark = oxNew(\OxidEsales\Eshop\Application\Model\Remark::class);
                $oRemark->load($sRemoxId);
                $this->_aViewData["remarktext"] = $oRemark->oxremark__oxtext->value;
                $this->_aViewData["remarkheader"] = $oRemark->oxremark__oxheader->value;
            }
        }

        return "order_remark.tpl";
    }
962108
public function render()
    {
        if (!$this->visible) {
            return;
        }

        SwatCellRenderer::render();

        if ($this->value === null && $this->null_display_value !== null) {
            $this->renderNullValue();
        } elseif ($this->value !== null) {
            $locale = SwatI18NLocale::get();

            $value = $this->getDisplayValue();
            $difference = $this->maximum_value - $value;

            $rating_class = floor(10 * min($value, $this->maximum_value));
            $rating_class = 'rating-' . $rating_class;

            $outer_span = new SwatHtmlTag('span');
            $outer_span->class = 'rating ' . $rating_class;
            $outer_span->open();

            $content = str_repeat('★', ceil($value));
            if ($difference > 0) {
                $content .= str_repeat('☆', floor($difference));
            }

            $value_tag = new SwatHtmlTag('span');
            $value_tag->setContent($content);
            $value_tag->class = 'value';
            $value_tag->title = $locale->formatNumber($value, 1);
            $value_tag->display();

            $best_tag = new SwatHtmlTag('span');
            $best_tag->class = 'best';
            $best_tag->title = $locale->formatNumber($this->maximum_value, 1);
            $best_tag->setContent('');
            $best_tag->display();

            $outer_span->close();
        }
    }
440989
public function render()
    {
        $statusCode = $this->getExceptionStatusCode();
        if (is_array($this->exceptionMessage)) {
            return new JsonResponse(
                $this->exceptionMessage,
                $statusCode
            );
        } else {
            throw $this->exception;
        }
    }
16894
public function render(Exception $e)
    {
        if ($e instanceof HttpResponseException) {
            /* error occurs */
            switch ($e->getCode()) {
                case HttpResponseException::ERR_NOTFOUND_CONTROLLER:
                case HttpResponseException::ERR_NOTFOUND_ACTION:
                case HttpResponseException::ERR_NOTFOUND_VIEW:
                    response()->setStatusCode(404);
                    echo htmlspecialchars($e->getMessage());
                    break;
                default :
                    echo 0, ':', htmlspecialchars($e->getMessage());
                    break;
            }
        } else {
            $this->convertExceptionToResponse($e);
        }
    }
637377
public function render() {

		$this->screen = get_current_screen();

		if ( ! $this->is_active() ) {
			return;
		}

		$this->screen->add_help_tab( array(
			'id'      => $this->slug,
			'title'   => $this->struct['title'],
			'content' => $this->struct['content'],
		) );

	}
1173197
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $this->_aViewData['edit'] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            $oDB = $this->getDatabase();

            // load object
            $this->updateArticle($oArticle, $soxId);

            $sShopID = $myConfig->getShopID();

            $sSelect = $this->formOrderAmountQuery($soxId);
            $this->_aViewData["totalordercnt"] = $iTotalOrderCnt = (float) $oDB->getOne($sSelect);

            $sSelect = $this->formSoldOutAmountQuery($soxId);
            $this->_aViewData["soldcnt"] = $iSoldCnt = (float) $oDB->getOne($sSelect);

            $sSelect = $this->formCanceledAmountQuery($soxId);
            $this->_aViewData["canceledcnt"] = $iCanceledCnt = (float) $oDB->getOne($sSelect);

            // not yet processed
            $this->_aViewData["leftordercnt"] = $iTotalOrderCnt - $iSoldCnt - $iCanceledCnt;

            // position in top ten
            $sSelect = "select oxartid,sum(oxamount) as cnt from oxorderarticles " .
                       "where oxordershopid = '{$sShopID}' group by oxartid order by cnt desc";

            $rs = $oDB->select($sSelect);
            $iTopPos = 0;
            $iPos = 0;
            if ($rs != false && $rs->count() > 0) {
                while (!$rs->EOF) {
                    $iPos++;
                    if ($rs->fields[0] == $soxId) {
                        $iTopPos = $iPos;
                    }
                    $rs->fetchRow();
                }
            }

            $this->_aViewData["postopten"] = $iTopPos;
            $this->_aViewData["toptentotal"] = $iPos;
        }

        $this->_aViewData["afolder"] = $myConfig->getConfigParam('aProductfolder');
        $this->_aViewData["aSubclass"] = $myConfig->getConfigParam('aArticleClasses');

        return "article_overview.tpl";
    }
412152
final public function render()
    {
        foreach ($this->layers as $layer) {

            if (! method_exists($this, $layer)) {
                Throw new PageException('Template Error: The requested layer "' . $layer . '" does not exist.');
            }

            $this->$layer();
        }
    }
654559
public function render()
    {
        $this->formActionUri = null;
        if ($this->arguments['action'] === null && $this->arguments['actionUri'] === null) {
            throw new ViewHelper\Exception('FormViewHelper requires "actionUri" or "action" argument to be specified', 1355243748);
        }
        $this->tag->addAttribute('action', $this->getFormActionUri());

        if (strtolower($this->arguments['method']) === 'get') {
            $this->tag->addAttribute('method', 'get');
        } elseif (strtolower($this->arguments['method']) === 'dialog') {
            $this->tag->addAttribute('method', 'dialog');
        } else {
            $this->tag->addAttribute('method', 'post');
        }

        $this->addFormObjectNameToViewHelperVariableContainer();
        $this->addFormObjectToViewHelperVariableContainer();
        $this->addFieldNamePrefixToViewHelperVariableContainer();
        $this->addFormFieldNamesToViewHelperVariableContainer();
        $this->addEmptyHiddenFieldNamesToViewHelperVariableContainer();
        $this->viewHelperVariableContainer->addOrUpdate(FormViewHelper::class, 'required-enctype', '');

        $formContent = $this->renderChildren();

        $requiredEnctype = $this->viewHelperVariableContainer->get(FormViewHelper::class, 'required-enctype');
        if ($requiredEnctype !== '' && $requiredEnctype !== strtolower($this->arguments['enctype'])) {
            throw new WrongEnctypeException('The form you are trying to render requires an enctype of "' . $requiredEnctype . '". Please specify the correct enctype when using file uploads.', 1522706399);
        }

        // wrap hidden field in div container in order to create XHTML valid output
        $content = chr(10) . '<div style="display: none">';
        if (strtolower($this->arguments['method']) === 'get') {
            $content .= $this->renderHiddenActionUriQueryParameters();
        }
        $content .= $this->renderHiddenIdentityField($this->arguments['object'], $this->getFormObjectName());
        $content .= $this->renderAdditionalIdentityFields();
        $content .= $this->renderHiddenReferrerFields();
        $content .= $this->renderEmptyHiddenFields();
        // Render the trusted list of all properties after everything else has been rendered
        $content .= $this->renderTrustedPropertiesField();
        $content .= $this->renderCsrfTokenField();
        $content .= '</div>' . chr(10);
        $content .= $formContent;

        $this->tag->setContent($content);

        $this->removeFieldNamePrefixFromViewHelperVariableContainer();
        $this->removeFormObjectFromViewHelperVariableContainer();
        $this->removeFormObjectNameFromViewHelperVariableContainer();
        $this->removeFormFieldNamesFromViewHelperVariableContainer();
        $this->removeEmptyHiddenFieldNamesFromViewHelperVariableContainer();

        return $this->tag->render();
    }
649049
public function render($request, Exception $e)
    {
        if ($this->isHttpException($e)) {
            $code = $e->getStatusCode();

            if ($code !== 500 || App::environment('production') || App::environment('staging')) {
                $page = Page::findByInternalName($code);

                if ($page) {
                    $request = Request::create($page->url()->getLocation(), 'GET');

                    return response(Route::dispatch($request)->getContent(), $code);
                }
            }
        }

        return parent::render($request, $e);
    }
345757
protected function _render()
    {
        try {
            $template = $this->_getTemplate();
            $context  = $this->_getContextFor($template);

            return $this->_renderTemplate($template, $context);
        } catch (RootException $e) {
            throw $this->_throwCouldNotRenderException($this->__('Could not render template'), null, $e);
        }
    }
720130
final function render()
    {
        if ($this->_c__isNowRendering)
            return '';

        $this->_c__isNowRendering = true;


        # Render Bind View Models:
        #
        $makeCopyOfCurrentQueue = clone $this->queue;
        foreach($this->queue as $vc)
        {
            /** @var DecorateViewModel $vc */

            try
            {
                $vc->delegateRenderBy($this, $this->nextRoot);
                // prepare bind view model result into parent model
                $vc->assertRenderResult(
                    $vc_render = $vc->render()
                    , $this
                );

                if ( $vc->isFinal() )
                    $rFinal = (string) $vc_render;
            }
            catch (\Exception $e) {
                ## set render flag to false, render job is done
                $this->_c__isNowRendering = false;
                throw $e;
            }
        }

        $this->queue = $makeCopyOfCurrentQueue;
        $this->_c__isNowRendering = false;


        if ( isset($rFinal) )
            return $rFinal;

        # Then Render Self ...
        ## ... implement on extend classes
        return $this->_view->render();
    }
584683
public function render_screen(){
		$this->register_batches();
		?>
		<div class="wrap">
			<h2><?php $this->_e('Do Batch Actions') ?></h2>
			<?php if( $this->batches ): ?>
			<form id="batch-form" method="post" action="<?= admin_url('admin-ajax.php') ?>">
				<input type="hidden" name="action" value="wpametu_batch">
				<?php wp_nonce_field('wpametu_batch') ?>
				<input type="hidden" name="page_num" id="page_num" value="1" />
				<ol class="batch-container">
				<?php
					$counter = 0;
					foreach( $this->batches as $batch_class ):
						$counter++;
						/** @var Batch $batch */
						$batch = $batch_class::get_instance();
						$option = $this->option;
						if( isset($option[$batch_class]) ){
							$last = $option[$batch_class];
						}else{
							$last = false;
						}
				?>
				<li>
					<input type="radio" id="batch-<?= $counter ?>" name="batch_class" value="<?= esc_attr(get_class($batch)) ?>" />
					<label for="batch-<?= $counter ?>">
						<span class="dashicons dashicons-yes"></span>
						<strong><?= esc_html($batch->title) ?></strong><small>ver <?= esc_html($batch->version) ?></small>
						<span class="description"><?= nl2br(esc_html($batch->description)) ?></span>
						<?php if( false === $last ): ?>
							<span class="executed not-yet"><?php $this->_e('Never executed') ?></span>
						<?php else: ?>
							<span class="executed"><?= date_i18n(get_option('date_format').' '.get_option('time_format'), $last) ?></span>
						<?php endif; ?>
					</label>
				</li>
				<?php endforeach; ?>
				</ol>
				<?php submit_button($this->__('Execute')) ?>
				<div class="loader">
					<div><span class="dashicons dashicons-update"></span></div>
				</div>
			</form>
			<div id="batch-result">
				<h3><span class="dashicons dashicons-media-code"></span> <?php $this->_e('Console') ?></h3>
				<div class="console">

				</div>
			</div>
			<?php else: ?>
			<div class="error"><p><?php $this->_e('There is no classes.') ?></p></div>
			<?php endif; ?>
		</div>
		<?php
	}
711164
public function render()
    {
        // Set the request arguments as GET parameters
        $_GET = $this->getRequestArguments();

        try {
            /** @var \TYPO3\CMS\Extbase\Mvc\Web\Response $response */
            $response = $this->objectManager->get(Response::class);
            $this->request->setOriginalRequestMappingResults($this->validationErrors);
            $this->getControllerInstance()->processRequest($this->request, $response);
            $result = $this->beautify($response->getContent());

            // In case of an error
        } catch (\Exception $e) {
            $result = '<pre class="error"><strong>'.$e->getMessage().'</strong>'.PHP_EOL
                      .$e->getTraceAsString().'</pre>';
        }

        return $result;
    }
254788
public function renderResults()
    {
        if (!$this->results && $this->query) {
            $this->performSearch();
        }

        if (!$this->outputController) {
            return user_error('Call renderResults() on a DocumentationViewer instance.', E_USER_ERROR);
        }
        
        $request = $this->outputController->getRequest();
        $data = $this->getSearchResults($request);
        $templates = array('DocumentationViewer_search');

        if ($request->requestVar('format') && $request->requestVar('format') == "atom") {
            // alter the fields for the opensearch xml.
            $title = ($title = $this->getTitle()) ? ' - '. $title : "";
            
            $link = Controller::join_links(
                $this->outputController->Link(),
                'DocumentationOpenSearchController/description/'
            );
            
            $data->setField('Title', $data->Title . $title);
            $data->setField('DescriptionURL', $link);
            
            array_unshift($templates, 'OpenSearchResults');
        }
        
        return $this->outputController->customise($data)->renderWith($templates);
    }