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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
course.php 6 years ago review.php 6 years ago submitted.php 6 years ago
review.php
106 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
11 $assignment_submitted_id = (int) sanitize_text_field(tutor_utils()->array_get('view_assignment', $_GET));
12
13 if(!$assignment_submitted_id){
14 echo _e("Sorry, but you are looking for something that isn't here." , 'tutor');
15 return;
16 }
17
18 $submitted_assignment = tutor_utils()->get_assignment_submit_info($assignment_submitted_id);
19 if ( $submitted_assignment){
20
21 $max_mark = tutor_utils()->get_assignment_option($submitted_assignment->comment_post_ID, 'total_mark');
22
23 $given_mark = get_comment_meta($assignment_submitted_id, 'assignment_mark', true);
24 $instructor_note = get_comment_meta($assignment_submitted_id, 'instructor_note', true);
25 ?>
26
27 <div class="tutor-assignment-review-header">
28 <h3>
29 <a href="<?php echo get_the_permalink($submitted_assignment->comment_post_ID); ?>" target="_blank">
30 <?php echo get_the_title($submitted_assignment->comment_post_ID); ?>
31 </a>
32 </h3>
33 <p>
34 <?php _e('Course' , 'tutor'); ?> :
35 <a href="<?php echo get_the_permalink($submitted_assignment->comment_parent); ?>" target="_blank">
36 <?php echo get_the_title($submitted_assignment->comment_parent); ?>
37 </a>
38 </p>
39 </div>
40
41 <div class="tutor-dashboard-assignment-review">
42 <h4><?php _e('Assignment Description:', 'tutor'); ?></h4>
43 <p><?php echo nl2br(stripslashes($submitted_assignment->comment_content)); ?></p>
44
45 <?php
46 $attached_files = get_comment_meta($submitted_assignment->comment_ID, 'uploaded_attachments', true);
47 if($attached_files){
48 ?>
49 <h5><?php _e('Attach assignment file(s)', 'tutor'); ?></h5>
50 <div class="tutor-dashboard-assignment-files">
51 <?php
52 $attached_files = json_decode($attached_files, true);
53 if (tutor_utils()->count($attached_files)){
54 $upload_dir = wp_get_upload_dir();
55 $upload_baseurl = trailingslashit(tutor_utils()->array_get('baseurl', $upload_dir));
56 foreach ($attached_files as $attached_file){
57 ?>
58 <div class="uploaded-files">
59 <a href="<?php echo $upload_baseurl.tutor_utils()->array_get('uploaded_path', $attached_file) ?>" target="_blank"> <i class="tutor-icon-upload-file"></i> <?php echo tutor_utils()->array_get('name', $attached_file); ?></a>
60 </div>
61 <?php
62 }
63 }
64 ?>
65 </div>
66 <?php
67 }
68 ?>
69 </div>
70
71 <div class="tutor-assignment-evaluate-wraps">
72 <h3><?php _e('Evaluation', 'tutor-pro'); ?></h3>
73 <form action="" method="post">
74 <?php wp_nonce_field( tutor()->nonce_action, tutor()->nonce ); ?>
75 <input type="hidden" value="tutor_evaluate_assignment_submission" name="tutor_action"/>
76 <input type="hidden" value="<?php echo $assignment_submitted_id; ?>" name="assignment_submitted_id"/>
77 <div class="tutor-assignment-evaluate-row">
78 <div class="tutor-option-field-label">
79 <label for=""><?php _e('Your Mark', 'tutor-pro'); ?></label>
80 </div>
81 <div class="tutor-option-field">
82 <input type="number" name="evaluate_assignment[assignment_mark]" value="<?php echo $given_mark ? $given_mark : 0; ?>">
83 <p class="desc"><?php echo sprintf(__('Mark this assignment out of %s', 'tutor-pro'), "<code>{$max_mark}</code>" ); ?></p>
84 </div>
85 </div>
86 <div class="tutor-assignment-evaluate-row">
87 <div class="tutor-option-field-label">
88 <label for=""><?php _e('Write a note', 'tutor-pro'); ?></label>
89 </div>
90 <div class="tutor-option-field">
91 <textarea name="evaluate_assignment[instructor_note]"><?php echo $instructor_note; ?></textarea>
92 <p class="desc"><?php _e('Write a note to students about this submission', 'tutor'); ?></p>
93 </div>
94 </div>
95 <div class="tutor-assignment-evaluate-row">
96 <div class="tutor-option-field-label"></div>
97 <div class="tutor-option-field">
98 <button type="submit" class="tutor-button tutor-button-primary tutor-success"><?php _e('Evaluate this submission', 'tutor-pro'); ?></button>
99 </div>
100 </div>
101 </form>
102 </div>
103
104 <?php }else{
105 _e('Assignments submission not found or not completed', 'tutor');
106 } ?>