Home › Forums › Legacy Support › Support queries › Other issues › Assignment error
- This topic has 53 replies, 5 voices, and was last updated 4 years, 6 months ago by Anshuman Sahu.
-
AuthorPosts
-
September 9, 2019 at 11:25 am #225240ratlsadminSpectatorHello Team, I am not able to mark the unit complete even after completing/submitting the assignment. Please check:- http://somup.com/cqQQX0eaUHSeptember 9, 2019 at 11:26 am #225241ratlsadminSpectatorThis reply has been marked as private.September 10, 2019 at 1:57 pm #225438DianaParticipantThis reply has been marked as private.September 11, 2019 at 9:04 am #225502ratlsadminSpectatorThis reply has been marked as private.September 12, 2019 at 2:13 pm #225701MkModeratorI 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').''; } }September 14, 2019 at 5:52 am #225905ratlsadminSpectatorHi 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 pleaseSeptember 14, 2019 at 7:44 am #225919Anshuman SahuKeymasterPlease share your site url , admin credentials and a valid ftp credentials in private reply to fix this at your end .September 14, 2019 at 8:46 am #225936ratlsadminSpectatorThis reply has been marked as private.September 16, 2019 at 7:27 am #226062MkModeratorYou forget to share FTP host, please share fast. I am waiting.September 16, 2019 at 8:20 am #226079ratlsadminSpectatorThis reply has been marked as private.September 16, 2019 at 1:22 pm #226164MkModeratorPlease check now I have changed some of your code. Refer: http://somup.com/cqQDI3egG1September 16, 2019 at 1:58 pm #226175ratlsadminSpectatorThis reply has been marked as private.September 17, 2019 at 11:09 am #226334MkModeratorI 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.6September 17, 2019 at 11:45 am #226345ratlsadminSpectatorThis reply has been marked as private.September 18, 2019 at 10:34 am #226528ratlsadminSpectatorThis reply has been marked as private. -
AuthorPosts
- The topic ‘Assignment error’ is closed to new replies.