ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilExerciseUIRequest.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
16
21
26
30 protected $ass = null;
31
35 protected $exc = null;
36
40 public function __construct(array $query_params, array $post_data)
41 {
42 $this->requested_ref_id = (int) $query_params["ref_id"];
43 $this->requested_ass_id = ($post_data["ass_id"])
44 ? (int) $post_data["ass_id"]
45 : (int) $query_params["ass_id"];
46 $this->requested_member_id = ($post_data["member_id"])
47 ? (int) $post_data["member_id"]
48 : (int) $query_params["member_id"];
49
50 if ($this->getRequestedAssId() > 0) {
51 $this->ass = new ilExAssignment($this->getRequestedAssId());
52 }
53 if ($this->getRequestedRefId() > 0 && ilObject::_lookupType($this->getRequestedRefId(), true) == "exc") {
54 $this->exc = new ilObjExercise($this->getRequestedRefId());
55 }
56 }
57
61 public function getRequestedRefId() : int
62 {
64 }
65
69 public function getRequestedAssId() : int
70 {
72 }
73
77 public function getRequestedMemberId() : int
78 {
80 }
81
85 public function getRequestedExercise()
86 {
87 return $this->exc;
88 }
89
93 public function getRequestedAssignment()
94 {
95 return $this->ass;
96 }
97}
An exception for terminatinating execution or to throw for unit testing.
Exercise assignment.
__construct(array $query_params, array $post_data)
Constructor.
Class ilObjExercise.
static _lookupType($a_id, $a_reference=false)
lookup object type