ILIAS
Release_5_0_x_branch Revision 61816
|
Class ilRatingGUI. More...
Public Member Functions | |
__construct () | |
& | executeCommand () |
execute command | |
setObject ($a_obj_id, $a_obj_type, $a_sub_obj_id=0, $a_sub_obj_type="") | |
Set Object. | |
setUserId ($a_userid) | |
Set User ID. | |
getUserId () | |
Get User ID. | |
setYourRatingText ($a_val) | |
Set "Your Rating" text. | |
getYourRatingText () | |
Get "Your Rating" text. | |
enableCategories ($a_value) | |
Toggle categories status. | |
setCtrlPath (array $a_value) | |
ilCtrl path | |
getHTML ($a_show_overall=true, $a_may_rate=true, $a_onclick=null, $a_additional_id=null) | |
Get HTML for rating of an object (and a user) | |
getBlockHTML ($a_title) | |
saveRating () | |
Save Rating. | |
setUpdateCallback ($a_callback) | |
resetUserRating () | |
Reset Rating. | |
setExportCallback ($a_callback, $a_subobj_title) | |
getListGUIProperty ($a_ref_id, $a_may_rate, $a_ajax_hash, $_parent_ref_id) | |
Build list gui property for object. |
Protected Member Functions | |
renderDetails ($a_js_id, $a_may_rate, array $a_categories=null, $a_onclick=null, $a_average=false) | |
Render rating details. |
Protected Attributes | |
$id = "rtg_" | |
$export_callback | |
$export_subobj_title | |
$ctrl_path |
Class ilRatingGUI.
User interface class for rating.
ilRatingGUI: ilRatingCategoryGUI
Definition at line 17 of file class.ilRatingGUI.php.
ilRatingGUI::__construct | ( | ) |
Definition at line 24 of file class.ilRatingGUI.php.
References $lng.
ilRatingGUI::enableCategories | ( | $a_value | ) |
Toggle categories status.
bool | $a_value |
Definition at line 128 of file class.ilRatingGUI.php.
& ilRatingGUI::executeCommand | ( | ) |
execute command
Definition at line 34 of file class.ilRatingGUI.php.
ilRatingGUI::getBlockHTML | ( | $a_title | ) |
Definition at line 569 of file class.ilRatingGUI.php.
References ilRatingCategory\getAllForObject(), getUserId(), and renderDetails().
ilRatingGUI::getHTML | ( | $a_show_overall = true , |
|
$a_may_rate = true , |
|||
$a_onclick = null , |
|||
$a_additional_id = null |
|||
) |
Get HTML for rating of an object (and a user)
bool | $a_show_overall | |
bool | $a_may_rate | |
string | $a_onclick | |
string | $a_additional_id |
Definition at line 427 of file class.ilRatingGUI.php.
References $id, $lng, ilTooltipGUI\addTooltip(), ilRatingCategory\getAllForObject(), ilUtil\getImagePath(), ilRating\getOverallRatingForObject(), ilRating\getRatingForUserAndObject(), getUserId(), and renderDetails().
Referenced by getListGUIProperty().
ilRatingGUI::getListGUIProperty | ( | $a_ref_id, | |
$a_may_rate, | |||
$a_ajax_hash, | |||
$_parent_ref_id | |||
) |
Build list gui property for object.
int | $a_ref_id | |
bool | $a_may_rate | |
string | $a_ajax_hash | |
int | $_parent_ref_id |
Definition at line 661 of file class.ilRatingGUI.php.
References getHTML().
ilRatingGUI::getUserId | ( | ) |
Get User ID.
Definition at line 98 of file class.ilRatingGUI.php.
Referenced by getBlockHTML(), getHTML(), renderDetails(), resetUserRating(), and saveRating().
ilRatingGUI::getYourRatingText | ( | ) |
Get "Your Rating" text.
Definition at line 118 of file class.ilRatingGUI.php.
Referenced by renderDetails().
|
protected |
Render rating details.
string | $a_js_id | |
bool | $a_may_rate | |
array | $a_categories | |
bool | $a_onclick | |
bool | $a_average |
Definition at line 153 of file class.ilRatingGUI.php.
References $ilCtrl, $lng, ilUtil\getImagePath(), ilRating\getOverallRatingForObject(), ilRating\getRatingForUserAndObject(), getUserId(), and getYourRatingText().
Referenced by getBlockHTML(), and getHTML().
ilRatingGUI::resetUserRating | ( | ) |
Reset Rating.
Definition at line 640 of file class.ilRatingGUI.php.
References getUserId(), and ilRating\resetRatingForUserAndObject().
Referenced by saveRating().
ilRatingGUI::saveRating | ( | ) |
Save Rating.
Definition at line 592 of file class.ilRatingGUI.php.
References $_GET, $_POST, $_REQUEST, $ilCtrl, exit, getUserId(), resetUserRating(), ilUtil\stripSlashes(), and ilRating\writeRatingForUserAndObject().
ilRatingGUI::setCtrlPath | ( | array | $a_value | ) |
ilCtrl path
array | $a_value |
Definition at line 138 of file class.ilRatingGUI.php.
ilRatingGUI::setExportCallback | ( | $a_callback, | |
$a_subobj_title | |||
) |
Definition at line 646 of file class.ilRatingGUI.php.
ilRatingGUI::setObject | ( | $a_obj_id, | |
$a_obj_type, | |||
$a_sub_obj_id = 0 , |
|||
$a_sub_obj_type = "" |
|||
) |
Set Object.
int | $a_obj_id | Object ID |
string | $a_obj_type | Object Type |
int | $a_sub_obj_id | Subobject ID |
string | $a_sub_obj_type | Subobject Type |
Definition at line 63 of file class.ilRatingGUI.php.
References $ilUser, and setUserId().
ilRatingGUI::setUpdateCallback | ( | $a_callback | ) |
Definition at line 632 of file class.ilRatingGUI.php.
ilRatingGUI::setUserId | ( | $a_userid | ) |
Set User ID.
int | $a_userid | User ID |
Definition at line 88 of file class.ilRatingGUI.php.
Referenced by setObject().
ilRatingGUI::setYourRatingText | ( | $a_val | ) |
Set "Your Rating" text.
string | $a_val | text |
Definition at line 108 of file class.ilRatingGUI.php.
|
protected |
Definition at line 22 of file class.ilRatingGUI.php.
|
protected |
Definition at line 20 of file class.ilRatingGUI.php.
|
protected |
Definition at line 21 of file class.ilRatingGUI.php.
|
protected |
Definition at line 19 of file class.ilRatingGUI.php.
Referenced by getHTML().