wplms assignment

Home Forums Legacy Support Support queries Setup issues wplms assignment

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #383003
    nawrasj
    Spectator
    after submitting the assignment of the course and if the course is a manual evaluation or an automatic evaluation mode. I am not able to complete the course. - assignment is not associated with the course. - there is no mark previous unit complete. - i am using latest theme, vibebp and wplms plugin issue in short- "course should be complete after clicking button and it should go in the manual evaluation mode" refer: http://somup.com/c3fh6aOjP1
    #383004
    nawrasj
    Spectator
    This reply has been marked as private.
    #383025
    MrVibe
    Keymaster
    checking site, this would happen if the assignment was added into the curriculum of the course. All curriculum elements must be marked as complete. The criteria for assignment compeltion can be changed from "Evaluated" to "submitted" and that would resolve the issue you are facing and luckily we have this switch / filter in place.
    #383034
    MrVibe
    Keymaster
    Added fix in your site : https://prnt.sc/22knU31JB4jU
    #383045
    nawrasj
    Spectator
    This reply has been marked as private.
    #383046
    nawrasj
    Spectator
    This reply has been marked as private.
    #383057
    MrVibe
    Keymaster
    This is the fix you need to add in the child theme, we basically add an additional check if the assignment was submitted allow course submission.
    add_action('init',function(){
        $a = WPLMS_Assignments_Filterss::init();
        remove_filter('wplms_finish_course_check',array($a,'incourse_assignment_check'),9999,3);
        add_filter('wplms_finish_course_check',function($flag,$course_curriculum,$user_id=null){
            
            if(!empty($flag) && get_post_type($flag) == 'wplms-assignment'){
                
                $marks = get_post_meta($flag,$user_id,true);
                if(!empty($marks)){
                    return 0;
                }else{
                    $answers=get_comments(array(
                        'post_id' => $flag,
                        'status' => 'approve',
                        'number' => 1,
                        'user_id' => $user_id
                    ));
                    if(isset($answers) && is_array($answers) && count($answers) && !empty($marks)){
                        return 0;
                    }
                }
            }
            return $flag;
        });
    });
    #383070
    nawrasj
    Spectator
    This reply has been marked as private.
    #383173
    Veronica
    Moderator
    add this:
    add_action('init',function(){
        $a = WPLMS_Assignments_Filterss::init();
        remove_filter('wplms_finish_course_check',array($a,'incourse_assignment_check'),9999,3);
        add_filter('wplms_finish_course_check',function($flag,$course_curriculum,$user_id=null){
            
            if(!empty($flag) && get_post_type($flag) == 'wplms-assignment'){
                
                $marks = get_post_meta($flag,$user_id,true);
                if(!empty($marks)){
                    return 0;
                }else{
                    $answers=get_comments(array(
                        'post_id' => $flag,
                        'status' => 'approve',
                        'number' => 1,
                        'user_id' => $user_id
                    ));
                    if(isset($answers) && is_array($answers) && count($answers) && !empty($marks)){
                        return 0;
                    }
                }
            }
            return $flag;
        },10,3);
    });
    #383262
    nawrasj
    Spectator
    This reply has been marked as private.
    #383394
    Veronica
    Moderator
    hi use this:
    add_action('init',function(){
        $a = WPLMS_Assignments_Filterss::init();
        remove_filter('wplms_finish_course_check',array($a,'incourse_assignment_check'),9999,3);
        add_filter('wplms_finish_course_check',function($flag,$course_curriculum,$user_id=null){
            
            if(!empty($flag) && get_post_type($flag) == 'wplms-assignment'){
                
                $marks = get_post_meta($flag,$user_id,true);
    
    $matters = get_post_meta($flag,'vibe_assignment_evaluation',true);
    if(empty($matters) || $matters =='H'){return 0;}
                if(!empty($marks)){
                    return 0;
                }else{
                    $answers=get_comments(array(
                        'post_id' => $flag,
                        'status' => 'approve',
                        'number' => 1,
                        'user_id' => $user_id
                    ));
                    if(isset($answers) && is_array($answers) && count($answers) && !empty($marks)){
                        return 0;
                    }
                }
            }
            return $flag;
        },99999,3);
    });
    make sure you have not included the assignment in course setting enable and enable the auto evaluation course setting
    #383419
    nawrasj
    Spectator
    This reply has been marked as private.
    #383430
    Veronica
    Moderator
    yes please let us know
Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘wplms assignment’ is closed to new replies.