Assignment Submission and Unit Locking

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

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #180161
    info2grow
    Spectator
    Hi there, a couple of things regarding assignments.  We would like to keep unit locking on but change the accepted status for the student to progress from evaluated to submitted.  It was mentioned 2 years ago that this was coming in the next update.  Am I just missing a setting somewhere? https://wplms.io/support/forums/topic/submit-assignment-must-allow-a-student-to-proceed-to-next-unit/ Also for an upload assignment can we block submission until a something has been uploaded? Thanks! Lawrence
    #180271
    Diana
    Participant
    @info2grow Make sure you have the latest version of the theme and plugins. When you edit the assignment. Make sure the assignment settings are like this Refer: http://prntscr.com/l6pokg So whenever a student tries to submit an assignment without uploading anything. It will throw an error to upload something. The submission of assignment will not occur until user upload something  
    #182787
    info2grow
    Spectator
    Hi Diana, I can confirm that my settings match and I can still submit an assignment without uploading anything.  This is on our test site which only has WPLMS related plugins, no customization and everything is up to date. Also how can we would like to keep unit locking on but change the accepted status for the student to progress for assignments from evaluated to submitted.   Thanks
    #182913
    Diana
    Participant
    @info2grow Yes, we found a bug and it will be fixed in the next update but I can fix the bug on your site if you'll share the admin credentials in a private reply here
    #182946
    info2grow
    Spectator
    I will post credentials shortly but also happy to update a file if you let me know the change. Will the updated code also us to keep unit locking on but change the accepted status for the student to progress past assignments from evaluated to submitted?
    #182973
    info2grow
    Spectator
    This reply has been marked as private.
    #183112
    Diana
    Participant
    This reply has been marked as private.
    #194570
    info2grow
    Spectator
    Okay that worked although the error message is on a blank page with no prompt as to what to do next.  Would be nice if it showed near the submit button without taking the user away from the page.  Failing that would be nice to at least add to the message "User your browser's back button to try again." Still left with the challenge that we want to allow users to proceed once they have submitted an assignment.  Currently the assignment has to be graded first. Is this possible?
    #194577
    info2grow
    Spectator
    Here's ho I made it happen... wp-content/themes/wplms/includes/func.php  
    // Line 474 - Allow progress on assignment submission
        if(isset($unit_assignments) && is_array($unit_assignments) &&is_numeric($unit_assignments[0])){
          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) && is_numeric($assignment_complete)) ){
                $flag=0;
              }else{
                $flag=1;      
              }
            }//end-if
          }//end-for
        }
      }
    
    #194578
    info2grow
    Spectator
    That's updated code so it need to replace the similar code already there.
    #194679
    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;
    #194719
    info2grow
    Spectator
    Will try that thanks!  Also is it possible to exclude submitted assignments from course marks if they have not been marked yet? We had to set the assignment grade to 0 so unmarked assignments didn't factor into the course marks when doing the above.
    #194864
    logan
    Member
    Well there is a setting available for this in course : http://prntscr.com/mfa606
    #194877
    info2grow
    Spectator
    Yes but if I turn this off then we can't use the unit locking to block course progression until the student submits an assignment.  Is that right?
    #195146
    logan
    Member
    Well both of these things are not connected to each other .The code will work as it should regardless of this setting . This setting (http://prntscr.com/mfa606) will only come in picture when course is being evaluated
Viewing 15 posts - 1 through 15 (of 23 total)
  • The topic ‘Assignment Submission and Unit Locking’ is closed to new replies.