|
76 | 76 |
|
77 | 77 | $incVat = $eduapi->GetAccountSetting( $edutoken, 'PriceIncVat' ) == "yes"; |
78 | 78 | $showHeaders = get_option( 'eduadmin-showDetailHeaders', true ); |
| 79 | + |
| 80 | + $hideSections = array(); |
| 81 | + if ( isset( $attributes['hide'] ) ) { |
| 82 | + $hideSections = explode( ',', $attributes['hide'] ); |
| 83 | + } |
| 84 | + |
79 | 85 | ?> |
80 | 86 | <div class="eduadmin"> |
81 | 87 | <a href="../" class="backLink"><?php edu_e( "« Go back" ); ?></a> |
|
85 | 91 | </div> |
86 | 92 | <hr/> |
87 | 93 | <div class="textblock leftBlock"> |
88 | | - <?php if ( ! empty( $selectedCourse->CourseDescription ) ) { ?> |
| 94 | + <?php if ( ! in_array( 'description' ) && ! empty( $selectedCourse->CourseDescription ) ) { ?> |
89 | 95 | <?php if ( $showHeaders ) { ?> |
90 | 96 | <h3><?php edu_e( "Course description" ); ?></h3> |
91 | 97 | <?php } ?> |
|
95 | 101 | ?> |
96 | 102 | </div> |
97 | 103 | <?php } ?> |
98 | | - <?php if ( ! empty( $selectedCourse->CourseGoal ) ) { ?> |
| 104 | + <?php if ( ! in_array( 'goal' ) && ! empty( $selectedCourse->CourseGoal ) ) { ?> |
99 | 105 | <?php if ( $showHeaders ) { ?> |
100 | 106 | <h3><?php edu_e( "Course goal" ); ?></h3> |
101 | 107 | <?php } ?> |
|
105 | 111 | ?> |
106 | 112 | </div> |
107 | 113 | <?php } ?> |
108 | | - <?php if ( ! empty( $selectedCourse->TargetGroup ) ) { ?> |
| 114 | + <?php if ( ! in_array( 'target' ) && ! empty( $selectedCourse->TargetGroup ) ) { ?> |
109 | 115 | <?php if ( $showHeaders ) { ?> |
110 | 116 | <h3><?php edu_e( "Target group" ); ?></h3> |
111 | 117 | <?php } ?> |
|
115 | 121 | ?> |
116 | 122 | </div> |
117 | 123 | <?php } ?> |
118 | | - <?php if ( ! empty( $selectedCourse->Prerequisites ) ) { ?> |
| 124 | + <?php if ( ! in_array( 'prerequisites' ) && ! empty( $selectedCourse->Prerequisites ) ) { ?> |
119 | 125 | <?php if ( $showHeaders ) { ?> |
120 | 126 | <h3><?php edu_e( "Prerequisites" ); ?></h3> |
121 | 127 | <?php } ?> |
|
127 | 133 | </div> |
128 | 134 | <div class="textblock rightBlock"> |
129 | 135 | <?php } ?> |
130 | | - <?php if ( ! empty( $selectedCourse->CourseAfter ) ) { ?> |
| 136 | + <?php if ( ! in_array( 'after' ) && ! empty( $selectedCourse->CourseAfter ) ) { ?> |
131 | 137 | <?php if ( $showHeaders ) { ?> |
132 | 138 | <h3><?php edu_e( "After the course" ); ?></h3> |
133 | 139 | <?php } ?> |
|
137 | 143 | ?> |
138 | 144 | </div> |
139 | 145 | <?php } ?> |
140 | | - <?php if ( ! empty( $selectedCourse->Quote ) ) { ?> |
| 146 | + <?php if ( ! in_array( 'quote' ) && ! empty( $selectedCourse->Quote ) ) { ?> |
141 | 147 | <?php if ( $showHeaders ) { ?> |
142 | 148 | <h3><?php edu_e( "Quotes" ); ?></h3> |
143 | 149 | <?php } ?> |
|
0 commit comments