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.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.3 3.6.4 3.7.0 3.7.1 3.7.2 3.7.3 3.7.4 3.8.0 3.8.1 3.8.2 3.8.3 3.9.0 3.9.1 3.9.10 3.9.2 3.9.3 3.9.4 3.9.5 3.9.6 3.9.7 3.9.8 3.9.9
tutor / templates / dashboard / assignments / review.php
tutor / templates / dashboard / assignments Last commit date
review.php 4 years ago submitted.php 4 years ago
review.php
157 lines
1 <?php
2 /**
3 * Template for displaying Assignments Review Form
4 *
5 * @since v.1.3.4
6 *
7 * @author Themeum
8 * @url https://themeum.com
9 *
10 * @package TutorLMS/Templates
11 * @version 1.4.3
12 */
13
14 $assignment_id = (int) tutor_utils()->array_get( 'assignment', $_GET );
15 $assignment_submitted_id = (int) tutor_utils()->array_get( 'view_assignment', $_GET );
16 $submitted_url = tutor_utils()->get_tutor_dashboard_page_permalink( 'assignments/submitted' );
17
18 if ( ! $assignment_submitted_id ) {
19 esc_html_e( "Sorry, but you are looking for something that isn't here.", 'tutor' );
20 return;
21 }
22 ?>
23
24 <div class="tutor-dashboard-content-inner tutor-dashboard-assignment-review">
25 <?php
26 $submitted_assignment = tutor_utils()->get_assignment_submit_info( $assignment_submitted_id );
27 if ( $submitted_assignment ) {
28
29 $max_mark = tutor_utils()->get_assignment_option( $submitted_assignment->comment_post_ID, 'total_mark' );
30
31 $given_mark = get_comment_meta( $assignment_submitted_id, 'assignment_mark', true );
32 $instructor_note = get_comment_meta( $assignment_submitted_id, 'instructor_note', true );
33 $comment_author = get_user_by( 'login', $submitted_assignment->comment_author )
34 ?>
35
36 <div class="submitted-assignment-title tutor-mb-16">
37 <a class="tutor-back-btn tutor-color-design-dark" href="<?php echo esc_url( $submitted_url . '?assignment=' . $assignment_id ); ?>">
38 <!-- <span class="assignment-back-icon">&leftarrow;</span><?php esc_html_e( 'Back', 'tutor' ); ?> -->
39 <span class="color-text-primary assignment-back-icon tutor-icon-previous-line tutor-icon-30 tutor-mr-12"></span>
40 <span class="tutor-color-black-60"><?php esc_html_e( 'Back', 'tutor' ); ?></span>
41 </a>
42 <!-- <a class="tutor-back-btn tutor-color-design-dark" href="<?php echo esc_url( tutor_utils()->get_tutor_dashboard_page_permalink( 'assignments' ) ); ?>"></a> -->
43 </div>
44
45 <div class="tutor-assignment-review-header">
46 <table class="tutor-ui-table-no-border tutor-is-lefty tutor-is-flexible">
47 <tbody>
48 <tr>
49 <td class="color-text-subsued"><?php esc_html_e( 'Course', 'tutor' ); ?></td>
50 <td>:
51 <a href="<?php echo esc_url( get_the_permalink( $submitted_assignment->comment_parent ) ); ?>" target="_blank">
52 <?php esc_html_e( get_the_title( $submitted_assignment->comment_parent ) ); ?>
53 </a>
54 </td>
55 </tr>
56 <tr>
57 <td class="color-text-subsued"><?php esc_html_e( 'Student', 'tutor' ); ?></td>
58 <td>:
59 <span>
60 <?php echo esc_html( $comment_author->display_name . ' (' . $comment_author->user_email . ')' ); ?>
61 </span>
62 </td>
63 </tr>
64 <tr>
65 <td class="color-text-subsued"><?php esc_html_e( 'Submitted Date', 'tutor' ); ?></td>
66 <td>:
67 <span>
68 <?php echo esc_attr( date( 'j M, Y, h:i a', strtotime( $submitted_assignment->comment_date ) ) ); ?>
69 </span>
70 </td>
71 </tr>
72 </tbody>
73 </table>
74 </div>
75 <hr>
76
77 <div class="tutor-dashboard-assignment-submitted-content tutor-mt-32 tutor-mb-16">
78 <h5 class="text-medium-h6 tutor-mb-5">
79 <?php esc_html_e( 'Assignment Description:', 'tutor' ); ?>
80 </h5>
81 <p class="text-regular-body color-text-subsued tutor-mb-5">
82 <?php echo nl2br( stripslashes( $submitted_assignment->comment_content ) ); ?>
83 </p>
84 <?php
85 $attached_files = get_comment_meta( $submitted_assignment->comment_ID, 'uploaded_attachments', true );
86 if ( $attached_files && is_array( json_decode( $attached_files ) ) ) :
87 ?>
88 <h5 class="text-medium-h6 tutor-mb-12 tutor-mt-20"><?php _e( 'Attach assignment file(s)', 'tutor' ); ?></h5>
89 <div class="tutor-attachment-cards">
90 <?php
91 if ( $attached_files ) {
92 $attached_files = json_decode( $attached_files, true );
93 if ( tutor_utils()->count( $attached_files ) ) {
94 $upload_dir = wp_get_upload_dir();
95 $upload_baseurl = trailingslashit( tutor_utils()->array_get( 'baseurl', $upload_dir ) );
96 foreach ( $attached_files as $attached_file ) {
97 ?>
98 <div>
99 <div>
100 <a href="<?php echo esc_url( $upload_baseurl . tutor_utils()->array_get( 'uploaded_path', $attached_file ) ); ?>" target="_blank">
101 <?php echo esc_html( tutor_utils()->array_get( 'name', $attached_file ) ); ?>
102 </a>
103 <span class="filesize"><?php esc_html_e( 'Size', 'tutor' ); ?><?php esc_html_e( ': 2MB', 'tutor' ); ?></span>
104 </div>
105 <div>
106 <a href="<?php echo esc_url( $upload_baseurl . tutor_utils()->array_get( 'uploaded_path', $attached_file ) ); ?>" class="tutor-mt-4" target="_blank">
107 <span class="tutor-icon-download-line"></span>
108 </a>
109 </div>
110 </div>
111 <?php
112 }
113 }
114 }
115 ?>
116 </div>
117 <?php endif; ?>
118 </div>
119
120 <div class="tutor-dashboard-assignment-review-area tutor-mt-32">
121 <h3><?php esc_html_e( 'Evaluation', 'tutor' ); ?></h3>
122 <form action="" method="post" class="tutor-row tutor-form-submit-through-ajax" data-toast_success_message="<?php _e( 'Assignment evaluated', 'tutor' ); ?>">
123 <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
124 <input type="hidden" value="tutor_evaluate_assignment_submission" name="tutor_action"/>
125 <input type="hidden" value="<?php echo esc_html( $assignment_submitted_id ); ?>" name="assignment_submitted_id"/>
126
127 <div class="tutor-col-12 tutor-col-sm-4 tutor-col-md-12 tutor-col-lg-3">
128 <label for=""><?php esc_html_e( 'Your Points', 'tutor' ); ?></label>
129 </div>
130 <div class="tutor-col-12 tutor-col-sm-8 tutor-col-md-12 tutor-col-lg-9 tutor-mb-32">
131 <input class="tutor-form-control" type="number" name="evaluate_assignment[assignment_mark]" value="<?php echo $given_mark ? $given_mark : 0; ?>" min="0">
132 <p class="desc"><?php echo sprintf( __( 'Evaluate this assignment out of %s', 'tutor' ), "<code>{$max_mark}</code>" ); ?></p>
133 </div>
134
135 <div class="tutor-col-12 tutor-col-sm-4 tutor-col-md-12 tutor-col-lg-3">
136 <label for=""><?php esc_html_e( 'Feedback', 'tutor' ); ?></label>
137 </div>
138 <div class="tutor-col-12 tutor-col-sm-8 tutor-col-md-12 tutor-col-lg-9 tutor-mb-20">
139 <textarea class="tutor-form-control" name="evaluate_assignment[instructor_note]"><?php esc_html_e( $instructor_note ); ?></textarea>
140 </div>
141
142 <div class="tutor-col-12 tutor-col-sm-4 tutor-col-md-12 tutor-col-lg-3"></div>
143 <div class="tutor-col-12 tutor-col-sm-8 tutor-col-md-12 tutor-col-lg-9">
144 <button type="submit" class="tutor-btn tutor-mt-16">
145 <?php esc_html_e( 'Evaluate this submission', 'tutor' ); ?>
146 </button>
147 </div>
148 </form>
149 </div>
150
151 <?php
152 } else {
153 esc_html_e( 'Assignments submission not found or not completed', 'tutor' );
154 }
155 ?>
156 </div>
157