Assignment error

Home Forums Legacy Support Support queries Other issues Assignment error

Viewing 15 posts - 16 through 30 (of 54 total)
  • Author
    Posts
  • #226542
    Anshuman Sahu
    Keymaster
    Hi 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;;   } }
    #226548
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #226768
    logan
    Member
    Hello, 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/p88t0e
    #226793
    ratlsadmin
    Spectator
    Hi 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.
    #227014
    Anshuman Sahu
    Keymaster
    Well 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-226542  
    #227137
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #227349
    Mk
    Moderator
    I 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.  
    #227422
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #227541
    Mk
    Moderator
    Sorry 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.
    #227790
    ratlsadmin
    Spectator
    Hi 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?
    #227975
    Mk
    Moderator
    ok checking ..
    #227982
    ratlsadmin
    Spectator
    Hi Mk, Can you also check the WPLMS Points criteria bug as it isn't giving points to the mentioned unit ids.
    #228006
    Mk
    Moderator
    This reply has been marked as private.
    #228015
    ratlsadmin
    Spectator
    This reply has been marked as private.
    #228083
    Anshuman Sahu
    Keymaster
    Please make sure that the course is selected in the assignment settings : http://prntscr.com/pc24pk
Viewing 15 posts - 16 through 30 (of 54 total)
  • The topic ‘Assignment error’ is closed to new replies.