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; exit;
} }
if ('true' === api_get_plugin_setting('whispeakauth', WhispeakAuthPlugin::SETTING_ENABLE)) {
WhispeakAuthPlugin::deleteEnrollment($user['uid']);
}
$passwordEncryption = api_get_configuration_value('password_encryption'); $passwordEncryption = api_get_configuration_value('password_encryption');
if ('none' === $passwordEncryption) { if ('none' === $passwordEncryption) {

@ -514,18 +514,6 @@ switch ($action) {
exit; 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. // Getting information of the current exercise.
$exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exeId); $exercise_stat_info = $objExercise->get_stat_track_exercise_info_by_exe_id($exeId);
$exercise_id = $exercise_stat_info['exe_exo_id']; $exercise_id = $exercise_stat_info['exe_exo_id'];

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

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

@ -645,13 +645,6 @@ class ScormApi
break; 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); $mylp->start_current_item(true);
if ($mylp->force_commit) { if ($mylp->force_commit) {
$mylp->save_current(); $mylp->save_current();

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

@ -57,15 +57,6 @@ if ($dir) {
$learnPath->stop_previous_item(); $learnPath->stop_previous_item();
$prerequisiteCheck = $learnPath->prerequisites_match($lpItemId); $prerequisiteCheck = $learnPath->prerequisites_match($lpItemId);
if (true === $prerequisiteCheck) { 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); $src = $learnPath->get_link('http', $lpItemId);
if (empty($src)) { if (empty($src)) {
$src = 'blank.php?'.api_get_cidreq().'&error=document_protected'; $src = 'blank.php?'.api_get_cidreq().'&error=document_protected';

@ -221,16 +221,6 @@ if (!isset($src)) {
$src = $oLP->fixBlockedLinks($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 $oLP->start_current_item(); // starts time counter manually if asset
} else { } else {
$src = 'blank.php?error=prerequisites'; $src = 'blank.php?error=prerequisites';

Loading…
Cancel
Save