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 18, 2019 at 10:46 am #226542Anshuman SahuKeymasterHi please remove all the previously given code and add this one in your wplms-customizer.php file in wplms customizer plugin : add_filter('wplms_unit_mark_complete','wplms_assignments_force_unit_complete1234',99999,3); function wplms_assignments_force_unit_complete1234($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 '<a>'.__('FINISH ASSIGNMENT TO MARK UNIT COMPLETE','vibe').'</a>'; }else{ return $mark_unit_html;; } }September 18, 2019 at 10:58 am #226548ratlsadminSpectatorThis reply has been marked as private.September 19, 2019 at 1:21 pm #226768loganMemberHello, i have found that this is a duplicate topic here: https://wplms.io/support/forums/topic/the-theme-update-has-not-change-the-assignment-part/ if you create the same topic in many sections, you will get many answers as per the situation. this could be ambiguous or little confusing. also answer could lead you to misunderstanding or unclear results. so i request you to focus on the one topic at a time and share details about the issue as much as possible. refer: http://prntscr.com/p88t0eSeptember 19, 2019 at 2:49 pm #226793ratlsadminSpectatorHi Logan, I would like to continue this thread as this specifies the actual problem. Also, I want the assignment system to be the same as the previous update. I just wish to make it run as it was before.September 20, 2019 at 1:36 pm #227014Anshuman SahuKeymasterWell if you do not want the new assignment button in the front end course creator then please hide it simply using this custom css (add it in wp-admin > appearance -> customize -> custom css : ) : ul.course_curriculum .add_element a#add_course_assignment{display:none} Also please try this code and add all the previously given codes , this latest code has a check for student's response in the assignment which previous codes were lacking : https://wplms.io/support/forums/topic/assignment-error-3/page/2/#post-226542September 21, 2019 at 12:22 pm #227137ratlsadminSpectatorThis reply has been marked as private.September 23, 2019 at 2:30 pm #227349MkModeratorI checked on my local, the above-given code is working with student id. It will be helpful for me if create a new course and new student and test. if still, you find error please share course URL with user details. I will check it by my side and solve it. thank you.September 24, 2019 at 5:50 am #227422ratlsadminSpectatorThis reply has been marked as private.September 24, 2019 at 2:09 pm #227541MkModeratorSorry sir, it was totally my fault. I checked 2 times at my local and it was working fine thats why i just copy paste and send the code to you. but by mistake, I have sent you incomplete code. I have updated code in your customizer. please check and reply now. here is data I tested: http://somup.com/cqQZ2eeENY
I am not able to open the assignment page when I click on the assignment it redirects to the same unit page.
In the above video, you can see on clicking on an assignment it redirected to the assignment page. its working fine. If you want it too not redirect and open as a unit part, then currently it's not available.September 26, 2019 at 8:42 am #227790ratlsadminSpectatorHi Mk, Thank you for resolving the issue. I am not able to find the submitted assignment from the admin tab of a course from the front end. Can you please check that and resolve it?September 27, 2019 at 10:04 am #227975MkModeratorok checking ..September 27, 2019 at 10:25 am #227982ratlsadminSpectatorHi Mk, Can you also check the WPLMS Points criteria bug as it isn't giving points to the mentioned unit ids.September 27, 2019 at 12:31 pm #228006MkModeratorThis reply has been marked as private.September 27, 2019 at 12:57 pm #228015ratlsadminSpectatorThis reply has been marked as private.September 28, 2019 at 7:54 am #228083Anshuman SahuKeymasterPlease make sure that the course is selected in the assignment settings : http://prntscr.com/pc24pk -
AuthorPosts
- The topic ‘Assignment error’ is closed to new replies.