Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
0014374
Plugin: ExerciseFocused: Add plugin - refs BT#20900
AngelFQC Sep 12, 2023
d28c712
Plugin: ExerciseFocused: Refactoring variable and setting names - ref…
AngelFQC Sep 25, 2023
025fd7b
Plugin: ExerciseMonitoring: Add plugin - refs BT#20901
AngelFQC Sep 22, 2023
d2b67a1
Plugin: ExerciseMonitoring: Terms popup is not callable - refs BT#20901
AngelFQC Sep 25, 2023
38e4362
Plugin: ExerciseMonitoring: Remove countdown to snap - refs BT#20901
AngelFQC Sep 27, 2023
7ee37c2
Plugin: ExerciseMonitoring: Snap when pressing spacer - refs BT#20901
AngelFQC Sep 27, 2023
0f02a6d
Plugin: ExerciseMonitoring: Redirect when ending initial photos - ref…
AngelFQC Sep 27, 2023
6fb86ba
Plugin: ExerciseMonitoring: Differ between exercise one per page or a…
AngelFQC Sep 27, 2023
e2a973e
Plugin: ExerciseMonitoring: Set snapshot dimension to 640x480 - refs …
AngelFQC Sep 27, 2023
228114d
Plugin: ExerciseFocused: Show warning to alert user before leaving ex…
AngelFQC Sep 27, 2023
a08c2ca
Plugin: ExerciseMonitoring: Don't show modal when there isn't Start b…
AngelFQC Oct 3, 2023
1ead20c
Plugin: ExerciseFocused: Block click event - refs BT#20900
AngelFQC Oct 3, 2023
1d2563b
Plugin: ExerciseMonitoring: Fix video responsive - refs BT#20901
AngelFQC Oct 3, 2023
244d330
Plugin: ExerciseMonitoring: Add instructions to take snapshots - refs…
AngelFQC Oct 3, 2023
f7fb4f3
Plugin: ExerciseFocused: Refactor query for results - refs BT#20901
AngelFQC Oct 4, 2023
15924bb
Plugin: ExerciseFocused: Add setting to generate random sampling - re…
AngelFQC Oct 5, 2023
a941ffc
Plugin: ExerciseFocused: Display motive in report with contextual sty…
AngelFQC Oct 6, 2023
4073794
Plugin: ExerciseMonitoring: Show snapshot logs in ExerciseFocused plu…
AngelFQC Oct 6, 2023
705adfe
Minor: Format code - refs BT#21074
AngelFQC Oct 6, 2023
5d85dbd
Plugin: ExerciseFocused: Language variable - refs BT#20900
AngelFQC Oct 10, 2023
9d92abb
Plugin: ExerciseMonitoring: Fix extrafield name - refs BT#20900
AngelFQC Oct 10, 2023
b603211
Plugin: ExerciseFocused: Allow to enable time limit by setting - refs…
AngelFQC Oct 15, 2023
7309a4b
Plugin: ExerciseFocused: Add spanish language - refs BT#20901
AngelFQC Oct 15, 2023
c901a9b
Plugin: ExerciseMonitoring: Add spanish language - refs BT#20900
AngelFQC Oct 15, 2023
bc08890
Plugin: ExerciseMonitoring: Add placeholders to camera - refs BT#20901
AngelFQC Oct 17, 2023
f2f6b57
Plugin: ExerciseMonitoring: Refactor to show link in plugin Exercise …
AngelFQC Oct 18, 2023
1e88b10
Plugin: ExerciseMonitoring: Fix lang var - refs BT#20901
AngelFQC Oct 18, 2023
466775f
Plugin: ExerciseMonitoring: Fix irregular grid - refs BT#20901
AngelFQC Oct 18, 2023
3a8a564
Plugin: ExerciseFocused: Allow save level in log - refs BT#20900
AngelFQC Oct 18, 2023
b52ae40
Plugin: ExerciseFocused: Allow export for exercise with one question …
AngelFQC Oct 18, 2023
7d14389
Plugin: ExerciseFocused: ExerciseMonitoring: Fix lang variables - ref…
AngelFQC Oct 23, 2023
8246631
Plugin: ExerciseFocused: Fix report when there is no exercise attempt…
AngelFQC Oct 23, 2023
0df164d
Plugin: ExerciseFocused: Include snapshots column from ExerciseMonito…
AngelFQC Oct 23, 2023
e8af495
Minor: Format code - refs BT#21074
AngelFQC Oct 23, 2023
b29fd5f
Plugin: ExerciseFocused: Simplify conditions with exercise type - ref…
AngelFQC Oct 23, 2023
1f97262
Plugin: ExerciseFocused: ExerciseMonitoring: Use new term to level + …
AngelFQC Oct 24, 2023
5e3ce2c
Plugin: ExerciseMonitoring: set genera column to level in report - re…
AngelFQC Oct 24, 2023
8975f56
Plugin: ExerciseMonitoring: ExerciseFocused: Change language vars - r…
AngelFQC Oct 25, 2023
f6ccd69
Plugin: ExerciseMonitoring: ExerciseFocused: unify header in modals -…
AngelFQC Oct 25, 2023
f88a374
Plugin: ExerciseMonitoring: ExerciseFocused: use Student term instead…
AngelFQC Oct 25, 2023
8dd959a
Plugin: ExerciseFocused: Display level reached in detail - BT#21074
AngelFQC Oct 25, 2023
6fb4aa5
Plugin: ExerciseMonitoring: Move code to function - BT#21074
AngelFQC Oct 26, 2023
99ab4ad
Plugin: ExerciseFocused: Change language variable - refs BT#21074
AngelFQC Oct 30, 2023
3129acb
Plugin: ExerciseFocused: Change language variables - refs BT#21074
AngelFQC Oct 30, 2023
b78cee7
Plugin: ExerciseFocused: Add columns about session/course in admin re…
AngelFQC Nov 8, 2023
d3c2a77
Plugin: ExerciseFocused: Fix language vars in report - refs BT#21074
AngelFQC Nov 8, 2023
22c0cce
Plugin: ExerciseFocused: Add IP report exported + fix lang var - refs…
AngelFQC Nov 8, 2023
d939233
Plugin: ExerciseMonitoring: Add option to set instructions with age d…
AngelFQC Nov 14, 2023
779eaa2
Plugin: ExerciseMonitoring: Move code to function - refs BT#20901
AngelFQC Nov 14, 2023
26ccab8
Plugin: ExerciseMonitoring: Fix ID and user snapshots without track_e…
AngelFQC Nov 14, 2023
e95e3cc
Plugin: ExerciseFocused: Separate the column full name in two columns…
AngelFQC Nov 14, 2023
3b67efe
Plugin: ExerciseFocused: Search form has optional fields - refs BT#21074
AngelFQC Nov 14, 2023
06c0d4a
Plugin: ExerciseMonitoring: Show the birthdate and legal age in repor…
AngelFQC Nov 23, 2023
712ec6e
Minor: Add missing webcam.png icon with size small - refs BT#21074
AngelFQC Nov 23, 2023
039afe6
Plugin: ExerciseFocused: Fix detail for admin report - refs BT#21074
AngelFQC Nov 23, 2023
495f932
Plugin: ExerciseMonitoring: Add setting and cron job to delete snapsh…
AngelFQC Nov 24, 2023
a81bd73
Minor: Plugin: ExerciseFocused: Delay backdrop - refs BT#21074
AngelFQC Nov 24, 2023
e7e448a
Minor: Plugin: ExerciseFocused: change message for window/tab title -…
AngelFQC Nov 24, 2023
ac38116
Plugin: ExerciseFocused: Keep message visibility after refocusing - r…
AngelFQC Nov 27, 2023
6d42e3f
Plugin: ExerciseFocused: Fix filter by session extra fields - refs BT…
AngelFQC Nov 27, 2023
f620574
Plugin: ExerciseFocused: Fix report by session extra fields - refs BT…
AngelFQC Nov 27, 2023
514ff81
Plugin: ExerciseMonitoring: Make the live camera floating - refs BT#2…
AngelFQC Nov 28, 2023
6aa13fd
Plugin: ExerciseFocused: Make the alert message floating - refs BT#20901
AngelFQC Nov 28, 2023
4695d7e
Plugin: ExerciseFocused: Change lang var for motive - refs BT#21074
AngelFQC Nov 29, 2023
84b8773
Plugin: ExerciseFocused: Increase delay time to hide messages - refs …
AngelFQC Dec 1, 2023
c409026
Plugin: ExerciseMonitoring: Improve image placeholders for id card an…
AngelFQC Dec 1, 2023
8b79fcf
Plugin: ExerciseMonitoring: Improve image placeholders for id card - …
AngelFQC Dec 4, 2023
078ca7b
Minor: Plugin: ExerciseFocused: Fix lang var - refs BT#20901
AngelFQC Dec 4, 2023
7aa332e
Plugin: ExerciseFocused: Fix random results - refs BT#21074
AngelFQC Dec 6, 2023
36492cf
Plugin: ExerciseFocused: Fix session filter - refs BT#21074
AngelFQC Dec 6, 2023
08c8d0a
Plugin: ExerciseFocused: Allow multiple match in firstname and lastna…
AngelFQC Dec 6, 2023
d7c2ac1
Plugin: ExerciseFocused: Round number of random results - refs BT#21074
AngelFQC Dec 6, 2023
b564fba
Plugin: ExerciseFocused: Add button to reset search - refs BT#21074
AngelFQC Dec 6, 2023
68780b9
Minor: Format code
AngelFQC Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions main/exercise/exercise_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,8 @@
'comparative_group_report.php?'.api_get_cidreq().'&id='.$exercise_id,
['class' => 'btn btn-default']
);

