bugganesha - Bugs: bug #8565, [AICC] - casse des paramètres...

 
 

bug #8565: [AICC] - casse des paramètres PutParam

Submitted by:  Pierre Gosset <pyg>
Submitted on:  Wed 14 Apr 2004 09:52:50 AM UTC  
 
Category: Tracking : AICC/SCORMSeverity: 2 - Minor
Item Group: NoneRelease: 
Status: FixedPrivacy: Public
Assigned to: NonePercent Complete: 0%
Originator Name: RonanOpen/Closed: Closed
URL: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 11 Nov 2004 09:09:20 AM UTC, comment #1:

A priori le bug (si c'en etait bien un) est fixé

Pierre Gosset <pyg>
Project Administrator
Wed 14 Apr 2004 09:52:50 AM UTC, original submission:

http://www.anemalab.org/phorum/read.php?f=2&i=7438&t=7438

quand on envoie une commande PutParam à votre plateforme, elle ne prend pas en compte les paramètres s'ils ne sont pas écrit en minuscule (session_id / aicc_data). Me trompe je ?

Dans la doc 'CMI Guidelines for Interoperability AICC'
( http://www.aicc.org/docs/tech/cmi001v3-5.pdf )

il est précisé (page 273)

Format des requêtes HTTP :

The format of the entity-body is as follows:
command=<AICC Command >&
version=<AICC Spec Version>&
session_id=<Unique Session Identifier>&
AU_password=<Assignable Unit specific password(optional)>&
AICC_Data=<(URL encoded) AICC Data>
<end of buffer>

Usage Rules:
• All of the above values are URL-encoded
• The Name/value pairs can appear in any order
• If an optional value is to be omitted, the name must also be omitted.
==> • The name of each parameter is not case sensitive.

Exemple : Command=PutParam&Version=2.0&Session_id=DAX36&AICC_Data=[core]%

donc je pense que la plateforme devrait accepté 'Session_id' et 'session_id', 'AICC_DATA' et 'Aicc_Data', etc....

voici une fonction php (non développé par moi mais par Julien, pas connu des forums non-plus) , qui renvoie les données associées à un paramètre quelque soit sa casse, ca peut peut etre vous servir.

function analyse_variable($nom_variable) {
$chaine_donnees = '';
$variable = strtolower($nom_variable);
$i = strlen($variable); // Debut de la mise en majuscule
$j = 0; // longueur
unset($temp);
while ($chaine_donnees=='')
{
$temp = substr($variable,0,$i).strtoupper(substr($variable,$i,$j)).substr($variable,$i+$j,strlen($variable));
$chaine_donnees = $_POST[$temp];
$i++;

if ($i==(strlen($variable)-$j+1))
{
$i = 0;
$j++;
}
if ($j>strlen($variable)) break;
}

return $chaine_donnees;
}

Pierre Gosset <pyg>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 11 Nov 2004 09:09:20 AM UTCpygStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1