if ($material['rating'] === null) : ?>
if ($allowed_to_review) : ?>
"
href="= $controller->link_for('oer/market/review/' . $material->getId()) ?>" data-dialog>
endif ?>
= Icon::create("star", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(50) ?>
= Icon::create("star", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(50) ?>
= Icon::create("star", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(50) ?>
= Icon::create("star", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(50) ?>
= Icon::create("star", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(50) ?>
if ($allowed_to_review) : ?>
endif ?>
else : ?>
if ($allowed_to_review) : ?>
endif ?>
$material['rating'] = round($material['rating'], 1) / 2 ?>
$v = $material['rating'] >= 0.75 ? "" : ($material['rating'] >= 0.25 ? "-halffull" : "-empty") ?>
= Icon::create("star{$v}", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO)->asImg(50) ?>
$v = $material['rating'] >= 1.75 ? "" : ($material['rating'] >= 1.25 ? "-halffull" : "-empty") ?>
= Icon::create("star{$v}", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO)->asImg(50) ?>
$v = $material['rating'] >= 2.75 ? "" : ($material['rating'] >= 2.25 ? "-halffull" : "-empty") ?>
= Icon::create("star{$v}", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO)->asImg(50) ?>
$v = $material['rating'] >= 3.75 ? "" : ($material['rating'] >= 3.25 ? "-halffull" : "-empty") ?>
= Icon::create("star{$v}", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO)->asImg(50) ?>
$v = $material['rating'] >= 4.75 ? "" : ($material['rating'] >= 4.25 ? "-halffull" : "-empty") ?>
= Icon::create("star{$v}", $allowed_to_review ? Icon::ROLE_CLICKABLE : Icon::ROLE_INFO)->asImg(50) ?>
if ($allowed_to_review) : ?>
endif ?>
endif ?>
-
foreach ($material->reviews as $review) : ?>
-
if ($review['metadata']['host_id']) : ?> $user = ExternalUser::find($review['user_id']) ?> getId()) ?>"> = htmlReady($user->name) ?> else : ?> $user = new User($review['user_id']) ?> $user['username']]) ?>"> = htmlReady($user->getFullName()) ?> endif ?> (= htmlReady($review['metadata']['host_id'] ? $review->host['name'] : Config::get()->UNI_NAME_CLEAN) ?>)= formatReady($review['content']) ?>$rating = round($review['metadata']['rating'], 1) ?> $v = $rating >= 0.75 ? "" : ($rating >= 0.25 ? "-halffull" : "-empty") ?> = Icon::create("star$v", Icon::ROLE_INFO) ?> $v = $rating >= 1.75 ? "" : ($rating >= 1.25 ? "-halffull" : "-empty") ?> = Icon::create("star$v", Icon::ROLE_INFO) ?> $v = $rating >= 2.75 ? "" : ($rating >= 2.25 ? "-halffull" : "-empty") ?> = Icon::create("star$v", Icon::ROLE_INFO) ?> $v = $rating >= 3.75 ? "" : ($rating >= 3.25 ? "-halffull" : "-empty") ?> = Icon::create("star$v", Icon::ROLE_INFO) ?> $v = $rating >= 4.75 ? "" : ($rating >= 4.25 ? "-halffull" : "-empty") ?> = Icon::create("star$v", Icon::ROLE_INFO) ?> if ($GLOBALS['perm']->have_perm("autor") && !count($review->comments)) : ?> getId()) ?>" style="font-size: 0.8em;"> = _('Darauf antworten') ?> endif ?>if (count($review->comments)) : ?> getId()) ?>"> = Icon::create('comment')->asImg(['class' => 'text-bottom']) ?> = sprintf(_('%s Kommentare dazu'), count($review->comments)) ?> elseif ($material->isMine()) : ?> getId()) ?>"> = Icon::create('comment')->asImg(['class' => 'text-bottom']) ?> = _('Dazu einen Kommentar schreiben') ?> endif ?>
endforeach ?>
if (!$material->isMine() && $GLOBALS['perm']->have_perm("autor")) : ?>
= \Studip\LinkButton::create(_('Review schreiben'), $controller->url_for('oer/market/review/' . $material->getId()), ['data-dialog' => 1]) ?>
endif ?>