$actions .= ExerciseFocusedPlugin::create()->getLinkReporting($exercise_id);
}
} else {
$actions .= '<a href="exercise.php">'.
Expand Down
Binary file added main/img/icons/22/webcam_na.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions plugin/exercisefocused/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/* For licensing terms, see /license.txt */

use Chamilo\PluginBundle\ExerciseFocused\Controller\AdminController;
use Chamilo\PluginBundle\ExerciseFocused\Entity\Log;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
use Symfony\Component\HttpFoundation\Response as HttpResponse;

$cidReset = true;

require_once __DIR__.'/../../main/inc/global.inc.php';

api_protect_admin_script();

$em = Database::getManager();
$logRepository = $em->getRepository(Log::class);

$reportingController = new AdminController(
ExerciseFocusedPlugin::create(),
HttpRequest::createFromGlobals(),
$em,
$logRepository
);

try {
$response = $reportingController();
} catch (Exception $e) {
$response = HttpResponse::create('', HttpResponse::HTTP_FORBIDDEN);
}

$response->send();
48 changes: 48 additions & 0 deletions plugin/exercisefocused/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php

/* For licensing terms, see /license.txt */

use Chamilo\CoreBundle\Entity\TrackEExercises;
use Chamilo\PluginBundle\ExerciseFocused\Entity\Log;

$plugin = ExerciseFocusedPlugin::create();

$exerciseId = (int) ($_GET['exerciseId'] ?? 0);

$renderRegion = $plugin->isEnableForExercise($exerciseId);

if ($renderRegion) {
$_template['show_region'] = true;

$em = Database::getManager();

$existingExeId = (int) ChamiloSession::read('exe_id');
$trackingExercise = null;

if ($existingExeId) {
$trackingExercise = $em->find(TrackEExercises::class, $existingExeId);
}

$_template['sec_token'] = Security::get_token('exercisefocused');

if ('true' === $plugin->get(ExerciseFocusedPlugin::SETTING_ENABLE_OUTFOCUSED_LIMIT)) {
$logRepository = $em->getRepository(Log::class);

if ($trackingExercise) {
$countOutfocused = $logRepository->countByActionInExe($trackingExercise, Log::TYPE_OUTFOCUSED);
} else {
$countOutfocused = 0;
}

$_template['count_outfocused'] = $countOutfocused;
$_template['remaining_outfocused'] = (int) $plugin->get(ExerciseFocusedPlugin::SETTING_OUTFOCUSED_LIMIT) - $countOutfocused;
}

if ($trackingExercise) {
$exercise = new Exercise($trackingExercise->getCId());

if ($exercise->read($trackingExercise->getExeExoId())) {
$_template['exercise_type'] = (int) $exercise->selectType();
}
}
}
5 changes: 5 additions & 0 deletions plugin/exercisefocused/install.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

/* For licensing terms, see /license.txt */

ExerciseFocusedPlugin::create()->install();
39 changes: 39 additions & 0 deletions plugin/exercisefocused/lang/english.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

/* For licensing terms, see /license.txt */

$strings['plugin_title'] = "Exercise Focused";
$strings['plugin_comment'] = "Show a message to return to the exercise when the user exits the Chamilo window/tab.";

$strings['tool_enable'] = "Enable tool";
$strings['enable_time_limit'] = 'Enable time limit';
$strings['time_limit'] = "Limit time";
$strings['time_limit_help'] = "Limit time (in seconds) to return to the exercise. After this time the exercise will be closed.";
$strings['enable_outfocused_limit'] = "Enable maximum of outfocused";
$strings['outfocused_limit'] = "Maximum number of outfocused allowed";
$strings['outfocused_limit_help'] = "Number of outfocused allowed. After this limit the exercise will be closed.";
$strings['session_field_filters'] = "Session field as filter";
$strings['session_field_filters_help'] = "Extra field names separeted by a comma.";
$strings['percentage_sampling'] = "Percentage of sampling attempts";
$strings['percentage_sampling_help'] = "A percentage of attempts will be selected for random review";

$strings['ReportByAttempts'] = "Exercise focused: Report by attempts";
$strings['YouHaveLeftTheExercise'] = "Careful! We detect that you have left the exam window.<br><br>You must return and complete it.";
$strings['YouHaveXTimeToReturn'] = "You have <span class=\"h3 text-danger\" id=\"time-limit-target\">%s</span> seconds to return";
$strings['YouAreAllowedXOutfocused'] = "You are allowed <span class=\"h3 text-danger\" id=\"outfocused-limit-target\">%d</span> outfocused";
$strings['OutfocusedLimitExceeded'] = "You have exceeded the allowed limit of outfocused";
$strings['SelectExercise'] = "Select exercise";
$strings['UnselectExercise'] = "Unselect exercise";
$strings['Returns'] = "Returns";
$strings['MaxOutfocusedReached'] = "Max outfocused reached";
$strings['TimeLimitReached'] = "Time limit reached";
$strings['Outfocused'] = "Outfocused";
$strings['Return'] = "Return";
$strings['Motive'] = "Motive";
$strings['AlertBeforeLeaving'] = "Please stay within the exam";
$strings['RandomSampling'] = "Random sampling";
$strings['WindowTitleOutfocused'] = '🚨 Stay within the exam!';
$strings['LevelReached'] = 'Level reached';
$strings['ExerciseStartDateAndTime'] = "Exercise start date and time";
$strings['ExerciseEndDateAndTime'] = "Exercise end date and time";
$strings['MotiveExerciseFinished'] = "Successfully completed the exam";
39 changes: 39 additions & 0 deletions plugin/exercisefocused/lang/spanish.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php

/* For licensing terms, see /license.txt */

$strings['plugin_title'] = "Enfoque en el Ejercicio";
$strings['plugin_comment'] = "Mostrar un mensaje para regresar al ejercicio cuando el usuario sale de la ventana/pestaña de Chamilo.";

$strings['tool_enable'] = "Habilitar herramienta";
$strings['enable_time_limit'] = 'Habilitar límite de tiempo';
$strings['time_limit'] = "Límite de tiempo";
$strings['time_limit_help'] = "Límite el tiempo (en segundos) para regresar al ejercicio. Pasado este tiempo, el ejercicio se cerrará.";
$strings['enable_outfocused_limit'] = "Habilitar el máximo de desenfoque";
$strings['outfocused_limit'] = "Número máximo de desenfoques permitidos";
$strings['outfocused_limit_help'] = "Número de desenfoques permitidos. Después de este límite, el ejercicio se cerrará.";
$strings['session_field_filters'] = "Campo de sesión como filtro";
$strings['session_field_filters_help'] = "Nombres de campos adicionales separados por comas.";
$strings['percentage_sampling'] = "Porcentaje de intentos de muestreo";
$strings['percentage_sampling_help'] = "Se seleccionará un porcentaje de intentos para una revisión aleatoria";

$strings['ReportByAttempts'] = "Enfoque en el Ejercicio: Informe por intentos";
$strings['YouHaveLeftTheExercise'] = "¡Cuidado! Detectamos que has abandonado la ventana del examen.<br><br>Debes retornar y culminarlo.";
$strings['YouHaveXTimeToReturn'] = "Tienes <span class=\"h3 text-danger\" id=\"time-limit-target\">%s</span> segundos para regresar";
$strings['YouAreAllowedXOutfocused'] = "Se te permite <span class=\"h3 text-danger\" id=\"outfocused-limit-target\">%d</span> desenfoques";
$strings['OutfocusedLimitExceeded'] = "Has excedido el límite permitido de desenfoques";
$strings['SelectExercise'] = "Seleccionar ejercicio";
$strings['UnselectExercise'] = "Deseleccionar ejercicio";
$strings['Returns'] = "Regresos";
$strings['MaxOutfocusedReached'] = "Se ha alcanzado el máximo de desenfoques";
$strings['TimeLimitReached'] = "Se ha alcanzado el límite de tiempo";
$strings['Outfocused'] = "Desenfoques";
$strings['Return'] = "Regresos";
$strings['Motive'] = "Motivo";
$strings['AlertBeforeLeaving'] = "Por favor, mantente dentro del examen.";
$strings['RandomSampling'] = "Muestreo Aleatorio";
$strings['WindowTitleOutfocused'] = '🚨 Retorna y culmina tu examen';
$strings['LevelReached'] = 'Nivel alcanzado';
$strings['ExerciseStartDateAndTime'] = "Fecha y hora de inicio del ejercicio";
$strings['ExerciseEndDateAndTime'] = "Fecha y hora de finalización del ejercicio";
$strings['MotiveExerciseFinished'] = "Culminó exitosamente el examen";
32 changes: 32 additions & 0 deletions plugin/exercisefocused/pages/detail.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/* For licensing terms, see /license.txt */

use Chamilo\PluginBundle\ExerciseFocused\Controller\DetailController;
use Chamilo\PluginBundle\ExerciseFocused\Entity\Log;
use Symfony\Component\HttpFoundation\Request as HttpRequest;
use Symfony\Component\HttpFoundation\Response as HttpResponse;

require_once __DIR__.'/../../../main/inc/global.inc.php';

if (!api_is_allowed_to_edit()) {
api_not_allowed(true);
}

$em = Database::getManager();
$logRepository = $em->getRepository(Log::class);

$detailController = new DetailController(
ExerciseFocusedPlugin::create(),
HttpRequest::createFromGlobals(),
$em,
$logRepository
);

try {
$response = $detailController();
} catch (Exception $e) {
$response = HttpResponse::create('', HttpResponse::HTTP_FORBIDDEN);
}

$response->send();
Loading
Loading