Course Activity No Results for Quiz or Assignment

Home Forums Legacy Support Support queries How-to & Troubleshooting Course Activity No Results for Quiz or Assignment

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #45156
    info2grow
    Spectator
    Found the activity records for assignments, they are being stored with the assignment ID as item_id and the user ID as secondary_item_id. The assignments are linked to the course properly. Here's the code from bp_course_activity.php function evaluate_assignment($assignment_id,$marks,$user_id,$max,$message_id){ $activity_id=bp_course_record_activity(array( 'action' => sprintf(__('Results available for assignment %s','vibe'),get_the_title($assignment_id)), 'content' => sprintf(__('Student %s got marks %s out of %s in assignment %s ','vibe'),bp_core_get_userlink( $user_id ),$marks,$max,get_the_title($assignment_id)), 'type' => 'evaluate_assignment', 'primary_link' => get_permalink($assignment_id), 'item_id' => $assignment_id, 'secondary_item_id' => $user_id ));
    #45161
    info2grow
    Spectator
    Code should read as follows // Assignments function start_assignment($assignment_id,$user_id){ $id = get_post_meta($assignment_id,'vibe_assignment_course',true); $activity_id=bp_course_record_activity(array( 'action' => sprintf(__('Student started assignment %s','vibe'),get_the_title($assignment_id)), 'content' => sprintf(__('Student %s started the assignment %s','vibe'),bp_core_get_userlink($user_id),get_the_title($assignment_id)), 'type' => 'assignment_started', 'primary_link' => get_permalink($assignment_id), 'item_id' => empty($id)?$assignment_id:$id, 'secondary_item_id' => $assignment_id )); $instructor_id = get_post_field('post_author',$assignment_id); bp_course_record_activity_meta(array( 'id' => $activity_id, 'meta_key' => 'instructor', 'meta_value' => $instructor_id )); do_action('badgeos_wplms_start_assignment',$assignment_id); } function submit_assignment($assignment_id,$user_id){ $id = get_post_meta($assignment_id,'vibe_assignment_course',true); $instructor_id=get_post_field('post_author', $assignment_id); $activity_id=bp_course_record_activity(array( 'action' => __('Student submitted assignment ','vibe'), 'content' => sprintf(__('Student %s submitted the assignment %s','vibe'),bp_core_get_userlink($user_id),get_the_title($assignment_id)), 'type' => 'assignment_submitted', 'primary_link' => get_permalink($assignment_id), 'item_id' => empty($id)?$assignment_id:$id, 'secondary_item_id' => $assignment_id )); bp_course_record_activity_meta(array( 'id' => $activity_id, 'meta_key' => 'instructor', 'meta_value' => $instructor_id )); do_action('badgeos_wplms_submit_assignment',$assignment_id); }   function evaluate_assignment($assignment_id,$marks,$user_id,$max,$message_id){ $id = get_post_meta($assignment_id,'vibe_assignment_course',true); $activity_id=bp_course_record_activity(array( 'action' => sprintf(__('Results available for assignment %s','vibe'),get_the_title($assignment_id)), 'content' => sprintf(__('Student %s got marks %s out of %s in assignment %s ','vibe'),bp_core_get_userlink( $user_id ),$marks,$max,get_the_title($assignment_id)), 'type' => 'evaluate_assignment', 'primary_link' => get_permalink($assignment_id), 'item_id' => empty($id)?$assignment_id:$id, 'secondary_item_id' => $assignment_id )); bp_course_record_activity_meta(array( 'id' => $activity_id, 'meta_key' => 'remarks', 'meta_value' => $message_id ));   do_action('badgeos_wplms_evaluate_assignment',$comment->comment_post_ID,$value, $comment->user_id); }   function reset_assignment($assignment_id,$user_id){ $id = get_post_meta($assignment_id,'vibe_assignment_course',true); bp_course_record_activity(array( 'action' => __('Instructor Reseted the Assignment for User','vibe'), 'content' => sprintf(__('Assignment %s was reset by the Instructor for user %s','vibe'),get_the_title($assignment_id),bp_core_get_userlink( $user_id )), 'type' => 'reset_assignment', 'primary_link' => get_permalink($assignment_id), 'item_id' => empty($id)?$assignment_id:$id, 'secondary_item_id' => $assignment_id )); }
    #45162
    info2grow
    Spectator
    also in wplms/includes/init.php the wrong activity types are being referenced line:534 'start_assignment' => __( 'Start Assignment', 'vibe' ), 'submit_assignment' => __( 'Submit Assignment', 'vibe' ), 'assignment_evaluated' => __( 'Assignment Evaluated', 'vibe' ), To match entries already in the DB it should be 'assignment_started' => __( 'Start Assignment', 'vibe' ), 'assignment_submitted' => __( 'Submit Assignment', 'vibe' ), 'evaluate_assignment' => __( 'Assignment Evaluated', 'vibe' ),
    #45357
    Anshuman Sahu
    Keymaster
    Yep you point seems to be valid we are sending the assignment id in in the activity . Adding to issue log.It will be fixed in the next update of wplms assignments and vibe course module  plugin update .
    #54382
    H.K. Latiyan
    Participant
    This issue has been resolved in the latest update of wplms 2.1, so please update the wplms theme and all its plugins to latest version i.e. 2.1 and then check.
Viewing 5 posts - 16 through 20 (of 20 total)
  • The topic ‘Course Activity No Results for Quiz or Assignment’ is closed to new replies.