37 $this->tpl = $DIC[
"tpl"];
38 $this->ctrl = $DIC->ctrl();
39 $this->lng = $DIC->language();
55 $tpl->addJavaScript(
"Modules/Exercise/js/ilExcPeerReview.js");
56 $tpl->addOnLoadCode(
"il.ExcPeerReview.setAjax('" .
57 $ilCtrl->getLinkTargetByClass(
"ilExPeerReviewGUI",
"updateCritAjax",
"",
true,
false) .
60 $field_id =
"prccc_rating_" . $this->
getId();
66 $this->form->addItem($input);
70 array_key_exists(
"cmd",
$_POST)) {
74 $this->form_item = $input;
80 ?
"peer_" . (int) $this->
getId()
93 $rating->setUserId($this->giver_id);
95 $ajax_id = $this->
getId()
96 ? (int) $this->
getId()
99 if (!(
bool) $a_read_only) {
100 $html =
'<div class="crit_widget">' .
101 $rating->getHTML(
false,
true,
"il.ExcPeerReview.saveCrit(this, " . $this->peer_id .
", " . $ajax_id .
", %rating%)") .
104 $html = $rating->getHTML(
false,
false);
129 return $this->
renderWidget($a_ass, $a_giver_id, $a_peer_id);
139 $this->form->getItemByPostVar(
"prccc_rating_" . $this->
getId())->setAlert(
$lng->txt(
"msg_input_is_required"));
160 return $this->
renderWidget($this->ass, $this->giver_id, $this->peer_id,
true);
static writeRatingForUserAndObject( $a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id, $a_rating, $a_category_id=0)
Write rating for a user and an object.
importFromPeerReviewForm()
renderWidget($a_read_only=false)
__construct()
Constructor.
static getRatingForUserAndObject( $a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id, $a_category_id=null)
Get rating for a user and an object.
addToPeerReviewForm($a_value=null)
static resetRatingForUserAndObject( $a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id)
Reset rating for a user and an object.
Class ilExcCriteriaRating.
__construct(Container $dic, ilPlugin $plugin)