Home › Forums › Legacy Support › Support queries › Setup issues › wplms assignment
- This topic has 12 replies, 3 voices, and was last updated 2 years, 8 months ago by Veronica.
Viewing 13 posts - 1 through 13 (of 13 total)
-
AuthorPosts
-
April 5, 2022 at 10:37 am #383003nawrasjSpectatorafter 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/c3fh6aOjP1April 5, 2022 at 10:43 am #383004nawrasjSpectatorThis reply has been marked as private.April 5, 2022 at 3:00 pm #383025MrVibeKeymasterchecking 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.April 5, 2022 at 3:36 pm #383034MrVibeKeymasterAdded fix in your site : https://prnt.sc/22knU31JB4jUApril 5, 2022 at 4:17 pm #383045nawrasjSpectatorThis reply has been marked as private.April 5, 2022 at 4:25 pm #383046nawrasjSpectatorThis reply has been marked as private.April 6, 2022 at 12:42 am #383057MrVibeKeymasterThis 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; }); });
April 6, 2022 at 8:24 am #383070nawrasjSpectatorThis reply has been marked as private.April 7, 2022 at 3:22 pm #383173VeronicaModeratoradd 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); });
April 8, 2022 at 6:30 pm #383262nawrasjSpectatorThis reply has been marked as private.April 11, 2022 at 2:52 pm #383394VeronicaModeratorhi use this:
make sure you have not included the assignment in course setting enable and enable the auto evaluation course settingadd_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); });
April 11, 2022 at 8:10 pm #383419nawrasjSpectatorThis reply has been marked as private.April 12, 2022 at 6:26 am #383430VeronicaModeratoryes please let us know -
AuthorPosts
Viewing 13 posts - 1 through 13 (of 13 total)
- The topic ‘wplms assignment’ is closed to new replies.