Assignment Submission and Unit Locking

Home Forums Legacy Support Support queries How-to & Troubleshooting Assignment Submission and Unit Locking

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #238893
    info2grow
    Spectator
    This reply has been marked as private.
    #238926
    logan
    Member
    Hello, please try to attach the assignment as a unit in wplms. refer: https://wplms.io/support/knowledge-base/in-course-assignments/ then refer this setting in course setting:  Previous Units/Quiz must be Complete before next unit/quiz access: As the name suggests if you enable this setting then the student will have to first complete the previous unit/quiz to move to the next unit/quiz. it will get you what you want.
    #239012
    info2grow
    Spectator
    This is great but how can we let student progress after they have uploaded an assignment? Our instructors don't have time to grade them immediately but they want to make sure students upload something before proceeding in the course. Also the alert when trying to submit without an attachement should either be "Please upload an attachment" or "please upload some attachments" Or since it isn't an email maybe "Please upload a file" Also it would be great if we could add them from the backend (admin/edit course) as well. Thanks!  
    #239047
    logan
    Member
    Hello, in the assignment, it is not possible to evaluate the assignment automatically. if it is not evaluated then the user wont be able to access the next unit. Note: if the assignment is not connected to a course then it will not take a part in the course. but the user has to complete the assignment as the unit only then they can move on to next unit (if the mark previous unit complete is enable.)
    #241382
    info2grow
    Spectator
    Still haven't been able to get this to work.  We would like to use assignment blocking until the user has submitted an assignment.
    #241418
    logan
    Member
    what is your requirement please explain.
    #241473
    info2grow
    Spectator
    We would like to have progress locked on an upload assignment until the assignment has uploaded.  The normal procedure is that progress in only unlocked when the assignment has been graded and passed. We have added custom code for now but I was informed in the past that this functionality was achievable through WPLMS settings, see earlier in this thread.   "
    #241547
    logan
    Member

    disable assignment locking from wp-admin -> wplms -> course manager and add this code in your wplms-customizer.php file in wplms customizer plugin :

    add_filter('wplms_unit_mark_complete','wplms_assignments_force_unit_complete2',1,3);  

    function wplms_assignments_force_unit_complete2($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);

            if(isset($assignment_complete)){

              $flag=0;

            }else{

              $flag=1;

            }

          }//end-if  

        }//end-for

          

      if($flag)

          return '<a>'.__('FINISH ASSIGNMENT TO MARK UNIT COMPLETE','vibe').'</a>';

      return $mark_unit_html;

    this is just a code it wont make any setting anywhere, it will just show a message to the user, FINISH ASSIGNMENT TO MARK UNIT COMPLETE. if they try to mark the unit complete before submitting the assignment.
Viewing 8 posts - 16 through 23 (of 23 total)
  • The topic ‘Assignment Submission and Unit Locking’ is closed to new replies.