Minor - remove unused code, add LP link, add intro #3644
parent
9dff93545c
commit
5c4c62f134
@ -1,44 +0,0 @@ |
||||
<?php |
||||
|
||||
/* For licensing terms, see /license.txt */ |
||||
|
||||
require_once __DIR__.'/../../../main/inc/global.inc.php'; |
||||
|
||||
api_protect_admin_script(); |
||||
|
||||
$plugin = Positioning::create(); |
||||
$action = isset($_REQUEST['a']) ? $_REQUEST['a'] : null; |
||||
|
||||
switch ($action) { |
||||
case 'delete-file': |
||||
$path = isset($_REQUEST['path']) ? $_REQUEST['path'] : null; |
||||
if (empty($path)) { |
||||
echo json_encode(["status" => "false", "message" => $plugin->get_lang('ErrorEmptyPath')]); |
||||
exit; |
||||
} |
||||
|
||||
if (unlink($path)) { |
||||
Display::addFlash($plugin->get_lang("DeletedSuccess"), 'success'); |
||||
echo json_encode(["status" => "true"]); |
||||
} else { |
||||
echo json_encode(["status" => "false", "message" => $plugin->get_lang('ErrorDeleteFile')]); |
||||
} |
||||
break; |
||||
case 'delete-files-list': |
||||
$list = isset($_REQUEST['list']) ? $_REQUEST['list'] : []; |
||||
if (empty($list)) { |
||||
echo json_encode(["status" => "false", "message" => $plugin->get_lang('ErrorEmptyPath')]); |
||||
exit; |
||||
} |
||||
|
||||
foreach ($list as $value) { |
||||
if (empty($value)) { |
||||
continue; |
||||
} |
||||
unlink($value); |
||||
} |
||||
|
||||
Display::addFlash($plugin->get_lang("DeletedSuccess"), 'success'); |
||||
echo json_encode(["status" => "true"]); |
||||
break; |
||||
} |
||||
@ -1,11 +1,18 @@ |
||||
<h3>{{ "InviteToTakePositioningTest"| get_plugin_lang('Positioning') }}</h3> |
||||
<div class="row"> |
||||
<div class="col-md-4"> |
||||
<h3>{{ "InviteToTakePositioningTest"| get_plugin_lang('Positioning') }}</h3> |
||||
<p>{{ "InitialTest"| get_plugin_lang('Positioning') }}: {{ initial_exercise }}</p> |
||||
</div> |
||||
|
||||
<p>{{ "InitialTest"| get_plugin_lang('Positioning') }}: {{ initial_exercise }}</p> |
||||
<div class="col-md-4"> |
||||
<h3>{{ "YouMustCompleteAThresholdToTakeFinalTest"| get_plugin_lang('Positioning') | format(average_percentage_to_unlock_final_exercise) }}</h3> |
||||
<p>{{ "Average"| get_lang }}: {{ average }} %</p> |
||||
<p>{{ lp_url }}</p> |
||||
</div> |
||||
|
||||
<h3>{{ "YouMustCompleteAThresholdToTakeFinalTest"| get_plugin_lang('Positioning') | format(average_percentage_to_unlock_final_exercise) }}</h3> |
||||
|
||||
<p>{{ "Average"| get_lang }}: {{ average }}</p> |
||||
|
||||
<p>{{ "FinalTest"| get_plugin_lang('Positioning') }}: {{ final_exercise }}</p> |
||||
<div class="col-md-4"> |
||||
<p>{{ "FinalTest"| get_plugin_lang('Positioning') }}: {{ final_exercise }}</p> |
||||
</div> |
||||
</div> |
||||
|
||||
{{ radars }} |
||||
|
||||
Loading…
Reference in new issue