<?php
foreach ($all_courses as $course_value) {
    ?>
    <div class="col-sm-12 gray_ttc " style="padding-top: 10px;padding-bottom: 10px;">
        <div class="col-sm-2">
            <?php
            echo $course_value->course_category_name;
            ?>
        </div>
        <div class="col-sm-4">
            <a href="<?php echo base_url() . $course_value->url ?>" target="_blank">
                <?php
                if (strlen($course_value->course_name) > 30) {
                    echo mb_substr($course_value->course_name, 0, 30, 'utf-8') . ' ...';
                } else {
                    echo $course_value->course_name;
                }
                ?>
            </a>
        </div>
        <div class="col-sm-2 ">
            <?php
            echo $work_files_details[$course_value->course_id]->work_file_folder_name;
            ?>
        </div>
        <div class="col-sm-1 text-center">
            <a href="<?php echo base_url() . 'view-work-file/' . $course_value->course_id; ?>" target="_blank">
                <?php
                echo $work_files_details[$course_value->course_id]->total_work_file;
                ?>
            </a>
        </div>
        <div class="col-sm-1 ">
            <?php
            if ($work_files_details[$course_value->course_id]->work_files_status == 1) {
                echo 'Active';
            } else if ($work_files_details[$course_value->course_id]->work_files_status == 3) {
                echo 'Draft';
            }
            ?>
        </div>
        <div class="col-sm-2">
            <a href="<?php echo base_url() . 'super-admin/edit-work-file/' . $course_value->course_id; ?>" target="_blank">
                <i class="fa fa-edit" title="Edit"></i>
            </a>
            <a href="javascript:void(0)"
               onclick="deleteCourseWorlFile('<?php echo base_url() . 'delete-work-file/' . $course_value->course_id; ?>')" >
                <i class="fa fa-trash" title="Delete"></i>
            </a>
        </div>
    </div>
    <?php
}
?>