public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/pages/page-course-modify.php
/**
 * Handles showing the delete course button on the course modification page.
 *
 * @since 1.0.0
 *
 * @param object $courseDetails The course details object.
 */
Handles showing the delete course button on the course modification page.

@param object $courseDetails The course details object.
Handles showing the delete course button on the course modification page . @param object $courseDetails The course details object .
function WPCW_showPage_ModifyCourse_deleteCourseButton( $courseDetails ) {
	$html = false;
	$html .= sprintf( '<form method="POST" action="%s&action=delete&course_id=%d" id="wpcw_course_settings_delete_course">', admin_url( 'admin.php?page=wpcw-courses' ), $courseDetails->course_id );
	$html .= '<div class="wpcw_form_delete_options">';
	$html .= sprintf( '<label><input type="radio" name="delete_course_type" value="course_and_module"/> %s <div class="wpcw_form_delete_options_desc">%s</div></label>', __( 'Course and module settings only', 'wp-courseware' ), __( 'Units and quizzes will not be deleted, but simply disassociated from the course.', 'wp-courseware' ) );
	$html .= sprintf( '<label><input type="radio" name="delete_course_type" value="complete" checked/> %s <div class="wpcw_form_delete_options_desc">%s</div></label>', __( 'Delete everything', 'wp-courseware' ), __( 'This option will delete the course, the modules, all units and all quizzes.', 'wp-courseware' ) );
	$html .= '</div>';
	$html .= sprintf( '<input type="submit" value="%s" class="button-primary wpcw_delete_item" title="%s" />', __( 'Delete this Course', 'wp-courseware' ), __( "Are you sure you want to delete the this course?\n\nThis CANNOT be undone!", 'wp-courseware' ) );
	$html .= '</form>';
	echo $html;
}
function WPCW_showPage_ModifyCourse_deleteCourseButton ( $ courseDetails ) { $ html = false ; $ html .= sprintf ( '<form method="POST" action="%s&action=delete&course_id=%d" id="wpcw_course_settings_delete_course">' , admin_url ( 'admin.php?page=wpcw-courses' ) , $ courseDetails -> course_id ) ; $ html .= '<div class="wpcw_form_delete_options">' ; $ html .= sprintf ( '<label><input type="radio" name="delete_course_type" value="course_and_module"/> %s <div class="wpcw_form_delete_options_desc">%s</div></label>' , __ ( 'Course and module settings only' , 'wp-courseware' ) , __ ( 'Units and quizzes will not be deleted, but simply disassociated from the course.' , 'wp-courseware' ) ) ; $ html .= sprintf ( '<label><input type="radio" name="delete_course_type" value="complete" checked/> %s <div class="wpcw_form_delete_options_desc">%s</div></label>' , __ ( 'Delete everything' , 'wp-courseware' ) , __ ( 'This option will delete the course, the modules, all units and all quizzes.' , 'wp-courseware' ) ) ; $ html .= '</div>' ; $ html .= sprintf ( '<input type="submit" value="%s" class="button-primary wpcw_delete_item" title="%s" />' , __ ( 'Delete this Course' , 'wp-courseware' ) , __ ( " Are you sure you want to delete the this course? \n \n This CANNOT be undone! " , 'wp-courseware' ) ) ; $ html .= '</form>' ; echo $ html ; }
Handles showing the delete course button on the course modification page.
Handles showing the delete course button on the course modification page .
// Generate the URL that will handle the deletion for this course. Using the ID in the GET URL just in case the deletion fails. // Radio option selection // Submit