Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • ClipitActivity
  • ClipitChat
  • ClipitComment
  • ClipitEvent
  • ClipitExample
  • ClipitFile
  • ClipitGroup
  • ClipitLA
  • ClipitLabel
  • ClipitPerformanceItem
  • ClipitPerformanceRating
  • ClipitPost
  • ClipitQuiz
  • ClipitQuizQuestion
  • ClipitQuizResult
  • ClipitRating
  • ClipitRemoteTrickyTopic
  • ClipitRemoteVideo
  • ClipitResource
  • ClipitSite
  • ClipitStoryboard
  • ClipitTag
  • ClipitTagRating
  • ClipitTask
  • ClipitTrickyTopic
  • ClipitUser
  • ClipitVideo
  • Overview
  • Package
  • Class
  • Tree

Class ClipitQuizResult

A Student Result for a Quiz Question, with a link to it, and a boolean value to show whether it is Correct or not.

UBItem
Extended by ClipitQuizResult
Package: ClipIt\clipit\api
License: Affero General Public License v3
Author: Pablo LlinĂ¡s Arnaiz <pebs74@gmail.com>, URJC JuxtaLearn Team
Located at ClipitQuizResult.php
Methods summary
protected
# copy_from_elgg( ElggEntity $elgg_entity )

Loads object parameters stored in Elgg

Loads object parameters stored in Elgg

Parameters

$elgg_entity
ElggEntity
$elgg_entity Elgg Object to load parameters from.

Overrides

UBItem::copy_from_elgg()
protected
# copy_to_elgg( ElggEntity $elgg_entity )

Copy $this object parameters into an Elgg entity.

Copy $this object parameters into an Elgg entity.

Parameters

$elgg_entity
ElggEntity
$elgg_entity Elgg object instance to save $this to

Overrides

UBItem::copy_to_elgg()
protected boolean|integer
# save( boolean $double_save = false )

Saves this instance to the system.

Saves this instance to the system.

Parameters

$double_save
boolean
$double_save if $double_save is true, this object is saved twice to ensure that all properties are updated properly. E.g. the time created property can only beset on ElggObjects during an update. Defaults to false!

Returns

boolean|integer
Returns the Id of the saved instance, or false if error

Overrides

UBItem::save()
public static integer|boolean
# set_properties( integer $id, array $prop_value_array )

Sets values to specified properties of an Item

Sets values to specified properties of an Item

Parameters

$id
integer
$id Id of Item to set property values
$prop_value_array
array
$prop_value_array Array of property=>value pairs to set into the Item

Returns

integer|boolean
Returns Id of Item if correct, or false if error

Throws

InvalidParameterException

Overrides

UBItem::set_properties()
public static
# evaluate_result( mixed $result_id )
public static
# get_quiz_question( mixed $id )
public static array|boolean
# get_by_quiz_question( array $quiz_question_array )

Get Quiz Results by Quiz Questions

Get Quiz Results by Quiz Questions

Parameters

$quiz_question_array
array
$quiz_question_array Array of Quiz Question IDs to get Results form

Returns

array|boolean
Array of Quiz Results nested per Quiz Question IDs, or false if error
public static static
# get_from_question_user( integer $quiz_question_id, integer $user_id )

Returns the ClipitQuizResult ID for a Quiz Question submitted by a User

Returns the ClipitQuizResult ID for a Quiz Question submitted by a User

Parameters

$quiz_question_id
integer
$quiz_question_id
$user_id
integer
$user_id

Returns

static
The Quiz Result, or 0 if none found.
Methods inherited from UBItem
__construct(), count_all(), create(), create_clone(), delete_all(), delete_by_id(), get_all(), get_all_parents(), get_by_id(), get_by_owner(), get_clone_tree(), get_cloned_from(), get_clones(), get_events(), get_from_search(), get_properties(), link_parent_clone(), list_properties(), sort_by_date(), sort_by_date_inv(), sort_by_name(), sort_by_name_inv(), sort_numbers(), sort_numbers_inv(), unlink_from_clones(), unlink_from_parent()
Constants summary
string REL_QUIZRESULT_CLIPITUSER "ClipitQuizResult-ClipitUser"
#
string REL_QUIZRESULT_QUIZQUESTION "ClipitQuizResult-ClipitQuizQuestion"
#
Constants inherited from UBItem
REL_PARENT_CLONE, SUBTYPE, TYPE
Properties summary
public integer $quiz_question 0
#

Id of ClipitQuizQuestion this ClipitQuizResult is related to

Id of ClipitQuizQuestion this ClipitQuizResult is related to

public mixed $answer
#
public boolean $correct false
#

Determines if this Result is correct (true) or incorrect (false) - computed by "evaluate_result"

Determines if this Result is correct (true) or incorrect (false) - computed by "evaluate_result"

Properties inherited from UBItem
$clone_array, $cloned_from, $description, $id, $name, $owner_id, $time_created, $url
API documentation generated by ApiGen 2.8.0