Class: lp_item

Source Location: /lp_item.class.php

Class Overview [line 12]


lp_item defines items belonging to a learnpath. Each item has a name, a score, a use time and additional

Author(s):

Version:

Copyright:

Variables

Methods


Inherited Variables

Inherited Methods



Class Details

lp_item defines items belonging to a learnpath. Each item has a name, a score, a use time and additional

information that enables tracking a user's progress in a learning path

[ Top ]


Class Variables

$attempts =

[line 13]

Type: mixed

Overrides:

[ Top ]

$condition =

[line 14]

Type: mixed

Overrides:

[ Top ]

$current_score =

[line 15]

Type: mixed

Overrides:

[ Top ]

$current_start_time =

[line 16]

Type: mixed

Overrides:

[ Top ]

$current_stop_time =

[line 17]

Type: mixed

Overrides:

[ Top ]

$db_id =

[line 18]

Type: mixed

Overrides:

[ Top ]

$file =

[line 19]

Type: mixed

Overrides:

[ Top ]

$max_score =

[line 21]

Type: mixed

Overrides:

[ Top ]

$min_score =

[line 22]

Type: mixed

Overrides:

[ Top ]

$name =

[line 23]

Type: mixed

Overrides:

[ Top ]

$next =

[line 24]

Type: mixed

Overrides:

[ Top ]

$parent =

[line 25]

Type: mixed

Overrides:

[ Top ]

$possible_status = array('Not attempted','Incomplete','Complete','Passed','Failed','Succeeded')

[line 30]

Type: mixed

Overrides:

[ Top ]

$previous =

[line 26]

Type: mixed

Overrides:

[ Top ]

$saveOnClose =

[line 27]

Type: mixed

Overrides:

[ Top ]

$status =

[line 28]

Type: mixed

Overrides:

[ Top ]

$title =

[line 29]

Type: mixed

Overrides:

[ Top ]


Class Methods

lp_item

boolean lp_item( integer $db_id, integer $user_id)

[line 38]

Class constructor. Prepares the learnpath_item for later launch

Tags:

  • return - True on success, false on failure

Parameters:

  • integer $db_id - Learnpath item ID
  • integer $user_id - User ID

[ Top ]

close

boolean close( )

[line 57]

Closes/stops the item viewing. Finalises runtime values. If required, save to DB.

Tags:

  • return - True on success, false otherwise

Parameters:

[ Top ]

get_attempts

integer get_attempts( )

[line 70]

Gets the number of attempts for this user on this item, so far

Tags:

  • return - The number of attempts already done on this item by this user, or 0 if none defined

Parameters:

[ Top ]

get_score

float get_score( )

[line 82]

Gets the score

Tags:

  • return - The current score or 0 if no score set yet

Parameters:

[ Top ]

get_status

string get_status( )

[line 94]

Gets the item status

Tags:

  • return - Current status or 'Not attempted' if no status set yet

Parameters:

[ Top ]

open

boolean open( )

[line 106]

Opens/launches the item. Initialises runtime values.

Tags:

  • return - True on success, false on failure.

Parameters:

[ Top ]

save

boolean save( )

[line 114]

Saves data in the database

Tags:

  • return - True on success, false on failure

Parameters:

[ Top ]

set_attempts

boolean set_attempts( integer $num)

[line 141]

Sets the number of attempts to a given value

Tags:

  • return - TRUE on success, FALSE otherwise

Parameters:

  • integer $num - The given value to set attempts to

[ Top ]

set_score

boolean set_score( float $score)

[line 154]

Sets the score value

Tags:

  • return - True on success, false otherwise

Parameters:

  • float $score - Score

[ Top ]

set_status

boolean set_status( string $status)

[line 171]

Sets the status for this item

Tags:

  • return - True on success, false on error

Parameters:

  • string $status - Status - must be one of the values defined in $this->possible_status

[ Top ]


Documentation generated on Sun, 22 Jan 2006 23:26:40 +0000 by phpDocumentor 1.2.3