5 include_once
"Modules/Exercise/classes/class.ilExcCriteria.php";
38 parent::__construct();
39 $this->tpl = $DIC[
"tpl"];
40 $this->ctrl = $DIC->ctrl();
41 $this->lng = $DIC->language();
57 $tpl->addJavaScript(
"Modules/Exercise/js/ilExcPeerReview.js");
58 $tpl->addOnLoadCode(
"il.ExcPeerReview.setAjax('" .
59 $ilCtrl->getLinkTargetByClass(
"ilExPeerReviewGUI",
"updateCritAjax",
"",
true,
false) .
62 $field_id =
"prccc_rating_" . $this->
getId();
68 $this->form->addItem($input);
72 array_key_exists(
"cmd",
$_POST)) {
76 $this->form_item = $input;
82 ?
"peer_" . (int) $this->
getId()
88 include_once
'./Services/Rating/classes/class.ilRatingGUI.php';
96 $rating->setUserId($this->giver_id);
98 $ajax_id = $this->
getId()
99 ? (int) $this->
getId()
102 if (!(
bool) $a_read_only) {
103 $html =
'<div class="crit_widget">' .
104 $rating->getHTML(
false,
true,
"il.ExcPeerReview.saveCrit(this, " . $this->peer_id .
", " . $ajax_id .
", %rating%)") .
107 $html = $rating->getHTML(
false,
false);
121 include_once
'./Services/Rating/classes/class.ilRating.php';
133 return $this->
renderWidget($a_ass, $a_giver_id, $a_peer_id);
143 $this->form->getItemByPostVar(
"prccc_rating_" . $this->
getId())->setAlert(
$lng->txt(
"msg_input_is_required"));
153 include_once
'./Services/Rating/classes/class.ilRating.php';
165 return $this->
renderWidget($this->ass, $this->giver_id, $this->peer_id,
true);
170 include_once
'./Services/Rating/classes/class.ilRating.php';
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.