Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question degre de certitude #2485

Closed

Conversation

pielRouge
Copy link

Add a new kind of question for the exercises. This new questions is: Multiple answer true false degree certainty.
No changes to the database.
French explanation of the question's behaviour : https://chamilosimsu.wordpress.com/2018/02/07/nouveau-type-de-question-vrai-faux-avec-degres-de-certitude/

Best regards

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/4662

This comment was posted by FlintCI. It can be disabled in the repository settings.

@jmontoyaa
Copy link
Member

Please fix the flint issues:

https://flintci.io/repositories/1013/analyses/4662

/**
* Constructor
*/
public function MultipleAnswerTrueFalseDegreeCertainty() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use PHP4 way to create a construct.

use:

public function __construct() 
{
 ...
}

) {
$server_name .= ":".$_SERVER['SERVER_PORT'];
}
$root_web = $server_protocol.'://'.$server_name.$root_rel;
$root_sys = str_replace('\\', '/', realpath(__DIR__.'/../../../')).'/';
$root_sys = str_replace('\\', '/', realpath(__DIR__ . '/../../ficher test degre certitudes/')).'/';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete that line.

@@ -9038,18 +9020,17 @@ function api_float_val($number)
* 3.141516 => 3.14
* 3,141516 => 3,14
*
* @todo WIP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete our changes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No entiendo

@@ -2033,20 +2035,6 @@ function api_get_course_entity($courseId = 0)
return Database::getManager()->getRepository('ChamiloCoreBundle:Course')->find($courseId);
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete our changes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No entiendo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pielRouge has eliminado el valor por defecto $courseId = 0 en la declaración de la función y el método api_get_session_entity() a bajo. De esto habla Julio.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8711

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8712

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8713

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8714

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8715

This comment was posted by FlintCI. It can be disabled in the repository settings.

@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@chamilo chamilo deleted a comment Jul 11, 2018
@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8862

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8863

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8865

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8866

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8867

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8868

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8869

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8870

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8871

This comment was posted by FlintCI. It can be disabled in the repository settings.

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8872

This comment was posted by FlintCI. It can be disabled in the repository settings.

null,
PERSON_NAME_EMAIL_ADDRESS
);
$emailGenerique = api_get_setting('emailAdministrator');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changer la variable en anglais $emailGenerique
C'est mieux de metre tout le code dans une fonction, par exemple: "sendQuestionCertaintyNotification()"

@FlintCIBot
Copy link

Lint errors were found. A patch is also available.

Please see the report: https://flintci.io/repositories/1013/analyses/8874

This comment was posted by FlintCI. It can be disabled in the repository settings.

$checkResult = ($studentAnwser == $expectedAnswer) ? true : false;
if ($checkResult) {
if ($studentDegreeChoicePosition >= 6) {
return get_lang('langVerySure');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les variables de langue ne prennent plus le préfixe "lang" depuis au moins 2 ans 😄
PrettySur->manque un "e" à la fin.
Je corrige tout ça. Ça n'est plus à faire, mais je le note pour la partie "life-long learning" 💡

}

$data = Database::fetch_assoc($res);
$courseCode = $data['exe_cours_id'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceci est incorrect pour les versions 1.11+ au moins. Utiliser $data['c_id'].

@@ -1701,6 +1960,7 @@ public static function get_exam_results_data(
$courseCode = null,
$showSessionField = false,
$showExerciseCategories = false,
$userExtraFieldsToAdd = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erreur (de parsing, donc étonnant que non détectée)

$results[$i]['category_'.$categoryId] = $scoreToDisplay;
$results[$i]['category_'.$categoryId.'_score_percentage'] = self::show_score(
$result['score'],
$result['total'],
true,
true,
true, // $show_only_percentage = false
true // hide % sign
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autre erreur de parsing. Bizarre, quand même, cette idée de dupliquer les paramètres sans raison (et sans virgule)

@ywarnier
Copy link
Member

Bon, je n'ai pas trouvé le moyen de faire un merge online comme suggérait @jmontoyaa, du coup j'ai créé une branche officielle de Chamilo (temporairement) "certainty" pour essayer d'arriver au bout de ce merge.

Pour l'instant, à quelques petites choses près, ça marche plus ou moins (après 7h de merge quand même 😄 ).

Mais:

  • quand on est dans cette branche "certainty", le bouton pour sauver la question est bloqué. J'obtiens une erreur JS indiquant que "save_now()" n'est pas une fonction. Pourtant en faisant un diff avec la vraie branche 1.11.x, je ne vois pas de différence notoire. Une idée?
  • il y a une variable JS qui est ajoutée à une URL mais qui n'est pas définie. J'ai laissé une note à @baelmyhu dans le PR à ce sujet
  • quand j'essaie de passer un autre type de question (toujours dans la branche), je reçois deux NOTICE qui viennent de la classe du nouveau type de question (alors que normalement on ne rentre pas dans ce code):
    Notice: Undefined offset: 1 in /var/www/chamilo111x/main/exercise/multipleAnswerTrueFalseDegreeCertainty.php on line 1038
    et
    Notice: Undefined offset: 2 in /var/www/chamilo111x/main/exercise/multipleAnswerTrueFalseDegreeCertainty.php on line 1041

Voilà, donc si @baelmyhu et @pielRouge n'arrivent pas à nous aider sur ceci ce mardi, il faudra abandonner l'intégration dans la 1.11.8 (parce que c'est manifestement du code raccomodé qui n'atteint pas, pour l'instant, le niveau de qualité espéré pour l'intégrer).

Donc merci de travailler directement sur la branche "certainty". J'ouvre un PR pour ça et je ferme celui-ci.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants