-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubmit_course.php
68 lines (53 loc) · 1.97 KB
/
submit_course.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/*
Template Name: Submit Course
*/
get_header(); ?>
<div class="wrap">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<h1>Submit Course</h1>
<?php while (have_posts()) : the_post(); ?>
<div class="submit-course-form">
<?php
the_content();
if (is_user_logged_in()) {
?>
<p>Use this form to submit your course. If you attach a syllabus for your course, you will be given access to view the syllabi submitted by other instructors from their course.</p>
<br>
<p>All syllabi and course content is the intellectual property of the instructor, and all rights and privileges are retained by the instructor. By submitting course information and syllabi, you are giving permission to publish this information on the CDASH website.</p>
<br>
<hr>
<?php
$course = pods('course');
$fields = array(
'post_title',
'course_description',
'art_discipline',
'science_discipline',
'institution',
'institution_city',
'institution_stateprovince',
'country',
'online',
'syllabus',
'level',
'course_code',
'course_size',
'course_website',
'departmentscenters'
);
echo $course->form($fields, 'Submit Course', get_site_url() . '/pod-submit?new_id=X_ID_X');
} else {
?>
<p>Please <a class="inline-link" href="<?php echo get_site_url() ?>/wp-login.php?redirect_to=https%3A%2F%2Fcdash.atec.io%2Fsubmit-course%2F">login</a> or <a class="inline-link" href="<?php echo get_site_url() ?>/register">register</a> to submit a course.</p>
<?php
}
?>
</div>
<?php endwhile; wp_reset_query(); ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_sidebar(); ?>
</div><!-- .wrap -->
<?php get_footer();