single-sfwd-lessons.php
5.39 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?php
/*
*
*/
global $user_ID;
get_currentuserinfo();
if (!$user_ID) {
auth_redirect();
}
?>
<?php get_header("brokerlanding");
global $post;
$cats = [];
// $cat_names = [];
error_log(print_r($post->ID, true));
$categories = wp_get_post_terms($post->ID, 'ld_lesson_category');
$quiz = $categories[0]->slug;
?>
<div id="brokercontent">
<div class="row">
<?php include_once 'broker_sidebar.php';?>
</div>
<div class="row">
<?php include_once 'broker_sidebar_tab.php';?>
</div>
<div id="page-content">
<?php
if (function_exists(clean_custom_menus())) {
clean_custom_menus();
}
?>
<?php get_template_part('loop', 'single');?>
</div>
</div>
<div class="new-footer-box">
<div class="left-image-menu"><a href="<?php echo site_url(); ?>/lets-connect-info/"></a></div>
<?php wp_nav_menu(
array(
'theme_location' => 'broker-footer',
'container' => 'nav',
'container_id' => 'broker-footer',
)
);
?>
</div>
<script>
jQuery(document).ready(function ($) {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '5%' // optional
});
var done = 0;
var count =0;
var id;
setTimeout(function(){
if($('.wpProQuiz_quiz').length){
$(".ld-button .ld-text:contains('Next Lesson')").parent().hide();
if(!done){
$('body').on('DOMSubtreeModified', '.wpProQuiz_results', function(){
setTimeout(function(){
check();
$(".wpProQuiz_results").unbind("DOMSubtreeModified");
}, 200);
});
}
}else{
if("<?php echo $quiz; ?>" != ""){
var continue_details ='<a id="quiz_continue_link" href="https://thecommonwell.ca/quizzes/<?php echo $quiz;?>">Continue to Quiz</a>';
$('.ld-content-action.ld-empty').append(continue_details);
}
}
}, 200);
function check() {
var id = setInterval(myTimer, 100);
function myTimer() {
if(!done){
if($('.wpProQuiz_sending').css('display') == 'none'){
count = count + 1;
done = 1;
clearInterval(id);
setTimeout(function(){
$('.wpProQuiz_results').hide();
$('.wpProQuiz_quiz').show();
$('.wpProQuiz_listItem').show();
$('[value="Finish Quiz"]').hide();
$("html, body").animate({ scrollTop: $(document).height()-$(window).height()});
if("<?php echo $quiz; ?>" != ""){
var continue_details ='<a id="quiz_continue_link" href="https://thecommonwell.ca/quizzes/<?php echo $quiz;?>">Continue to Quiz</a>';
$('.ld-content-action.ld-empty').append(continue_details);
}
$(".ld-button .ld-text:contains('Next Lesson')").parent().show();
}, 5);
}
}
}
}
});
var continue_details= "";
</script>
<style>
html {
margin-top : 32px !important;
}
#page-content{
max-width:unset !important;
}
.learndash_mark_complete_button{
display:none !important;
}
h1 {
font-size: 45px !important;
margin-bottom: 30px;
text-align: center;
font-weight: 400;
color:#949598;
font-family: 'HelveticaNeue-Light';
}
@media(max-width : 768px) {
h1 {
font-size: 35px !important;
}
}
h2{
font-family: "HelveticaNeue", Helvetica, Arial, sans-serif;
font-weight: bold !important;
font-size: 20px !important;
text-transform:none !important;
}
.ld-quiz-status,
.ld-lesson-status,
.learndash-wrapper .ld-course-status.ld-course-status-enrolled{
margin-bottom: 30px;
}
.article-info {
display: none;
}
#page-content article ol li:before{
display: none !important;
}
.has-medium-font-size {
font-size: 20px !important;
}
.learndash-wrapper .wpProQuiz_content .wpProQuiz_listItem .wpProQuiz_question ul.wpProQuiz_questionList{
margin-left: 0px !important;
}
.learndash-wrapper .wpProQuiz_content .wpProQuiz_question{
margin-left: 0px !important;
margin-top: -10px !important;
}
.wp-block-embed iframe{
max-width: 100%;
width: 100% !important;
height: 600px;
}
@media(max-width : 1200px) {
.wp-block-embed iframe{
max-width: 100%;
width: 100% !important;
height: 400px;
}
@media(max-width : 768px) {
.wp-block-embed iframe{
max-width: 100%;
width: 100% !important;
height: 300px;
}
}
.learndash-wrapper .ld-quiz-actions .quiz_continue_link{
display:none !important;
visibility: hidden !important;
}
.learndash-wrapper .wpProQuiz_content a#quiz_continue_link{
display:none !important;
visibility: hidden !important;
}
.learndash-wrapper .wpProQuiz_content .wpProQuiz_header{
visibility: hidden !important;
opacity: 0;
}
.wpProQuiz_quizAnker{
display:block !important;
}
</style>
<?php get_footer();?>