Skip to content

Commit

Permalink
dashboard quiz user emails styling
Browse files Browse the repository at this point in the history
  • Loading branch information
luukee committed Jun 15, 2022
1 parent 7a73d6f commit 3aa9a24
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion public/quiz-create/css/enp_quiz-create.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/quiz-create/css/enp_quiz-create.min.css.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions public/quiz-create/css/sass/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
padding: .3rem;
border-radius: 3px;
width: 100%;
background-color: #ececec;
@include breakpoint(large) {
min-width: 200px;
font-size: 0.85rem;
Expand Down Expand Up @@ -128,6 +129,9 @@
margin-bottom: 0.325rem;
border-bottom: 1px solid $dark-gray;
@include breakpoint(medium) {
padding: 2.5em 0 1em 0;
}
@include breakpoint(large) {
padding: 1em 0;
}
}
Expand Down Expand Up @@ -494,6 +498,7 @@
left: 0;
right: 0;
bottom: 0;
padding: 0.75rem 1.2rem 1.5rem 1.2rem;
}

.enp-dash-link__icon {
Expand Down
43 changes: 23 additions & 20 deletions public/quiz-create/templates/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,32 @@
<div class="enp-quiz-list__view">
<?php include(ENP_QUIZ_CREATE_TEMPLATES_PATH.'/partials/dashboard-quiz-sort.php');?>
</div>
<div class="user-emails">
<ol style="list-style:none;">
<?php

if(!empty($quizzes)) {
<?php if(!empty($quizzes) && current_user_can('manage_options')) : ?>
<div class="user-emails">
<br>
<h2 class="enp-dash__section-title">Quiz Users<br>
<p style="font-size:0.7em;margin:0.5em 0 0 0;text-transform: none;">To view full list of users add below snippet to the end of the address bar URL:<br><code style="font-size:1em;margin-left:1em;font-weight:bold;">&limit=9999</code></p>
</h2>
<ol style="list-style:none;margin-left:0.5em;">
<?php
$emails = array();
foreach( $quizzes as $quiz ) {
$quiz = new Enp_quiz_Quiz($quiz);
if ( current_user_can('manage_options') && isset($_GET['include']) && $_GET['include'] === 'all_users' ) {
$created_by = $quiz->get_quiz_created_by();
$user_info = get_userdata( $created_by );
$user_email_address = $user_info->user_email;
array_push( $emails, $user_email_address );
}
}
$emails = array_unique( $emails );
foreach( $emails as $email ) {
echo '<li class="enp-dash-item__email" style="font-size:10px;">' . $email . '</li>';
foreach( $quizzes as $quiz ) {
$quiz = new Enp_quiz_Quiz($quiz);
if ( current_user_can('manage_options') && isset($_GET['include']) && $_GET['include'] === 'all_users' ) {
$created_by = $quiz->get_quiz_created_by();
$user_info = get_userdata( $created_by );
$user_email_address = $user_info->user_email;
array_push( $emails, $user_email_address );
}
}
?>
</ol>
</div>
$emails = array_unique( $emails );
foreach( $emails as $email ) {
echo '<li class="enp-dash-item__email" style="font-size:10px;">' . $email . '</li>';
}
?>
</ol>
</div>
<?php endif; ?>
</aside>
<article class="enp-container enp-dash-container">
<section class="enp-dash-wrap">
Expand Down
2 changes: 1 addition & 1 deletion public/quiz-take/css/enp_quiz-take.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/quiz-take/css/enp_quiz-take.min.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/quiz-take/css/sass/_quiz.scss
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@
.enp-results__description {
max-width: 24rem;
margin: 0 auto 1.6rem;
text-align: center;
}

.enp-results__score__circle {
Expand Down

0 comments on commit 3aa9a24

Please sign in to comment.