Skip to main content
added 2 characters in body; edited title
Source Link
Pierre.Vriens
  • 36k
  • 40
  • 50
  • 182

How do I add userpoints directly to the databaseuse User Points for storing Quiz scores?

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but mI'm getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How do I add userpoints directly to the database?

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How to use User Points for storing Quiz scores?

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but I'm getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How can I add points directly to the User PointsUser Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
);

userpoints_userpointsapi($params);

How can I add points directly to the userpointsUser Points database? I have a quiz site and would like to use the userpointUser Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

(1) Notice: Undefined variable: user in ...
(2) Notice: Trying to get property of non-object in .... 

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
        'uid' => $user->uid,
        'description' => 'Totals points from quizes',
        'points' => $percentage,
        'tid' =>127,
        ); 

userpoints_userpointsapi($params);

How can I add points directly to the userpoints database? I have a quiz site and would like to use the userpoint module to store quiz scores instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

(1) Notice: Undefined variable: user in ...
(2) Notice: Trying to get property of non-object in .... 

The code am using is:

$params = array (
        'uid' => $user->uid,
        'description' => 'Totals points from quizes',
        'points' => $percentage,
        'tid' =>127,
        );
userpoints_userpointsapi($params);

How can I add points directly to the User Points database? I have a quiz site and would like to use the User Points module to store quiz scores, instead of creating something from scratch. I have created a taxonomy "Quiz" for such points.

Every quiz ends by showing the score made (between 0 to 100 depending on how many answers they got right). I would like to go on and store this in the userpoint database.

I am using the following code but m getting 2 error messages:

Notice: Undefined variable: user in ...
Notice: Trying to get property of non-object in ....

The code I am using is the following one:

$params = array (
  'uid' => $user->uid,
  'description' => 'Totals points from quizes',
  'points' => $percentage,
  'tid' =>127,
); 

userpoints_userpointsapi($params);
added 420 characters in body
Source Link
Albert
  • 61
  • 1
  • 3
Loading
Source Link
Albert
  • 61
  • 1
  • 3
Loading