Merge remote-tracking branch 'origin/master'

pull/5330/head
Angel Fernando Quiroz Campos 1 year ago
commit 8ef7ea7dec
  1. 4
      public/main/auth/lostPassword.php
  2. 12
      public/main/inc/ajax/exercise.ajax.php
  3. 19
      public/main/inc/lib/exercise.lib.php
  4. 30
      public/main/inc/lib/plugin.lib.php
  5. 7
      public/main/lp/ScormApi.php
  6. 4
      public/main/lp/learnpathItem.class.php
  7. 9
      public/main/lp/lp_content.php
  8. 10
      public/main/lp/lp_view.php

@ -106,10 +106,6 @@ if ($form->validate()) {
exit;
}
if ('true' === api_get_plugin_setting('whispeakauth', WhispeakAuthPlugin::SETTING_ENABLE)) {
WhispeakAuthPlugin::deleteEnrollment($user['uid']);
}
$passwordEncryption = api_get_configuration_value('password_encryption');
if ('none' === $passwordEncryption) {

@ -514,18 +514,6 @@ switch ($action) {
exit;
}
if (WhispeakAuthPlugin::questionRequireAuthentify($question_id)) {
if (ONE_PER_PAGE == $objExercise->type) {
echo json_encode(['type' => 'one_per_page']);
break;
}
echo json_encode(['ok' => true]);
break;
} else {
ChamiloSession::erase(WhispeakAuthPlugin::SESSION_QUIZ_QUESTION);
}
// Getting information of the current exercise.
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exeId);
$exercise_id = $exercise_stat_info['exe_exo_id'];

@ -69,8 +69,6 @@ class ExerciseLib
return false;
}
$questionRequireAuth = WhispeakAuthPlugin::questionRequireAuthentify($questionId);
if (EXERCISE_FEEDBACK_TYPE_END != $exercise->getFeedbackType()) {
$show_comment = false;
}
@ -101,12 +99,6 @@ class ExerciseLib
echo $titleToDisplay;
}
if ($questionRequireAuth) {
WhispeakAuthPlugin::quizQuestionAuthentify($questionId, $exercise);
return false;
}
if (!empty($questionDescription) && READING_COMPREHENSION != $answerType) {
echo Display::div(
$questionDescription,
@ -1488,11 +1480,6 @@ HTML;
}
echo $objQuestionTmp->getTitleToDisplay($exercise, $current_item);
}
if ($questionRequireAuth) {
WhispeakAuthPlugin::quizQuestionAuthentify($questionId, $exercise);
return false;
}
//@todo I need to the get the feedback type
echo <<<HOTSPOT
@ -1554,12 +1541,6 @@ HOTSPOT;
echo $objQuestionTmp->getTitleToDisplay($exercise, $current_item);
}
if ($questionRequireAuth) {
WhispeakAuthPlugin::quizQuestionAuthentify($questionId, $exercise);
return false;
}
echo '
<input type="hidden" name="hidden_hotspot_id" value="'.$questionId.'" />
<div class="exercise_questions">

@ -200,11 +200,8 @@ class AppPlugin
static $officialPlugins = null;
// Please keep this list alphabetically sorted
$officialPlugins = [
'add_cas_login_button',
'add_cas_logout_button',
'add_facebook_login_button',
'add_shibboleth_login_button',
'advanced_subscription',
'ai_helper',
'azure_active_directory',
'bbb',
'before_login',
@ -212,7 +209,6 @@ class AppPlugin
'card_game',
'check_extra_field_author_company',
'cleandeletedfiles',
'clockworksms',
'courseblock',
'coursehomenotify',
'courselegal',
@ -220,43 +216,33 @@ class AppPlugin
'customcertificate',
'customfooter',
'dashboard',
'date',
'dictionary',
'embedregistry',
'exercise_signature',
'ext_auth_chamilo_logout_button_behaviour',
'follow_buttons',
'formLogin_hide_unhide',
'externalnotificationconnect',
'extramenufromwebservice',
'google_maps',
'google_meet',
'grading_electronic',
'h5p',
'h5pimport',
'hello_world',
'ims_lti',
'jcapture',
'justification',
'kannelsms',
'keycloak',
'learning_calendar',
'lti_provider',
'maintenancemode',
'migrationmoodle',
'mindmap',
'mobidico',
'nosearchindex',
'notebookteacher',
'oauth2',
'olpc_peru_filter',
'openmeetings',
'pausetraining',
'pens',
'positioning',
'questionoptionsevaluation',
'redirection',
'reports',
'resubscription',
'rss',
'search_course',
'sepe',
'share_buttons',
'show_regions',
'show_user_info',
'static',
@ -264,12 +250,10 @@ class AppPlugin
'surveyexportcsv',
'surveyexporttxt',
'test2pdf',
'toplinks',
'tour',
'userremoteservice',
'vchamilo',
'whispeakauth',
'zoom',
'xapi',
];
return $officialPlugins;

@ -645,13 +645,6 @@ class ScormApi
break;
}
if (WhispeakAuthPlugin::isLpItemMarked($new_item_id)) {
ChamiloSession::write(
WhispeakAuthPlugin::SESSION_LP_ITEM,
['lp' => $lpId, 'lp_item' => $new_item_id, 'src' => '']
);
}
$mylp->start_current_item(true);
if ($mylp->force_commit) {
$mylp->save_current();

@ -2799,10 +2799,6 @@ class learnpathItem
error_log("type: $type");
}
if (!WhispeakAuthPlugin::isAllowedToSaveLpItem($this->iId)) {
return false;
}
switch ($type) {
case 'asset':
if ($prereqs_complete) {

@ -57,15 +57,6 @@ if ($dir) {
$learnPath->stop_previous_item();
$prerequisiteCheck = $learnPath->prerequisites_match($lpItemId);
if (true === $prerequisiteCheck) {
if (WhispeakAuthPlugin::isLpItemMarked($lpItemId)) {
ChamiloSession::write(
WhispeakAuthPlugin::SESSION_LP_ITEM,
['lp' => $learnPath->lp_id, 'lp_item' => $lpItemId, 'src' => $src]
);
$src = api_get_path(WEB_PLUGIN_PATH).'whispeakauth/authentify.php';
break;
}
$src = $learnPath->get_link('http', $lpItemId);
if (empty($src)) {
$src = 'blank.php?'.api_get_cidreq().'&error=document_protected';

@ -221,16 +221,6 @@ if (!isset($src)) {
$src = $oLP->fixBlockedLinks($src);
if (WhispeakAuthPlugin::isLpItemMarked($lp_item_id)) {
ChamiloSession::write(
WhispeakAuthPlugin::SESSION_LP_ITEM,
['lp' => $lp->getIid(), 'lp_item' => $lp_item_id, 'src' => $src]
);
$src = api_get_path(WEB_PLUGIN_PATH).'whispeakauth/authentify.php';
break;
}
$oLP->start_current_item(); // starts time counter manually if asset
} else {
$src = 'blank.php?error=prerequisites';

Loading…
Cancel
Save