# learnpress/4.3.8/inc/admin/views/meta-boxes/quiz/assigned.php

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.3.8. 59 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.3.8/code/inc/admin/views/meta-boxes/quiz/assigned.php
- Raw: https://pluginprobe.com/plugins/learnpress/4.3.8/raw/inc/admin/views/meta-boxes/quiz/assigned.php
- Modified: 2026-06-01T03:47:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.3.8/code/inc/admin/views/meta-boxes/quiz/assigned.php#L10-L20`.

```php
<?php
/**
 * Admin View: Question assigned Meta box
 *
 * @version 1.0.1
 */

use LearnPress\Models\CourseModel;

defined( 'ABSPATH' ) || exit();

global $post;
$curd = new LP_Question_CURD();
$quiz = $curd->get_quiz( $post->ID );
?>

<div class="lp-item-assigned">
	<?php if ( $quiz ) : ?>
		<?php $courses = learn_press_get_item_courses( $quiz->ID ); ?>

		<?php if ( $courses ) : ?>
			<ul class="parent-courses">
				<?php
				foreach ( $courses as $course ) :
					$courseModel = CourseModel::find( $course->ID, true );
					if ( ! $courseModel ) {
						continue;
					}
					?>
					<li>
						<strong>
							<a href="<?php echo get_edit_post_link( $course->ID ); ?>" target="_blank"><?php echo get_the_title( $course->ID ); ?></a>
						</strong>
						&#8212;
						<a href="<?php echo learn_press_get_course_permalink( $course->ID ); ?>" target="_blank"><?php esc_html_e( 'View', 'learnpress' ); ?></a>
						<ul class="parent-quizzes">
							<li>
								<strong>
									<a href="<?php echo get_edit_post_link( $quiz->ID ); ?>" target="_blank">
										&#8212; &#8212;
										<?php echo get_the_title( $quiz->ID ); ?></a>
								</strong>
								&#8212;
								<a href="<?php echo $courseModel->get_item_link( $quiz->ID ); ?>" target="_blank"><?php esc_html_e( 'View', 'learnpress' ); ?></a>
							</li>
						</ul>
					</li>
				<?php endforeach; ?>
			</ul>
		<?php else : ?>
			<strong><a href="<?php echo get_edit_post_link( $quiz->ID ); ?>" target="_blank"><?php echo get_the_title( $quiz->ID ); ?></a></strong>
		<?php endif; ?>
		<?php
	else :
		esc_html_e( 'Not assigned yet', 'learnpress' );
	endif;
	?>
</div>

```
