Home › Forums › Legacy Support › Support queries › Other issues › Course Evaluation Issues
- This topic has 34 replies, 4 voices, and was last updated 3 years, 2 months ago by Anshuman Sahu.
-
AuthorPosts
-
August 31, 2021 at 1:32 pm #369622Anshuman SahuKeymasterWell when this code is added then assignments marks will not be taken into consideration at all for anyone no matter if they are in batch or not . NEw instructions : add this code and the other one with function italy_made_easy no need to disconnect any assignments then . After you evaluation got ok then you can remove both code. You just need to make sure if any assignment is connected in unit or not you need to remove that .August 31, 2021 at 2:04 pm #369631italymadeeasySpectatorHi ALex, both links take to the same place, so it is hard to understand which "code" you are saying I should add to which code. Could you please share the code here, in this thread, so to avoid any confusion? Much appreciated!September 1, 2021 at 3:21 pm #369740Anshuman SahuKeymaster
add_action('init',function(){ remove_filter('wplms_course_student_marks','wplms_assignment_student_marks',1,3); remove_filter('wplms_course_maximum_marks','wplms_assignment_maximum_marks',1,3); }); function italy_made_easy($group_id){ $run = groups_get_group_members(array('group_id'=>$group_id) ); $course_ids = get_batch_courses($group_id); if(!empty($run['members'])){ foreach($run['members'] as $key => $user){ foreach($course_ids as $course_id){ $check = bp_course_get_user_course_status($user->ID,$course_id); if($check>2) bp_get_course_check_course_complete(array('id'=>$course_id,'user_id'=>$user->ID)); } } } }
September 1, 2021 at 9:42 pm #369766italymadeeasySpectatorThanks Alex, much appreciated! Just to have final confirmation (considering how delicate and potentially devastating this action could be!): 1. Do I run this script ONCE to fix all the courses that were incorrectly evaluated? or 2. Create the script as an active script that runs all the time? This script will: 3. force WPLMS to re-evaluate all courses that were previously evaluated 4. keep their status as "finished" 5. issue a new certificate 6. Not take Assignments into consideration for the course evaluation (regardless of whether a student was enrolled in a batch with assignments or not) This new script also allows us to: 7. re-connect all Assignments to their matching course (because the script ignores them in all cases, but our Admin will still be able to see the submitted assignments, grade them and send feedback to the student)? Sorry for being so pedantic, but I'm sure you understand this is a delicate situation, when we have thousands of customers and website users! Best to be sure 100%, than create more mess! ThanksSeptember 3, 2021 at 2:11 pm #369948Anshuman SahuKeymaster1 . It will run once you finish evaluation for all batches . 3,4,5,6,7 . YEs you can reconnect the assignments but again connecting the assignment will rise the issue again . Can you please share the course and batch name where the issue is appearing along with the your site url and admin creds ? NOTE : I strongly reommend to test the code on test site first. -
AuthorPosts
- The topic ‘Course Evaluation Issues’ is closed to new replies.