function wplms_event_show_invitations_status()
 {
     $accepted = $rejected = $awaited = 0;
     $sent = get_post_meta(get_the_ID(), 'vibe_send_invitation', true);
     if (isset($sent) && $sent && current_user_can('edit_posts')) {
         echo '<h3 class="heading">' . __('Invitation Responses', 'wplms-events') . '</h3>';
         $course_id = get_post_meta(get_the_ID(), 'vibe_event_course', true);
         $students = bp_course_get_students_undertaking($course_id);
         echo '<ul class="invitation_students">';
         foreach ($students as $student) {
             $status = get_post_meta(get_the_ID(), $student, true);
             if (isset($status) && $status != '') {
                 if ($status == 1) {
                     $accepted++;
                 } else {
                     $rejected++;
                 }
             } else {
                 $awaited++;
             }
             echo '<li><label>' . bp_core_get_userlink($student) . '</label><span>' . (isset($status) && $status != '' ? $status == 1 ? '<i class="icon-check tip" title="' . __('ACCEPTED', 'wplms-events') . '"></i>' : '<i class="icon-x tip" title="' . __('REJECTED', 'wplms-events') . '"></i>' : '<i class="icon-alarm tip" title="' . __('AWAITING RESPONSE', 'wplms-events') . '"></i>') . '</span></li>';
         }
         echo '</ul>';
         echo '<ul class="invitation_results">
         <li><strong>' . __('INVITATION RESULTS', 'wplms-events') . '</strong></li>
         <li><label>' . __('ACCEPTED', 'wplms-events') . '</label><span>' . $accepted . '</span></li>
          <li><label>' . __('REJECTED', 'wplms-events') . '</label><span>' . $rejected . '</span></li>
          <li><label>' . __('AWAITING RESPONSE', 'wplms-events') . '</label><span>' . $awaited . '</span></li>
         </ul>';
     }
 }
Beispiel #2
0
        ?>
</h1>
	<div class="featuredvideo"> <?php 
        $videourl = get_field('upload_course_video');
        echo apply_filters('the_content', $videourl);
        ?>
</div>
<!--	<h6><?php 
        the_excerpt();
        ?>
</h6> -->
</div>
<div class="students_undertaking">
	<?php 
        $students_undertaking = array();
        $students_undertaking = bp_course_get_students_undertaking();
        $students = get_post_meta(get_the_ID(), 'vibe_students', true);
        echo '<strong>' . $students . __(' STUDENTS ENROLLED', 'vibe') . '</strong>';
        echo '<ul>';
        $i = 0;
        foreach ($students_undertaking as $student) {
            $i++;
            echo '<li>' . get_avatar($student) . '</li>';
            if ($i > 5) {
                break;
            }
        }
        echo '</ul>';
        ?>
</div>
<?php 
Beispiel #3
0
                $students = get_post_meta(get_the_ID(), 'vibe_students', true);
            }
            ?>
	<h4 class="total_students"><?php 
            _e('Total number of Students in course', 'vibe');
            ?>
		<span><?php 
            echo $students;
            ?>
</span></h4>
	<h3><?php 
            _e('Students Currently taking this course', 'vibe');
            ?>
</h3>
	<?php 
            $students_undertaking = apply_filters('bp_course_admin_before_course_students_list', bp_course_get_students_undertaking(), get_the_ID());
            echo '<ul class="course_students">';
            if (count($students_undertaking) > 0) {
                foreach ($students_undertaking as $student) {
                    if (function_exists('bp_get_profile_field_data')) {
                        $bp_name = bp_core_get_userlink($student);
                        $bp_location = '';
                        $ifield = vibe_get_option('student_field');
                        if (!isset($field) || $field == '') {
                            $field = 'Location';
                        }
                        if (bp_is_active('xprofile')) {
                            $bp_location = bp_get_profile_field_data('field=' . $field . '&user_id=' . $student);
                        }
                        if ($bp_name) {
                            echo '<li id="s' . $student . '"><input type="checkbox" class="member" value="' . $student . '"/>';