ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjCourseVerificationGUI Class Reference

GUI class for course verification. More...

+ Inheritance diagram for ilObjCourseVerificationGUI:
+ Collaboration diagram for ilObjCourseVerificationGUI:

Public Member Functions

 getType ()
 Functions that must be overwritten.
 create ()
 List all tests in which current user participated.
 save ()
 create new instance and save it
 deliver ()
 render ($a_return=false, $a_url=false)
 Render content.
 downloadFromPortfolioPage (ilPortfolioPage $a_page)
 _goto ($a_target)
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor.
executeCommand ()
 execute command
 delete ()
 Display delete confirmation form (repository/workspace switch)
 confirmedDelete ()
 Delete objects (repository/workspace switch)
 getHTML ()
 withReferences ()
 Final/Private declaration of unchanged parent methods.
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 isVisible ()
 trash ()
 undelete ()
 cancelDelete ()
 removeFromSystem ()
 cloneAll ()
 view ()
 view object content (repository/workspace switch)
 edit ()
 update ()
 cancel ()
 importFile ()
 Import.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Data Fields inherited from ilObject2GUI
 $tree
const OBJECT_ID = 0
const REPOSITORY_NODE_ID = 1
const WORKSPACE_NODE_ID = 2
const REPOSITORY_OBJECT_ID = 3
const WORKSPACE_OBJECT_ID = 4
const PORTFOLIO_OBJECT_ID = 5
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here.
 assignObject ()
 create object instance as internal property (repository/workspace switch)
 getAccessHandler ()
 Get access handler.
 setLocator ()
 set Locator
 deleteConfirmation ()
 Display delete confirmation form (workspace specific)
 deleteConfirmedObjects ()
 Delete objects (workspace specific)
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 omitLocator ($a_omit=true)
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 redirectToRefId ()
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 searchCloneSource ()
 buildCloneSelect ($existing_objs)
 addAdminLocatorItems ()
 setTabs ()
 create tabs (repository/workspace switch)
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 addLocatorItems ()
 Functions to be overwritten.
 initCreationForms ($a_new_type)
 Init creation froms.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 redrawHeaderAction ()
 Updating icons after ajax call.
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- Protected Attributes inherited from ilObject2GUI
 $object_id
 $node_id
 $creation_forms = array()
 $id_type = array()
 $parent_id
 $access_handler

Detailed Description

GUI class for course verification.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
Id:
class.ilPersonalDesktopGUI.php 26976 2010-12-16 13:24:38Z akill

ilObjCourseVerificationGUI: ilWorkspaceAccessGUI

Definition at line 17 of file class.ilObjCourseVerificationGUI.php.

Member Function Documentation

ilObjCourseVerificationGUI::_goto (   $a_target)

Definition at line 162 of file class.ilObjCourseVerificationGUI.php.

References $_GET, and exit.

{
$id = explode("_", $a_target);
$_GET["baseClass"] = "ilsharedresourceGUI";
$_GET["wsp_id"] = $id[0];
include("ilias.php");
}
ilObjCourseVerificationGUI::create ( )

List all tests in which current user participated.

Reimplemented from ilObject2GUI.

Definition at line 27 of file class.ilObjCourseVerificationGUI.php.

References ilDiskQuotaHandler\isUploadPossible(), and ilUtil\sendFailure().

Referenced by save().

{
global $ilTabs;
if($this->id_type == self::WORKSPACE_NODE_ID)
{
include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
{
$this->lng->loadLanguageModule("file");
ilUtil::sendFailure($this->lng->txt("personal_workspace_quota_exceeded_warning"), true);
$this->ctrl->redirect($this, "cancel");
}
}
$this->lng->loadLanguageModule("crsv");
$ilTabs->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "cancel"));
include_once "Modules/Course/classes/Verification/class.ilCourseVerificationTableGUI.php";
$table = new ilCourseVerificationTableGUI($this, "create");
$this->tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseVerificationGUI::deliver ( )

Definition at line 87 of file class.ilObjCourseVerificationGUI.php.

References $file, and ilUtil\deliverFile().

Referenced by downloadFromPortfolioPage(), and render().

{
$file = $this->object->getFilePath();
if($file)
{
ilUtil::deliverFile($file, $this->object->getTitle().".pdf");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseVerificationGUI::downloadFromPortfolioPage ( ilPortfolioPage  $a_page)

Definition at line 149 of file class.ilObjCourseVerificationGUI.php.

References $ilErr, deliver(), ilPortfolioPage\getType(), and ilPCVerification\isInPortfolioPage().

{
global $ilErr;
include_once "Services/COPage/classes/class.ilPCVerification.php";
if(ilPCVerification::isInPortfolioPage($a_page, $this->object->getType(), $this->object->getId()))
{
$this->deliver();
}
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->MESSAGE);
}

+ Here is the call graph for this function:

ilObjCourseVerificationGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 19 of file class.ilObjCourseVerificationGUI.php.

{
return "crsv";
}
ilObjCourseVerificationGUI::render (   $a_return = false,
  $a_url = false 
)

Render content.

Parameters
bool$a_return
string$a_url

Definition at line 102 of file class.ilObjCourseVerificationGUI.php.

References ilObject2GUI\$access_handler, $ilUser, ilObjectGUI\$lng, ilObject2GUI\$tree, $valid, deliver(), and ilObject2GUI\getAccessHandler().

{
global $ilUser, $lng;
if(!$a_return)
{
$this->deliver();
}
else
{
$tree = new ilWorkspaceTree($ilUser->getId());
$wsp_id = $tree->lookupNodeId($this->object->getId());
$caption = $lng->txt("wsp_type_crsv").' "'.$this->object->getTitle().'"';
$valid = true;
if(!file_exists($this->object->getFilePath()))
{
$valid = false;
$message = $lng->txt("url_not_found");
}
else if(!$a_url)
{
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
if(!$access_handler->checkAccess("read", "", $wsp_id))
{
$valid = false;
$message = $lng->txt("permission_denied");
}
}
if($valid)
{
if(!$a_url)
{
$a_url = $this->getAccessHandler()->getGotoLink($wsp_id, $this->object->getId());
}
return '<div><a href="'.$a_url.'">'.$caption.'</a></div>';
}
else
{
return '<div>'.$caption.' ('.$message.')</div>';
}
}
}

+ Here is the call graph for this function:

ilObjCourseVerificationGUI::save ( )

create new instance and save it

Reimplemented from ilObject2GUI.

Definition at line 55 of file class.ilObjCourseVerificationGUI.php.

References $_REQUEST, $ilUser, ilObject2GUI\$node_id, ilObject2GUI\$parent_id, ilObjectGUI\afterSave(), create(), ilObjCourseVerification\createFromCourse(), ilObject2GUI\putObjectInTree(), and ilUtil\sendFailure().

{
global $ilUser;
$course_id = $_REQUEST["crs_id"];
if($course_id)
{
include_once "Modules/Course/classes/class.ilObjCourse.php";
$course = new ilObjCourse($course_id, false);
include_once "Modules/Course/classes/Verification/class.ilObjCourseVerification.php";
$newObj = ilObjCourseVerification::createFromCourse($course, $ilUser->getId());
if($newObj)
{
$this->node_id = null;
$this->putObjectInTree($newObj, $parent_id);
$this->afterSave($newObj);
}
else
{
ilUtil::sendFailure($this->lng->txt("msg_failed"));
}
}
else
{
ilUtil::sendFailure($this->lng->txt("select_one"));
}
$this->create();
}

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: