Code Duplication    Length = 21-21 lines in 5 locations

includes/class-sensei-analysis.php 5 locations

@@ 205-225 (lines=21) @@
202
	 * @param integer $user_id
203
	 * @return void
204
	 */
205
	public function analysis_user_profile_view( $user_id ) {
206
207
		// Load Analysis data
208
		$sensei_analysis_user_profile = $this->load_data_object( 'User_Profile', $user_id );
209
		// Wrappers
210
		do_action( 'analysis_before_container' );
211
		do_action( 'analysis_wrapper_container', 'top' );
212
		$this->analysis_headers( array( 'nav' => 'user_profile' ) );
213
		?>
214
		<div id="poststuff" class="sensei-analysis-wrap user-profile">
215
			<div class="sensei-analysis-main">
216
				<?php $sensei_analysis_user_profile->display(); ?>
217
			</div>
218
			<div class="sensei-analysis-extra">
219
				<?php do_action( 'sensei_analysis_extra' ); ?>
220
			</div>
221
		</div>
222
		<?php
223
		do_action( 'analysis_wrapper_container', 'bottom' );
224
		do_action( 'analysis_after_container' );
225
	} // End analysis_user_profile_view()
226
227
	/**
228
	 * An individual Course view for analysis, showing the Courses Lessons
@@ 233-253 (lines=21) @@
230
	 * @param integer $course_id
231
	 * @return void
232
	 */
233
	public function analysis_course_view( $course_id ) {
234
235
		// Load Analysis data
236
		$sensei_analysis_course = $this->load_data_object( 'Course', $course_id );
237
		// Wrappers
238
		do_action( 'analysis_before_container' );
239
		do_action( 'analysis_wrapper_container', 'top' );
240
		$this->analysis_headers( array( 'nav' => 'course' ) );
241
		?>
242
		<div id="poststuff" class="sensei-analysis-wrap course-profile">
243
			<div class="sensei-analysis-main">
244
				<?php $sensei_analysis_course->display(); ?>
245
			</div>
246
			<div class="sensei-analysis-extra">
247
				<?php do_action( 'sensei_analysis_extra' ); ?>
248
			</div>
249
		</div>
250
		<?php
251
		do_action( 'analysis_wrapper_container', 'bottom' );
252
		do_action( 'analysis_after_container' );
253
	} // End analysis_course_view()
254
255
	/**
256
	 * An individual Course view for analysis, showing a specific Learners Lessons
@@ 262-282 (lines=21) @@
259
	 * @param integer $user_id
260
	 * @return void
261
	 */
262
	public function analysis_user_course_view( $course_id, $user_id ) {
263
264
		// Load Analysis data
265
		$sensei_analysis_user_course = $this->load_data_object( 'Course', $course_id, $user_id );
266
		// Wrappers
267
		do_action( 'analysis_before_container' );
268
		do_action( 'analysis_wrapper_container', 'top' );
269
		$this->analysis_headers( array( 'nav' => 'user_course' ) );
270
		?>
271
		<div id="poststuff" class="sensei-analysis-wrap course-profile">
272
			<div class="sensei-analysis-main">
273
				<?php $sensei_analysis_user_course->display(); ?>
274
			</div>
275
			<div class="sensei-analysis-extra">
276
				<?php do_action( 'sensei_analysis_extra' ); ?>
277
			</div>
278
		</div>
279
		<?php
280
		do_action( 'analysis_wrapper_container', 'bottom' );
281
		do_action( 'analysis_after_container' );
282
	} // End analysis_user_course_view()
283
284
	/**
285
	 * An individual Course view for analysis, showing all the Learners
@@ 290-310 (lines=21) @@
287
	 * @param integer $course_id
288
	 * @return void
289
	 */
290
	public function analysis_course_users_view( $course_id ) {
291
292
		// Load Analysis data
293
		$sensei_analysis_course_users = $this->load_data_object( 'Course', $course_id );
294
		// Wrappers
295
		do_action( 'analysis_before_container' );
296
		do_action( 'analysis_wrapper_container', 'top' );
297
		$this->analysis_headers( array( 'nav' => 'course_users' ) );
298
		?>
299
		<div id="poststuff" class="sensei-analysis-wrap course-profile">
300
			<div class="sensei-analysis-main">
301
				<?php $sensei_analysis_course_users->display(); ?>
302
			</div>
303
			<div class="sensei-analysis-extra">
304
				<?php do_action( 'sensei_analysis_extra' ); ?>
305
			</div>
306
		</div>
307
		<?php
308
		do_action( 'analysis_wrapper_container', 'bottom' );
309
		do_action( 'analysis_after_container' );
310
	} // End analysis_course_users_view()
311
312
	/**
313
	 * An individual Lesson view for analysis, showing all the Learners
@@ 318-338 (lines=21) @@
315
	 * @param integer $lesson_id
316
	 * @return void
317
	 */
318
	public function analysis_lesson_users_view( $lesson_id ) {
319
320
		// Load Analysis data
321
		$sensei_analysis_lesson_users = $this->load_data_object( 'Lesson', $lesson_id );
322
		// Wrappers
323
		do_action( 'analysis_before_container' );
324
		do_action( 'analysis_wrapper_container', 'top' );
325
		$this->analysis_headers( array( 'nav' => 'lesson_users' ) );
326
		?>
327
		<div id="poststuff" class="sensei-analysis-wrap course-profile">
328
			<div class="sensei-analysis-main">
329
				<?php $sensei_analysis_lesson_users->display(); ?>
330
			</div>
331
			<div class="sensei-analysis-extra">
332
				<?php do_action( 'sensei_analysis_extra' ); ?>
333
			</div>
334
		</div>
335
		<?php
336
		do_action( 'analysis_wrapper_container', 'bottom' );
337
		do_action( 'analysis_after_container' );
338
	} // End analysis_lesson_users_view()
339
340
	/**
341
	 * render_stats_box outputs stats boxes