ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilLMPageGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
15{
19 protected $db;
20
24 public function __construct($a_id = 0, $a_old_nr = 0, $a_prevent_get_id = false, $a_lang = "")
25 {
26 global $DIC;
27
28 $this->lng = $DIC->language();
29 $this->user = $DIC->user();
30 $this->db = $DIC->database();
31 $this->plugin_admin = $DIC["ilPluginAdmin"];
32 $this->log = $DIC["ilLog"];
33 parent::__construct("lm", $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
34
35 $this->getPageConfig()->setUseStoredQuestionTries(ilObjContentObject::_lookupStoreTries($this->getPageObject()->getParentId()));
36 }
37
42 {
44
45 if (strtolower($_GET["cmdClass"]) == "ilassquestionfeedbackeditinggui") {
47 ilUtil::sendInfo($lng->txt("cont_def_feedb_deactivated"));
48 } else {
49 ilUtil::sendInfo($lng->txt("cont_def_feedb_activated"));
50 }
51 }
52 }
53
57 public function processAnswer()
58 {
62 $ilPluginAdmin = $this->plugin_admin;
64
65 parent::processAnswer();
66
67 //
68 // Send notifications to authors that want to be informed on blocked users
69 //
70
71 $parent_id = ilPageObject::lookupParentId((int) $_GET["page_id"], "lm");
72
73 // is restriction mode set?
75 // check if user is blocked
76 $id = ilUtil::stripSlashes($_POST["id"]);
77
79 // get question information
80 $qlist = new ilAssQuestionList($ilDB, $lng, $ilPluginAdmin);
81 $qlist->setParentObjId(0);
82 $qlist->setJoinObjectData(false);
83 $qlist->addFieldFilter("question_id", array($id));
84 $qlist->load();
85 $qdata = $qlist->getQuestionDataArray();
86 // has the user been blocked?
87 if ($as["try"] >= $qdata[$as["qst_id"]]["nr_of_tries"] && $qdata[$as["qst_id"]]["nr_of_tries"] > 0 && !$as["passed"]) {
89
90 if (count($users) > 0) {
91 $not = new ilLMMailNotification();
93 $not->setQuestionId($id);
94 $not->setRefId((int) $_GET["ref_id"]);
95 $not->setRecipients($users);
96 $not->send();
97 }
98 }
99 }
100 }
101}
user()
Definition: user.php:4
$_GET["client_id"]
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
Extension of ilPageObjectGUI for learning modules.
onFeedbackEditingForwarding()
On feedback editing forwarding.
processAnswer()
Process answer.
__construct($a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
static getNotificationsForObject($type, $id, $page_id=null, $ignore_threshold=false)
Get all users for given object.
static _lookupRestrictForwardNavigation($a_obj_id)
Lookup forward restriction navigation.
static _lookupStoreTries($a_id)
Lookup disable default feedback.
static _lookupDisableDefaultFeedback($a_id)
Lookup disable default feedback.
Class ilPageObjectGUI.
getPageObject()
Get Page Object.
getPageConfig()
Get page config object.
static lookupParentId($a_id, $a_type)
Lookup parent id.
static getAnswerStatus($a_q_id, $a_user_id=0)
Get statistics for question.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilDB
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46