/wp-content/plugins/quiz-maker/admin/partials/quizes/actions/partials/quiz-maker-quizes-actions-tab5.php

https://github.com/livinglab/openlab · PHP · 480 lines · 480 code · 0 blank · 0 comment · 52 complexity · 46cd6ea03d24e5096c6ee1d9404b8d85 MD5 · raw file

  1. <div id="tab5" class="ays-quiz-tab-content <?php echo ($ays_quiz_tab == 'tab5') ? 'ays-quiz-tab-content-active' : ''; ?>">
  2. <p class="ays-subtitle"><?php echo __('Limitation of Users',$this->plugin_name)?></p>
  3. <hr/>
  4. <div class="form-group row ays_toggle_parent">
  5. <div class="col-sm-3">
  6. <label for="ays_limit_users">
  7. <?php echo __('Maximum number of attempts per user',$this->plugin_name)?>
  8. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('After enabling this option, you can manage the counts of the attempts per user for passing the quiz.',$this->plugin_name)?>">
  9. <i class="ays_fa ays_fa_info_circle"></i>
  10. </a>
  11. </label>
  12. </div>
  13. <div class="col-sm-1">
  14. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_limit_users" name="ays_limit_users"
  15. value="on" <?php echo (isset($options['limit_users']) && $options['limit_users'] == 'on') ? 'checked' : ''; ?>/>
  16. </div>
  17. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo (isset($options['limit_users']) && $options['limit_users'] == "on") ? "" : "display_none" ?>">
  18. <div class="ays-limitation-options">
  19. <!-- Limitation by -->
  20. <div class="form-group row">
  21. <div class="col-sm-3">
  22. <label for="ays_limitation_message">
  23. <?php echo __('Detects users by',$this->plugin_name)?>
  24. <a class="ays_help" data-toggle="tooltip" data-html="true" title="<?php echo __('Choose the method of detection of the user.',$this->plugin_name)?><br><?php echo __('If you choose \'User ID\', the \'Limit users\' option will not work for the not logged in users. It works only with \'Only for logged in users\' option.',$this->plugin_name)?>">
  25. <i class="ays_fa ays_fa_info_circle"></i>
  26. </a>
  27. </label>
  28. </div>
  29. <div class="col-sm-9">
  30. <div class="form-check form-check-inline checkbox_ays">
  31. <input type="radio" id="ays_limit_users_by_ip" class="form-check-input" name="ays_limit_users_by" value="ip" <?php echo ($limit_users_by == 'ip') ? 'checked' : ''; ?>/>
  32. <label class="form-check-label" for="ays_limit_users_by_ip"><?php echo __('IP',$this->plugin_name)?></label>
  33. </div>
  34. <div class="form-check form-check-inline checkbox_ays">
  35. <input type="radio" id="ays_limit_users_by_user_id" class="form-check-input" name="ays_limit_users_by" value="user_id" <?php echo ($limit_users_by == 'user_id') ? 'checked' : ''; ?>/>
  36. <label class="form-check-label" for="ays_limit_users_by_user_id"><?php echo __('User ID',$this->plugin_name)?></label>
  37. </div>
  38. <div class="form-check form-check-inline checkbox_ays">
  39. <input type="radio" id="ays_limit_users_by_cookie" class="form-check-input" name="ays_limit_users_by" value="cookie" <?php echo ($limit_users_by == 'cookie') ? 'checked' : ''; ?>/>
  40. <label class="form-check-label" for="ays_limit_users_by_cookie"><?php echo __('Cookie',$this->plugin_name)?></label>
  41. </div>
  42. <div class="form-check form-check-inline checkbox_ays">
  43. <input type="radio" id="ays_limit_users_by_ip_cookie" class="form-check-input" name="ays_limit_users_by" value="ip_cookie" <?php echo ($limit_users_by == 'ip_cookie') ? 'checked' : ''; ?>/>
  44. <label class="form-check-label" for="ays_limit_users_by_ip_cookie"><?php echo __('IP and Cookie',$this->plugin_name)?></label>
  45. </div>
  46. </div>
  47. </div>
  48. <hr/>
  49. <!-- Limitation count -->
  50. <div class="form-group row">
  51. <div class="col-sm-3">
  52. <label for="ays_quiz_max_pass_count">
  53. <?php echo __('Attempts count:',$this->plugin_name)?>
  54. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Specify the count of the attempts per user for passing the quiz.',$this->plugin_name)?>">
  55. <i class="ays_fa ays_fa_info_circle"></i>
  56. </a>
  57. </label>
  58. </div>
  59. <div class="col-sm-9">
  60. <input type="number" class="ays-text-input" id="ays_quiz_max_pass_count" name="ays_quiz_max_pass_count" value="<?php echo $quiz_max_pass_count; ?>"/>
  61. </div>
  62. </div>
  63. <hr/>
  64. <!-- Limitation pass score -->
  65. <div class="form-group row">
  66. <div class="col-sm-3">
  67. <label for="ays_quiz_pass_score">
  68. <?php echo __('Pass score for attempt restriction',$this->plugin_name)?> (%)
  69. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Select the passing score(in percentage), and the attempt of the user will be detected only under that given condition. For example: If we give 40% value to it and assign 5 to the Attempts count option, the user can pass the quiz with getting more than 40% score in 5 times, but will have a chance to pass the quiz with getting under the 40% score as to how much as he/she wants.',$this->plugin_name)?>">
  70. <i class="ays_fa ays_fa_info_circle"></i>
  71. </a>
  72. </label>
  73. </div>
  74. <div class="col-sm-9">
  75. <input type="number" class="ays-text-input" id="ays_quiz_pass_score" name="ays_quiz_pass_score" value="<?php echo $quiz_pass_score; ?>"/>
  76. </div>
  77. </div>
  78. <hr/>
  79. <!-- Limitation message -->
  80. <div class="form-group row">
  81. <div class="col-sm-3">
  82. <label for="ays_limitation_message">
  83. <?php echo __('Message',$this->plugin_name)?>
  84. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Write the message for those who have already passed the quiz under the given conditions.',$this->plugin_name)?>">
  85. <i class="ays_fa ays_fa_info_circle"></i>
  86. </a>
  87. </label>
  88. </div>
  89. <div class="col-sm-9">
  90. <?php
  91. $content = wpautop(stripslashes((isset($options['limitation_message'])) ? $options['limitation_message'] : ''));
  92. $editor_id = 'ays_limitation_message';
  93. $settings = array('editor_height' => $quiz_wp_editor_height, 'textarea_name' => 'ays_limitation_message', 'editor_class' => 'ays-textarea', 'media_elements' => false);
  94. wp_editor($content, $editor_id, $settings);
  95. ?>
  96. </div>
  97. </div>
  98. <hr/>
  99. <!-- Limitation redirect url -->
  100. <div class="form-group row">
  101. <div class="col-sm-3">
  102. <label for="ays_redirect_url">
  103. <?php echo __('Redirect URL',$this->plugin_name)?>
  104. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Leave a current page to go to the link provided',$this->plugin_name)?>">
  105. <i class="ays_fa ays_fa_info_circle"></i>
  106. </a>
  107. </label>
  108. </div>
  109. <div class="col-sm-9">
  110. <input type="text" name="ays_redirect_url" id="ays_redirect_url"
  111. class="ays-text-input"
  112. value="<?php echo isset($options['redirect_url']) ? $options['redirect_url'] : ''; ?>"/>
  113. </div>
  114. </div>
  115. <hr/>
  116. <!-- Limitation redirect delay -->
  117. <div class="form-group row">
  118. <div class="col-sm-3">
  119. <label for="ays_redirection_delay">
  120. <?php echo __('Redirect delay',$this->plugin_name)?>(s)
  121. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Leave current page and go to the link provided after X second',$this->plugin_name)?>">
  122. <i class="ays_fa ays_fa_info_circle"></i>
  123. </a>
  124. </label>
  125. </div>
  126. <div class="col-sm-9">
  127. <input type="number" name="ays_redirection_delay" id="ays_redirection_delay"
  128. class="ays-text-input"
  129. value="<?php echo isset($options['redirection_delay']) ? $options['redirection_delay'] : 0; ?>"/>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div> <!-- Limit Users to pass quiz only once -->
  135. <hr/>
  136. <div class="form-group row ays_toggle_parent">
  137. <div class="col-sm-3">
  138. <label for="ays_enable_logged_users">
  139. <?php echo __('Only for logged in users',$this->plugin_name)?>
  140. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('After enabling this option, only logged in users will be able to pass the quiz.',$this->plugin_name)?>">
  141. <i class="ays_fa ays_fa_info_circle"></i>
  142. </a>
  143. </label>
  144. </div>
  145. <div class="col-sm-1">
  146. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_enable_logged_users"
  147. name="ays_enable_logged_users" <?php echo (isset($options['enable_restriction_pass']) && $options['enable_restriction_pass'] == 'on') || (isset($options['enable_restriction_pass_users']) && $options['enable_restriction_pass_users'] == 'on') ? 'disabled' : ''; ?>
  148. value="on" <?php echo (((isset($options['enable_logged_users']) && $options['enable_logged_users'] == 'on')) || (isset($options['enable_restriction_pass']) && $options['enable_restriction_pass'] == 'on') || (isset($options['enable_restriction_pass_users']) && $options['enable_restriction_pass_users'] == 'on')) ? 'checked' : ''; ?>/>
  149. </div>
  150. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo ((isset($options['enable_logged_users']) && $options['enable_logged_users'] == 'on')) ? '' : 'display_none' ?>"
  151. id="ays_logged_in_users_div" >
  152. <div class="form-group row">
  153. <div class="col-sm-2">
  154. <label for="ays_logged_in_message">
  155. <?php echo __('Message',$this->plugin_name)?>
  156. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Message for those who haven’t logged in',$this->plugin_name)?>">
  157. <i class="ays_fa ays_fa_info_circle"></i>
  158. </a>
  159. </label>
  160. </div>
  161. <div class="col-sm-10">
  162. <?php
  163. $content = wpautop(stripslashes((isset($options['enable_logged_users_message'])) ? $options['enable_logged_users_message'] : ''));
  164. $editor_id = 'ays_logged_in_message';
  165. $settings = array('editor_height' => $quiz_wp_editor_height, 'textarea_name' => 'ays_enable_logged_users_message', 'editor_class' => 'ays-textarea', 'media_elements' => false);
  166. wp_editor($content, $editor_id, $settings);
  167. ?>
  168. </div>
  169. </div>
  170. <hr/>
  171. <div class="form-group row">
  172. <div class="col-sm-3">
  173. <label for="ays_show_login_form">
  174. <?php echo __('Show Login form',$this->plugin_name)?>
  175. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Show the Login form at the bottom of the message for not logged in users.',$this->plugin_name)?>">
  176. <i class="ays_fa ays_fa_info_circle"></i>
  177. </a>
  178. </label>
  179. </div>
  180. <div class="col-sm-9">
  181. <input type="checkbox" class="ays-enable-timer1" id="ays_show_login_form" name="ays_show_login_form" value="on" <?php echo $show_login_form ? 'checked' : ''; ?>/>
  182. </div>
  183. </div>
  184. </div>
  185. </div> <!-- Only for logged in users -->
  186. <hr/>
  187. <div class="form-group row ays_toggle_parent">
  188. <div class="col-sm-3">
  189. <label for="ays_enable_restriction_pass">
  190. <?php echo __('Only for selected user role',$this->plugin_name)?>
  191. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Quiz is available only for the roles mentioned in the list.',$this->plugin_name)?>">
  192. <i class="ays_fa ays_fa_info_circle"></i>
  193. </a>
  194. </label>
  195. </div>
  196. <div class="col-sm-1">
  197. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_enable_restriction_pass"
  198. name="ays_enable_restriction_pass"
  199. value="on" <?php echo (isset($options['enable_restriction_pass']) && $options['enable_restriction_pass'] == 'on') ? 'checked' : ''; ?>/>
  200. </div>
  201. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo (isset($options['enable_restriction_pass']) && $options['enable_restriction_pass'] == 'on') ? '' : 'display_none'; ?>">
  202. <div class="form-group row">
  203. <div class="col-sm-2">
  204. <label for="ays_users_roles">
  205. <?php echo __('User role',$this->plugin_name)?>
  206. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Role of the user on the website.',$this->plugin_name)?>">
  207. <i class="ays_fa ays_fa_info_circle"></i>
  208. </a>
  209. </label>
  210. </div>
  211. <div class="col-sm-10">
  212. <select name="ays_users_roles[]" id="ays_users_roles" multiple>
  213. <?php
  214. foreach ($ays_users_roles as $key => $user_role) {
  215. $selected_role = "";
  216. if(isset($options['user_role'])){
  217. if(is_array($options['user_role'])){
  218. if(in_array($user_role['name'], $options['user_role'])){
  219. $selected_role = 'selected';
  220. }else{
  221. $selected_role = '';
  222. }
  223. }else{
  224. if($options['user_role'] == $user_role['name']){
  225. $selected_role = 'selected';
  226. }else{
  227. $selected_role = '';
  228. }
  229. }
  230. }
  231. echo "<option value='" . $user_role['name'] . "' " . $selected_role . ">" . $user_role['name'] . "</option>";
  232. }
  233. ?>
  234. </select>
  235. </div>
  236. </div>
  237. <div class="form-group row">
  238. <div class="col-sm-2">
  239. <label for="restriction_pass_message">
  240. <?php echo __('Message',$this->plugin_name)?>
  241. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Message for the users who aren’t included in the above-mentioned list.',$this->plugin_name)?>">
  242. <i class="ays_fa ays_fa_info_circle"></i>
  243. </a>
  244. </label>
  245. </div>
  246. <div class="col-sm-10">
  247. <?php
  248. $content = wpautop(stripslashes((isset($options['restriction_pass_message'])) ? $options['restriction_pass_message'] : ''));
  249. $editor_id = 'restriction_pass_message';
  250. $settings = array('editor_height' => $quiz_wp_editor_height, 'textarea_name' => 'restriction_pass_message', 'editor_class' => 'ays-textarea', 'media_elements' => false);
  251. wp_editor($content, $editor_id, $settings);
  252. ?>
  253. </div>
  254. </div>
  255. </div>
  256. </div> <!-- Only for selected user role -->
  257. <hr/> <!-- AV Access Only selected users -->
  258. <div class="form-group row ays_toggle_parent">
  259. <div class="col-sm-3">
  260. <label for="ays_enable_restriction_pass_users">
  261. <?php echo __('Access only selected users',$this->plugin_name)?>
  262. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Quiz is available only for the users mentioned in the list.',$this->plugin_name)?>">
  263. <i class="ays_fa ays_fa_info_circle"></i>
  264. </a>
  265. </label>
  266. </div>
  267. <div class="col-sm-1">
  268. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_enable_restriction_pass_users"
  269. name="ays_enable_restriction_pass_users"
  270. value="on" <?php echo (isset($options['enable_restriction_pass_users']) && $options['enable_restriction_pass_users'] == 'on') ? 'checked' : ''; ?>/>
  271. </div>
  272. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo (isset($options['enable_restriction_pass_users']) && $options['enable_restriction_pass_users'] == 'on') ? '' : 'display_none'; ?>">
  273. <div class="form-group row">
  274. <div class="col-sm-2">
  275. <label for="ays_users_roles">
  276. <?php echo __('Users',$this->plugin_name)?>
  277. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Users on the website.',$this->plugin_name)?>">
  278. <i class="ays_fa ays_fa_info_circle"></i>
  279. </a>
  280. </label>
  281. </div>
  282. <div class="col-sm-10">
  283. <select id="ays_quiz_users_sel" name="ays_users_search[]" multiple>
  284. <?php
  285. foreach ($ays_users_search as $key => $users_search) {
  286. $user_search = (array) $users_search->data;
  287. $selected_users = "";
  288. if(isset($options['ays_users_search'])){
  289. if(is_array($options['ays_users_search'])){
  290. if(in_array($user_search['ID'], $options['ays_users_search'])){
  291. echo "<option value='" . $user_search['ID'] . "' selected>" . $user_search['display_name'] . "</option>";
  292. }else{
  293. echo "";
  294. }
  295. }else{
  296. if($options['ays_users_search'] == $user_search['ID']){
  297. echo "<option value='" . $user_search['ID'] . "' selected>" . $user_search['display_name'] . "</option>";
  298. }else{
  299. echo "";
  300. }
  301. }
  302. }
  303. }
  304. ?>
  305. </select>
  306. </div>
  307. </div>
  308. <div class="form-group row">
  309. <div class="col-sm-2">
  310. <label for="restriction_pass_users_message">
  311. <?php echo __('Message',$this->plugin_name)?>
  312. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Message for the users who aren’t included in the above-mentioned list.',$this->plugin_name)?>">
  313. <i class="ays_fa ays_fa_info_circle"></i>
  314. </a>
  315. </label>
  316. </div>
  317. <div class="col-sm-10">
  318. <?php
  319. $content = wpautop(stripslashes((isset($options['restriction_pass_users_message'])) ? $options['restriction_pass_users_message'] : ''));
  320. $editor_id = 'restriction_pass_users_message';
  321. $settings = array('editor_height' => $quiz_wp_editor_height, 'textarea_name' => 'restriction_pass_users_message', 'editor_class' => 'ays-textarea', 'media_elements' => false);
  322. wp_editor($content, $editor_id, $settings);
  323. ?>
  324. </div>
  325. </div>
  326. </div>
  327. </div> <!-- Access Only selected users -->
  328. <hr>
  329. <div class="form-group row ays_toggle_parent">
  330. <div class="col-sm-3">
  331. <label for="ays_enable_tackers_count">
  332. <?php echo __('Limitation count of takers', $this->plugin_name)?>
  333. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('You can choose how many users can pass the quiz.',$this->plugin_name)?>">
  334. <i class="ays_fa ays_fa_info_circle"></i>
  335. </a>
  336. </label>
  337. </div>
  338. <div class="col-sm-1">
  339. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_enable_tackers_count"
  340. name="ays_enable_tackers_count" value="on" <?php echo $enable_tackers_count ? 'checked' : ''; ?>/>
  341. </div>
  342. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo $enable_tackers_count ? '' : 'display_none'; ?>">
  343. <div class="form-group row">
  344. <div class="col-sm-2">
  345. <label for="ays_tackers_count">
  346. <?php echo __('Count',$this->plugin_name)?>
  347. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('The number of users who can pass the quiz.',$this->plugin_name)?>">
  348. <i class="ays_fa ays_fa_info_circle"></i>
  349. </a>
  350. </label>
  351. </div>
  352. <div class="col-sm-10">
  353. <input type="number" name="ays_tackers_count" id="ays_tackers_count" class="ays-enable-timerl ays-text-input"
  354. value="<?php echo $tackers_count; ?>">
  355. </div>
  356. </div>
  357. </div>
  358. </div> <!-- Limitation count of takers -->
  359. <hr>
  360. <div class="form-group row ays_toggle_parent">
  361. <div class="col-sm-3">
  362. <label for="ays_enable_password">
  363. <?php echo __('Password for passing quiz', $this->plugin_name)?>
  364. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('You can choose a password for users to pass the quiz.',$this->plugin_name)?>">
  365. <i class="ays_fa ays_fa_info_circle"></i>
  366. </a>
  367. </label>
  368. </div>
  369. <div class="col-sm-1">
  370. <input type="checkbox" class="ays-enable-timer1 ays_toggle_checkbox" id="ays_enable_password"
  371. name="ays_enable_password" value="on" <?php echo $enable_password ? 'checked' : ''; ?>/>
  372. </div>
  373. <div class="col-sm-8 ays_toggle_target ays_divider_left <?php echo $enable_password ? '' : 'display_none'; ?>">
  374. <div class="form-group">
  375. <div class="">
  376. <label class="ays_quiz_loader" for="ays_psw_quiz">
  377. <input type="radio" id="ays_psw_quiz" name='ays_psw_quiz' value='general' <?php echo $ays_passwords_quiz == 'general' ? 'checked' : ''; ?>>
  378. <?php echo __('General', $this->plugin_name) ?>
  379. </label>
  380. <label class="ays_quiz_loader" for="ays_generate_password_quiz">
  381. <input type="radio" id="ays_generate_password_quiz" name="ays_psw_quiz" value="generated_password" <?php echo $ays_passwords_quiz == 'generated_password' ? 'checked' : ''; ?>>
  382. <?php echo __('Generated Passwords', $this->plugin_name) ?>
  383. </label>
  384. </div>
  385. </div>
  386. <hr>
  387. <div class="form-group row <?php echo $ays_passwords_quiz == 'generated_password' ? 'display_none' : '';?>" id="ays_psw_content_quiz">
  388. <div class="col-sm-2">
  389. <label for="ays_password_quiz">
  390. <?php echo __('Password',$this->plugin_name)?>
  391. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Password for users who can pass the quiz.',$this->plugin_name)?>">
  392. <i class="ays_fa ays_fa_info_circle"></i>
  393. </a>
  394. </label>
  395. </div>
  396. <div class="col-sm-10">
  397. <input type="text" name="ays_password_quiz" id="ays_password_quiz" class="ays-enable-timer ays-text-input"
  398. value="<?php echo $password_quiz; ?>">
  399. </div>
  400. </div>
  401. <div class="form-group row <?php echo $ays_passwords_quiz == 'general' ? 'display_none' : '';?>" id="ays_generate_psw_content_quiz">
  402. <div class="col-sm-12">
  403. <div class="form-group row">
  404. <div class="col-sm-3">
  405. <label for="ays_password_count_quiz">
  406. <?php echo __('Passwords Count',$this->plugin_name)?>
  407. <a class="ays_help" data-toggle="tooltip" title="<?php echo __('Select your preferred count of passwords and the system will generate it for you. You can copy the password(s) from the Created column by clicking on the copy button.',$this->plugin_name)?>">
  408. <i class="ays_fa ays_fa_info_circle"></i>
  409. </a>
  410. </label>
  411. </div>
  412. <div class="col-sm-9" style="display:flex;">
  413. <input type="text" name="ays_password_count_quiz" id="ays_password_count_quiz" class="ays-enable-timer ays-text-input" value="" style="margin-right: 5px;">
  414. <input type="button" id="ays_generate_password_submit_quiz" name="ays_generate_password_submit_quiz" value="<?php echo __( "Submit", $this->plugin_name ); ?>" class="ays_genreted_password_count button">
  415. </div>
  416. </div>
  417. <div id="ays_generated_password" class="table-responsive form-group d-flex row">
  418. <div class="col-sm-4">
  419. <p>
  420. <?php echo __('Created',$this->plugin_name)?>
  421. <a class="ays_gen_psw_copy_all" id="ays_gen_psw_copy_all">
  422. <i class="fa fa-clipboard" aria-hidden="true"></i>
  423. </a>
  424. </p>
  425. <ul class="ays_created" id="ays_generated_psw">
  426. <?php
  427. if(!empty($created_passwords)){
  428. $created_passwords_content = '';
  429. foreach ($created_passwords as $key => $created_password) {
  430. $created_passwords_content .= '<li>';
  431. $created_passwords_content .= '<span class="created_psw">'.$created_password.'</span>';
  432. $created_passwords_content .= '<a class="ays_gen_psw_copy"><i class="fa fa-clipboard" aria-hidden="true"></i></a>';
  433. $created_passwords_content .= '<input type="hidden" name="ays_generated_psw[]" value="'.$created_password.'" class="ays_generated_psw">';
  434. $created_passwords_content .= '</li>';
  435. }
  436. echo $created_passwords_content;
  437. }
  438. ?>
  439. </ul>
  440. </div>
  441. <div class="col-sm-4">
  442. <p><?php echo __('Active',$this->plugin_name)?></p>
  443. <ul class="ays_active">
  444. <?php
  445. if(!empty($active_passwords)){
  446. $active_passwords_content = '';
  447. foreach ($active_passwords as $key => $active_password) {
  448. $active_passwords_content .= '<li>';
  449. $active_passwords_content .= '<span class="created_psw">'.$active_password.'</span>';
  450. $active_passwords_content .= '<input type="hidden" name="ays_active_gen_psw[]" value="'.$active_password.'" class="ays_active_gen_psw">';
  451. $active_passwords_content .= '</li>';
  452. }
  453. echo $active_passwords_content;
  454. }
  455. ?>
  456. </ul>
  457. </div>
  458. <div class="col-sm-4">
  459. <p><?php echo __('Used',$this->plugin_name)?></p>
  460. <ul class="ays_used">
  461. <?php
  462. if(!empty($used_passwords)){
  463. $used_passwords_content = '';
  464. foreach ($used_passwords as $key => $used_password) {
  465. $used_passwords_content .= '<li>';
  466. $used_passwords_content .= '<span class="created_psw">'.$used_password.'</span>';
  467. $used_passwords_content .= '<input type="hidden" name="ays_used_psw[]" value="'.$used_password.'" class="ays_used_psw">';
  468. $used_passwords_content .= '</li>';
  469. }
  470. echo $used_passwords_content;
  471. }
  472. ?>
  473. </ul>
  474. </div>
  475. </div>
  476. </div>
  477. </div>
  478. </div>
  479. </div><!-- Password for quiz -->
  480. </div>