Assignment error

Home Forums Legacy Support Support queries Other issues Assignment error

Viewing 15 posts - 1 through 15 (of 54 total)
  • Author
    Posts
  • #225240
    ratlsadmin
    Spectator
    Hello Team, I am not able to mark the unit complete even after completing/submitting the assignment. Please check:- http://somup.com/cqQQX0eaUH
    #225241
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #225438
    Diana
    Participant
    This reply has been marked as private.
    #225502
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #225701
    Mk
    Moderator
    I found your issue, you have set manual evaluation that's why it's showing to complete the assignment. once the evaluation is done it will show the option to finish the course. Refer: http://prntscr.com/p58swt  
    But if you want manual evaluation and user can submit course before evaluation then please add this code in your customizer. Go to wp-admin-> olugins-> plugin editor-> select wplms-customizer plugin-> open woplms-customizer.php and downbelow add this code: add_filter('wplms_unit_mark_complete','wplms_assignments_force_unit_complete123',11,3); function wplms_assignments_force_unit_complete123($mark_unit_html,$unit_id,$course_id){    $flag=0;    $assignment_locking = vibe_get_option('assignment_locking');    if(isset($assignment_locking) && $assignment_locking){        $unit_assignments = get_post_meta($unit_id,'vibe_assignment',false);        if(is_Array($unit_assignments) && is_array($unit_assignments[0])){          $unit_assignments = vibe_sanitize($unit_assignments);        }        if(isset($unit_assignments) && is_array($unit_assignments)){          foreach($unit_assignments as $unit_assignment){            if(is_numeric($unit_assignment)){              $user_id = get_current_user_id();              $assignment_complete = get_post_meta($unit_assignment,$user_id,true);              if(isset($assignment_complete) && $assignment_complete !=''){              }else{                $flag=1;                break;              }            }//end-if          }//end-for        }else{            return $mark_unit_html;        }    }else{        return $mark_unit_html;    }  if($flag){      return ''.__('FINISH ASSIGNMENT TO MARK UNIT COMPLETE','vibe').'';  }else{    return ''._x('Mark Unit Complete','vibe').'';  } }
    #225905
    ratlsadmin
    Spectator
    Hi Mk, I have already had a code to make student submit the assignment first and then be able to mark the unit complete which is as follows:-
    add_filter('wplms_unit_mark_complete','wplms_assignments_force_unit_complete123',99,3); function wplms_assignments_force_unit_complete123($mark_unit_html,$unit_id,$course_id){ $flag=0;     $unit_assignments = get_post_meta($unit_id,'vibe_assignment',false); if(is_Array($unit_assignments) && is_array($unit_assignments[0])){ $unit_assignments = vibe_sanitize($unit_assignments); }   if(isset($unit_assignments) && is_array($unit_assignments)){ foreach($unit_assignments as $unit_assignment){ if(is_numeric($unit_assignment)){ $user_id = get_current_user_id(); $assignment_complete = get_post_meta($unit_assignment,$user_id,true);   $args = array( 'status' => 'approve', 'user_id' => $user_id, // use user_id 'count' => true ,//return only the count 'post_id' =>$unit_assignment, ); $comments = get_comments($args); if(isset($assignment_complete) && $assignment_complete !='' && !empty($comments)){   }else{   $flag=1; break; } }//end-if }//end-for }else{   return $mark_unit_html; }     if($flag){ return ''.__('FINISH ASSIGNMENT TO MARK UNIT COMPLETE','vibe').''; }else{ return $mark_unit_html;; } }
    Previously it was working fine but suddenly it stopped and the student was not able to mark the unit complete. Please check and resolve the issue as soon as possible it's been open for quite some days now. PS:- I tried the code you sent recently but the same thing happened I was not able to mark the unit complete. Please provide with one code and/or instruction and solve this issue please
    #225919
    Anshuman Sahu
    Keymaster
    Please share your site url , admin credentials and a valid ftp credentials in private reply to fix this at your end .
    #225936
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #226062
    Mk
    Moderator
    You forget to share FTP host, please share fast. I am waiting.
    #226079
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #226164
    Mk
    Moderator
    Please check now I have changed some of your code. Refer: http://somup.com/cqQDI3egG1
    #226175
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #226334
    Mk
    Moderator
    I tried many times on your site but unable to replicate above issue. Please have a look here: http://somup.com/cqQb6Rektj and for 2nd issue updated theme and plugin will be required. which is 3.9.6
    #226345
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #226528
    ratlsadmin
    Spectator
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 54 total)
  • The topic ‘Assignment error’ is closed to new replies.