ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLearningProgressBaseGUI Class Reference
+ Inheritance diagram for ilLearningProgressBaseGUI:
+ Collaboration diagram for ilLearningProgressBaseGUI:

Public Member Functions

 ilLearningProgressBaseGUI ($a_mode, $a_ref_id=0, $a_usr_id=0)
 
 isAnonymized ()
 
 getMode ()
 
 getRefId ()
 
 getObjId ()
 
 getUserId ()
 
 activateStatistics ($a_act=true)
 
 __getDefaultCommand ()
 
 __setSubTabs ($a_active)
 
 __buildFooter ()
 
 __buildHeader ()
 
 __insertPath (&$a_tpl, $a_ref_id)
 insert path More...
 
 __showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
 _getImagePathForStatus ($a_status)
 Get image path for status. More...
 
 _getStatusText ($a_status)
 Get status alt text. More...
 
__initTableGUI ()
 
 __showObjectDetails (&$info, $item_id=0)
 show details about current object. More...
 
 __appendUserInfo (&$info, $a_user)
 
 __appendLPDetails (&$info, $item_id, $user_id)
 
 __readStatus ($a_obj_id, $user_id)
 
 __showButton ($a_link, $a_text, $a_target='')
 
 __sort ($a_ids, $a_table, $a_field, $a_id_name)
 Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. More...
 
 __getPercent ($max, $reached)
 
 __readItemStatusInfo ($a_items)
 
 __getLegendHTML ()
 
 __showEditUser ($a_user_id, $a_ref_id, $a_cancel, $a_sub_id=false)
 
 __updateUser ($user_id, $obj_id)
 

Static Public Member Functions

static _showImageByStatus (&$tpl, $a_status, $tpl_prefix="")
 
static isObjectOffline ($a_obj_id, $a_type=null)
 

Data Fields

 $tpl = null
 
 $ctrl = null
 
 $lng = null
 
 $ref_id = 0
 
 $mode = 0
 
 $statistics_activated = false
 
const LP_CONTEXT_PERSONAL_DESKTOP = 1
 
const LP_CONTEXT_ADMINISTRATION = 2
 
const LP_CONTEXT_REPOSITORY = 3
 
const LP_CONTEXT_USER_FOLDER = 4
 
const LP_CONTEXT_ORG_UNIT = 5
 
const LP_ACTIVE_SETTINGS = 1
 
const LP_ACTIVE_OBJECTS = 2
 
const LP_ACTIVE_PROGRESS = 3
 
const LP_ACTIVE_LM_STATISTICS = 4
 
const LP_ACTIVE_USERS = 5
 
const LP_ACTIVE_SUMMARY = 6
 
const LP_ACTIVE_OBJSTATACCESS = 7
 
const LP_ACTIVE_OBJSTATTYPES = 8
 
const LP_ACTIVE_OBJSTATDAILY = 9
 
const LP_ACTIVE_OBJSTATADMIN = 10
 
const LP_ACTIVE_MATRIX = 11
 

Protected Attributes

 $anonymized
 

Detailed Description

Definition at line 21 of file class.ilLearningProgressBaseGUI.php.

Member Function Documentation

◆ __appendLPDetails()

ilLearningProgressBaseGUI::__appendLPDetails ( $info,
  $item_id,
  $user_id 
)

Definition at line 457 of file class.ilLearningProgressBaseGUI.php.

References $comment, __readStatus(), _getImagePathForStatus(), ilLearningProgress\_getProgress(), _getStatusText(), ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilFormat\_secondsToString(), ilDatePresentation\formatDate(), IL_CAL_DATETIME, and ilUtil\img().

Referenced by ilLPListOfProgressGUI\details().

458  {
459  global $ilObjDataCache;
460 
461  $type = $ilObjDataCache->lookupType($item_id);
462 
463  // Section learning_progress
464  $info->addSection($this->lng->txt('trac_learning_progress'));
465 
466  switch($type)
467  {
468  case 'lm':
469  case 'htlm':
470  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
471  $progress = ilLearningProgress::_getProgress($user_id,$item_id);
472 
473  if($progress['access_time'])
474  {
475  $info->addProperty($this->lng->txt('last_access'),
476  ilDatePresentation::formatDate(new ilDateTime($progress['access_time'],IL_CAL_DATETIME)));
477  }
478  else
479  {
480  $info->addProperty($this->lng->txt('last_access'),$this->lng->txt('trac_not_accessed'));
481  }
482  $info->addProperty($this->lng->txt('trac_visits'),(int) $progress['visits']);
483  if($type == 'lm')
484  {
485  $info->addProperty($this->lng->txt('trac_spent_time'),ilFormat::_secondsToString($progress['spent_seconds']));
486  }
487 
488  // display status as image
489  include_once("./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
490  $status = $this->__readStatus($item_id,$user_id);
492  $status_text = ilLearningProgressBaseGUI::_getStatusText($status);
493  $info->addProperty($this->lng->txt('trac_status'),
494  ilUtil::img($status_path, $status_text)." ".$status_text);
495  break;
496 
497  case 'exc':
498  case 'tst':
499  case 'crs':
500  case 'sahs':
501  case 'grp':
502  // display status as image
503  include_once("./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
504  $status = $this->__readStatus($item_id,$user_id);
506  $status_text = ilLearningProgressBaseGUI::_getStatusText($status);
507  $info->addProperty($this->lng->txt('trac_status'),
508  ilUtil::img($status_path, $status_text)." ".$status_text);
509  break;
510 
511  }
512 
513  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
514  if(strlen($mark = ilLPMarks::_lookupMark($user_id,$item_id)))
515  {
516  $info->addProperty($this->lng->txt('trac_mark'),$mark);
517  }
518  if(strlen($comment = ilLPMarks::_lookupComment($user_id,$item_id)))
519  {
520  $info->addProperty($this->lng->txt('trac_comment'),$comment);
521  }
522  }
_getProgress($a_user_id, $a_obj_id)
const IL_CAL_DATETIME
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
_lookupMark($a_usr_id, $a_obj_id)
_getImagePathForStatus($a_status)
Get image path for status.
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
_getStatusText($a_status)
Get status alt text.
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
$comment
Definition: buildRTE.php:83
_lookupComment($a_usr_id, $a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __appendUserInfo()

ilLearningProgressBaseGUI::__appendUserInfo ( $info,
  $a_user 
)

Definition at line 432 of file class.ilLearningProgressBaseGUI.php.

References $ilUser, ilFormat\_secondsToString(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), and IL_CAL_DATETIME.

Referenced by ilLPListOfProgressGUI\__showProgressList(), ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\editUser(), and ilLPListOfObjectsGUI\userDetails().

433  {
434  global $ilUser;
435 
436  // #13525 - irrelevant personal data is not to be presented
437  return;
438 
439  if(!is_object($a_user))
440  {
441  $a_user = ilObjectFactory::getInstanceByObjId($a_user);
442  }
443 
444  if($a_user->getId() != $ilUser->getId())
445  {
446  $info->addSection($this->lng->txt("trac_user_data"));
447  // $info->addProperty($this->lng->txt('username'),$a_user->getLogin());
448  // $info->addProperty($this->lng->txt('name'),$a_user->getFullname());
449  $info->addProperty($this->lng->txt('last_login'),
450  ilDatePresentation::formatDate(new ilDateTime($a_user->getLastLogin(),IL_CAL_DATETIME)));
451  $info->addProperty($this->lng->txt('trac_total_online'),
452  ilFormat::_secondsToString(ilOnlineTracking::getOnlineTime($a_user->getId())));
453  return true;
454  }
455  }
const IL_CAL_DATETIME
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildFooter()

ilLearningProgressBaseGUI::__buildFooter ( )

Definition at line 231 of file class.ilLearningProgressBaseGUI.php.

References getMode().

Referenced by ilLearningProgressGUI\executeCommand().

232  {
233  switch($this->getMode())
234  {
235  case self::LP_CONTEXT_PERSONAL_DESKTOP:
236 
237  $this->tpl->show(true);
238  }
239  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __buildHeader()

ilLearningProgressBaseGUI::__buildHeader ( )

Definition at line 241 of file class.ilLearningProgressBaseGUI.php.

References getMode(), and ilUtil\infoPanel().

Referenced by ilLearningProgressGUI\executeCommand().

242  {
243  if($this->getMode() == self::LP_CONTEXT_PERSONAL_DESKTOP)
244  {
245  //$this->tpl->setCurrentBlock("header_image");
246  //$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_pd_b.png"));
247  //$this->tpl->parseCurrentBlock();
248  //$this->tpl->setVariable("HEADER",$this->lng->txt("personal_desktop"));
249  $this->tpl->setTitle($this->lng->txt("learning_progress"));
250 
251  // set locator
252 /*
253  $this->tpl->setVariable("TXT_LOCATOR", $this->lng->txt("locator"));
254  $this->tpl->touchBlock("locator_separator");
255  $this->tpl->touchBlock("locator_item");
256  //$this->tpl->setCurrentBlock("locator_item");
257  //$this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop"));
258  //$this->tpl->setVariable("LINK_ITEM",
259  // $this->ctrl->getLinkTargetByClass("ilpersonaldesktopgui"));
260  //$this->tpl->parseCurrentBlock();
261 
262  $this->tpl->setCurrentBlock("locator_item");
263  $this->tpl->setVariable("ITEM", $this->lng->txt("learning_progress"));
264  $this->tpl->setVariable("LINK_ITEM",
265  $this->ctrl->getLinkTargetByClass('illearningprogressgui'));
266  $this->tpl->parseCurrentBlock();
267 */
268 
269  // display infopanel if something happened
271  }
272 
273  }
static infoPanel($a_keep=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getDefaultCommand()

ilLearningProgressBaseGUI::__getDefaultCommand ( )

Definition at line 114 of file class.ilLearningProgressBaseGUI.php.

References $cmd.

Referenced by ilLPListOfSettingsGUI\executeCommand(), ilLPListOfObjectsGUI\executeCommand(), ilLPListOfProgressGUI\executeCommand(), ilLPObjectStatisticsGUI\executeCommand(), and ilLMStatisticsGUI\executeCommand().

115  {
116  if(strlen($cmd = $this->ctrl->getCmd()))
117  {
118  return $cmd;
119  }
120  return 'show';
121  }
$cmd
Definition: sahs_server.php:35
+ Here is the caller graph for this function:

◆ __getLegendHTML()

ilLearningProgressBaseGUI::__getLegendHTML ( )

Definition at line 647 of file class.ilLearningProgressBaseGUI.php.

References $lng, and ilUtil\getImagePath().

Referenced by ilLPListOfObjectsGUI\__listObjects(), ilLPListOfProgressGUI\__showProgressList(), ilLPListOfObjectsGUI\__showUsersList(), ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\showUserObjectMatrix(), and ilLPListOfObjectsGUI\userDetails().

648  {
649  global $lng;
650 
651  $tpl = new ilTemplate("tpl.lp_legend.html", true, true, "Services/Tracking");
652  $tpl->setVariable("IMG_NOT_ATTEMPTED",
653  ilUtil::getImagePath("scorm/not_attempted.png"));
654  $tpl->setVariable("IMG_IN_PROGRESS",
655  ilUtil::getImagePath("scorm/incomplete.png"));
656  $tpl->setVariable("IMG_COMPLETED",
657  ilUtil::getImagePath("scorm/completed.png"));
658  $tpl->setVariable("IMG_FAILED",
659  ilUtil::getImagePath("scorm/failed.png"));
660  $tpl->setVariable("TXT_NOT_ATTEMPTED",
661  $lng->txt("trac_not_attempted"));
662  $tpl->setVariable("TXT_IN_PROGRESS",
663  $lng->txt("trac_in_progress"));
664  $tpl->setVariable("TXT_COMPLETED",
665  $lng->txt("trac_completed"));
666  $tpl->setVariable("TXT_FAILED",
667  $lng->txt("trac_failed"));
668  return $tpl->get();
669  }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __getPercent()

ilLearningProgressBaseGUI::__getPercent (   $max,
  $reached 
)

Definition at line 605 of file class.ilLearningProgressBaseGUI.php.

606  {
607  if(!$max)
608  {
609  return "0%";
610  }
611 
612  return sprintf("%d%%",$reached / $max * 100);
613  }

◆ __initTableGUI()

& ilLearningProgressBaseGUI::__initTableGUI ( )

Definition at line 389 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilLMStatisticsGUI\__showSearchGroupTable(), ilLMStatisticsGUI\__showSearchRoleTable(), and ilLMStatisticsGUI\__showSearchUserTable().

390  {
391  include_once "./Services/Table/classes/class.ilTableGUI.php";
392 
393  return new ilTableGUI(0,false);
394  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __insertPath()

ilLearningProgressBaseGUI::__insertPath ( $a_tpl,
  $a_ref_id 
)

insert path

Definition at line 278 of file class.ilLearningProgressBaseGUI.php.

References $data, and $path.

279  {
280  global $tree;
281 
282  $path_arr = $tree->getPathFull($a_ref_id);
283  $counter = 0;
284  foreach($tree->getPathFull($a_ref_id) as $data)
285  {
286  if($counter++)
287  {
288  $path .= " -> ";
289  }
290  $path .= $data['title'];
291  }
292  $a_tpl->setCurrentBlock("path_item");
293  $a_tpl->setVariable("PATH_ITEM",$path);
294  $a_tpl->parseCurrentBlock();
295 
296  $a_tpl->setCurrentBlock("path");
297  $a_tpl->parseCurrentBlock();
298 
299  return $path;
300  }
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
$path
Definition: index.php:22

◆ __readItemStatusInfo()

ilLearningProgressBaseGUI::__readItemStatusInfo (   $a_items)

Definition at line 615 of file class.ilLearningProgressBaseGUI.php.

References ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupVisits(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_SCORM, ilLPObjSettings\LP_MODE_TLT, and ilLPObjSettings\LP_MODE_VISITS.

616  {
617  global $ilObjDataCache;
618 
619  include_once 'Services/Object/classes/class.ilObjectLP.php';
620 
621  foreach($a_items as $item_id)
622  {
623  $olp = ilObjectLP::getInstance($item_id);
624 
625  $this->obj_data[$item_id]['type'] = $ilObjDataCache->lookupType($item_id);
626  $this->obj_data[$item_id]['mode'] = $olp->getCurrentMode();
627  if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_TLT)
628  {
629  include_once './Services/MetaData/classes/class.ilMDEducational.php';
630  $this->obj_data[$item_id]['tlt'] = ilMDEducational::_getTypicalLearningTimeSeconds($item_id);
631  }
632  if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_VISITS)
633  {
634  $this->obj_data[$item_id]['visits'] = ilLPObjSettings::_lookupVisits($item_id);
635  }
636  if($this->obj_data[$item_id]['mode'] == ilLPObjSettings::LP_MODE_SCORM)
637  {
638  $collection = $olp->getCollectionInstance();
639  if($collection)
640  {
641  $this->obj_data[$item_id]['scos'] = count($collection->getItems());
642  }
643  }
644  }
645  }
_getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ __readStatus()

ilLearningProgressBaseGUI::__readStatus (   $a_obj_id,
  $user_id 
)

Definition at line 524 of file class.ilLearningProgressBaseGUI.php.

References ilLPStatus\_lookupStatus(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.

Referenced by __appendLPDetails().

525  {
526  include_once 'Services/Tracking/classes/class.ilLPStatus.php';
527  $status = ilLPStatus::_lookupStatus($a_obj_id, $user_id);
528 
529  include_once("./Services/Tracking/classes/class.ilLPStatus.php");
530  switch($status)
531  {
534 
537 
540 
543 
544  default:
545  return $status;
546  }
547  }
const LP_STATUS_COMPLETED_NUM
static _lookupStatus($a_obj_id, $a_user_id)
Lookup status.
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_IN_PROGRESS
const LP_STATUS_FAILED
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED_NUM
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __setSubTabs()

ilLearningProgressBaseGUI::__setSubTabs (   $a_active)

Definition at line 123 of file class.ilLearningProgressBaseGUI.php.

References ilObjUserTracking\_enabledUserRelatedData(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjUserTracking\_hasLearningProgressOtherUsers(), ilObjectLP\getInstance(), getMode(), getUserId(), and isAnonymized().

Referenced by ilLearningProgressGUI\executeCommand().

124  {
125  global $rbacsystem,$ilObjDataCache;
126 
127 
128 
129  switch($this->getMode())
130  {
131  case self::LP_CONTEXT_PERSONAL_DESKTOP:
132 
133  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
136  {
137  $this->tabs_gui->addTarget('trac_progress',
138  $this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
139  "","","",$a_active == self::LP_ACTIVE_PROGRESS);
140  }
141 
143  {
144  $this->tabs_gui->addTarget('trac_objects',
145  $this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
146  "","","",$a_active == self::LP_ACTIVE_OBJECTS);
147  }
148  break;
149 
150 
151  case self::LP_CONTEXT_REPOSITORY:
152 
153  if($rbacsystem->checkAccess('edit_learning_progress',$this->getRefId()))
154  {
155  // #12771 - do not show status if learning progress is deactivated
156  include_once './Services/Object/classes/class.ilObjectLP.php';
157  $olp = ilObjectLP::getInstance($this->obj_id);
158  if($olp->isActive())
159  {
160  if($this->isAnonymized())
161  {
162  $this->ctrl->setParameterByClass('illplistofprogressgui','user_id',$this->getUserId());
163  $this->tabs_gui->addSubTabTarget('trac_progress',
164  $this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
165  "","","",$a_active == self::LP_ACTIVE_PROGRESS);
166  }
167  else
168  {
169  // Check if it is a course
170  $sub_tab = ($ilObjDataCache->lookupType($ilObjDataCache->lookupObjId($this->getRefId())) == 'crs') ?
171  'trac_crs_objects' :
172  'trac_objects';
173 
174  $this->tabs_gui->addSubTabTarget($sub_tab,
175  $this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
176  "","","",$a_active == self::LP_ACTIVE_OBJECTS);
177 
178  }
179 
180  /*
181  if ($this->statistics_activated)
182  {
183  $this->tabs_gui->addSubTabTarget('trac_lm_statistics',
184  $this->ctrl->getLinkTargetByClass('illmstatisticsgui',''),
185  "","","",$a_active == self::LP_ACTIVE_LM_STATISTICS);
186  }
187  */
188 
189  if(!$this->isAnonymized() && !in_array($this->obj_type, array('tst', 'htlm', 'exc')))
190  {
191  $this->tabs_gui->addSubTabTarget("trac_matrix",
192  $this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showUserObjectMatrix'),
193  "", "", "", $a_active == self::LP_ACTIVE_MATRIX);
194  }
195 
196  $this->tabs_gui->addSubTabTarget("trac_summary",
197  $this->ctrl->getLinkTargetByClass("illplistofobjectsgui", 'showObjectSummary'),
198  "", "", "", $a_active == self::LP_ACTIVE_SUMMARY);
199  }
200 
201  $this->tabs_gui->addSubTabTarget('trac_settings',
202  $this->ctrl->getLinkTargetByClass('illplistofsettingsgui',''),
203  "","","",$a_active == self::LP_ACTIVE_SETTINGS);
204  }
205  break;
206 
207  case self::LP_CONTEXT_ADMINISTRATION:
208  /*
209  $this->tabs_gui->addSubTabTarget('trac_progress',
210  $this->ctrl->getLinkTargetByClass('illplistofprogressgui',''),
211  "","","",$a_active == self::LP_ACTIVE_PROGRESS);
212  */
213  $this->tabs_gui->addSubTabTarget('trac_objects',
214  $this->ctrl->getLinkTargetByClass("illplistofobjectsgui",''),
215  "","","",$a_active == self::LP_ACTIVE_OBJECTS);
216  break;
217 
218  case self::LP_CONTEXT_USER_FOLDER:
219  case self::LP_CONTEXT_ORG_UNIT:
220  // No tabs default class is lpprogressgui
221  break;
222 
223  default:
224  die ('No valid mode given');
225  break;
226  }
227 
228  return true;
229  }
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getInstance($a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showButton()

ilLearningProgressBaseGUI::__showButton (   $a_link,
  $a_text,
  $a_target = '' 
)

Definition at line 550 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\details(), ilLMStatisticsGUI\listUsersGroup(), ilLMStatisticsGUI\listUsersRole(), and ilLMStatisticsGUI\search().

551  {
552  $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
553 
554  // display button
555  $this->tpl->setCurrentBlock("btn_cell");
556  $this->tpl->setVariable("BTN_LINK",$a_link);
557  $this->tpl->setVariable("BTN_TXT",$a_text);
558  if($a_target)
559  {
560  $this->tpl->setVariable("BTN_TARGET",$a_target);
561  }
562 
563  $this->tpl->parseCurrentBlock();
564  }
+ Here is the caller graph for this function:

◆ __showEditUser()

ilLearningProgressBaseGUI::__showEditUser (   $a_user_id,
  $a_ref_id,
  $a_cancel,
  $a_sub_id = false 
)

Definition at line 671 of file class.ilLearningProgressBaseGUI.php.

References $ilCtrl, $lng, ilObjUser\_getPersonalPicturePath(), ilLPStatus\_lookupStatus(), ilUtil\formCheckbox(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_MANUAL, ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ilLPStatus\LP_STATUS_COMPLETED_NUM, and ilUtil\prepareFormOutput().

Referenced by ilLPListOfObjectsGUI\editUser().

672  {
673  global $ilObjDataCache, $lng, $ilCtrl;
674 
675  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
676 
677  if(!$a_sub_id)
678  {
679  $obj_id = $ilObjDataCache->lookupObjId($a_ref_id);
680  }
681  else
682  {
683  $ilCtrl->setParameter($this,'userdetails_id',$a_sub_id);
684  $obj_id = $ilObjDataCache->lookupObjId($a_sub_id);
685  }
686 
687  $marks = new ilLPMarks($obj_id, $a_user_id);
688 
689  $tpl = new ilTemplate('tpl.lp_edit_user.html', true, true, 'Services/Tracking');
690 
691  $tpl->setVariable("OBJ_TITLE", $lng->txt("edit").": ".$ilObjDataCache->lookupTitle($obj_id));
692 
693  include_once 'Services/Object/classes/class.ilObjectLP.php';
694  $olp = ilObjectLP::getInstance($obj_id);
695  $lp_mode = $olp->getCurrentMode();
696 
697  $tpl->setVariable("OBJ_SUBTITLE", $this->lng->txt('trac_mode').": ".$olp->getModeText($lp_mode));
698 
699  $ilCtrl->setParameter($this,'user_id',$a_user_id);
700  $ilCtrl->setParameter($this,'details_id',$a_ref_id);
701  $tpl->setVariable("FORMACTION",$ilCtrl->getFormAction($this));
702 
703  $tpl->setVariable("TYPE_IMG",ilObjUser::_getPersonalPicturePath($a_user_id,'xxsmall'));
704  $tpl->setVariable("ALT_IMG",$ilObjDataCache->lookupTitle($a_user_id));
705  $tpl->setVariable("TXT_LP",$lng->txt('trac_learning_progress_tbl_header'));
706 
707  $tpl->setVariable("COMMENT",ilUtil::prepareFormOutput($marks->getComment(),false));
708 
709  $type = $ilObjDataCache->lookupType($obj_id);
710  if($type != 'lm')
711  {
712  $tpl->setVariable("TXT_MARK",$lng->txt('trac_mark'));
713  $tpl->setVariable("MARK",ilUtil::prepareFormOutput($marks->getMark(),false));
714  }
715 
716  $tpl->setVariable("TXT_COMMENT",$lng->txt('trac_comment'));
717 
719  {
720  include_once("./Services/Tracking/classes/class.ilLPStatus.php");
721  $completed = ilLPStatus::_lookupStatus($obj_id, $a_user_id);
722 
723  $tpl->setVariable("mode_manual");
724  $tpl->setVariable("TXT_COMPLETED",$lng->txt('trac_completed'));
725  $tpl->setVariable("CHECK_COMPLETED",ilUtil::formCheckbox(($completed == ilLPStatus::LP_STATUS_COMPLETED_NUM),
726  'completed',
727  '1'));
728  }
729 
730  $tpl->setVariable("TXT_CANCEL",$lng->txt('cancel'));
731  $tpl->setVariable("TXT_SAVE",$lng->txt('save'));
732  $tpl->setVariable("CMD_CANCEL", $a_cancel);
733 
734  return $tpl->get();
735  }
const LP_STATUS_COMPLETED_NUM
static _lookupStatus($a_obj_id, $a_user_id)
Lookup status.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
static getInstance($a_obj_id)
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showImageByStatus()

ilLearningProgressBaseGUI::__showImageByStatus ( $tpl,
  $a_status,
  $tpl_prefix = "" 
)

Definition at line 302 of file class.ilLearningProgressBaseGUI.php.

References _showImageByStatus().

303  {
304  return ilLearningProgressBaseGUI::_showImageByStatus($tpl,$a_status,$tpl_prefix);
305  }
static _showImageByStatus(&$tpl, $a_status, $tpl_prefix="")
+ Here is the call graph for this function:

◆ __showObjectDetails()

ilLearningProgressBaseGUI::__showObjectDetails ( $info,
  $item_id = 0 
)

show details about current object.

Uses an existing info_gui object.

Definition at line 400 of file class.ilLearningProgressBaseGUI.php.

References ilMDEducational\_getTypicalLearningTimeSeconds(), ilLPObjSettings\_lookupVisits(), ilFormat\_secondsToString(), ilObjectLP\getInstance(), and ilLPObjSettings\LP_MODE_VISITS.

Referenced by ilLPListOfProgressGUI\details(), ilLPListOfObjectsGUI\details(), ilLPListOfObjectsGUI\editUser(), ilLPListOfObjectsGUI\showUserObjectMatrix(), and ilLPListOfObjectsGUI\userDetails().

401  {
402  global $ilObjDataCache;
403 
404  $details_id = $item_id ? $item_id : $this->details_id;
405 
406  include_once 'Services/Object/classes/class.ilObjectLP.php';
407  $olp = ilObjectLP::getInstance($details_id);
408  $mode = $olp->getCurrentMode();
409 
410  include_once './Services/MetaData/classes/class.ilMDEducational.php';
413  {
414  // Section object details
415  $info->addSection($this->lng->txt('details'));
416 
418  {
419  $info->addProperty($this->lng->txt('trac_required_visits'), ilLPObjSettings::_lookupVisits($details_id));
420  }
421 
422  if($seconds = ilMDEducational::_getTypicalLearningTimeSeconds($details_id))
423  {
424  $info->addProperty($this->lng->txt('meta_typical_learning_time'), ilFormat::_secondsToString($seconds));
425  }
426 
427  return true;
428  }
429  return false;
430  }
_getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static getInstance($a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __sort()

ilLearningProgressBaseGUI::__sort (   $a_ids,
  $a_table,
  $a_field,
  $a_id_name 
)

Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname.

Parameters
arrayArray of ids
stringtable name
stringtable field
stringid name
Returns
array sorted ids

protected

Definition at line 579 of file class.ilLearningProgressBaseGUI.php.

References $query, $res, $row, and DB_FETCHMODE_OBJECT.

580  {
581  global $ilDB;
582 
583  if(!$a_ids)
584  {
585  return array();
586  }
587 
588  // comment by mjansen: Requesting database in gui classes?
589 
590  // use database to sort user array
591  $where = "WHERE ".$ilDB->in($a_id_name, $a_ids, false, 'integer')." ";
592 
593  $query = "SELECT ".$a_id_name." FROM ".$a_table." ".
594  $where.
595  "ORDER BY ".$a_field;
596 
597  $res = $ilDB->query($query);
598  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
599  {
600  $ids[] = $row->$a_id_name;
601  }
602  return $ids ? $ids : array();
603  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11

◆ __updateUser()

ilLearningProgressBaseGUI::__updateUser (   $user_id,
  $obj_id 
)

Definition at line 737 of file class.ilLearningProgressBaseGUI.php.

References $_POST, $ilUser, ilLPStatusWrapper\_updateStatus(), and ilUtil\stripSlashes().

Referenced by ilLPListOfObjectsGUI\updateUser().

738  {
739  global $ilUser;
740 
741  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
742 
743  $marks = new ilLPMarks($obj_id, $user_id);
744  $marks->setMark(ilUtil::stripSlashes($_POST['mark']));
745  $marks->setComment(ilUtil::stripSlashes($_POST['comment']));
746 
747  $do_lp = false;
748  if($marks->getCompleted() != (bool) $_POST['completed'])
749  {
750  $marks->setCompleted((bool) $_POST['completed']);
751  $do_lp = true;
752  }
753 
754  $marks->update();
755 
756  // #11600
757  if($do_lp)
758  {
759  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
760  ilLPStatusWrapper::_updateStatus($obj_id, $user_id);
761  }
762  }
$_POST['username']
Definition: cron.php:12
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getImagePathForStatus()

ilLearningProgressBaseGUI::_getImagePathForStatus (   $a_status)

Get image path for status.

Definition at line 322 of file class.ilLearningProgressBaseGUI.php.

References ilUtil\getImagePath(), ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ilLPStatus\LP_STATUS_NOT_PARTICIPATED, ilLPStatus\LP_STATUS_NOT_REGISTERED, ilLPStatus\LP_STATUS_PARTICIPATED, and ilLPStatus\LP_STATUS_REGISTERED.

Referenced by __appendLPDetails(), ilLPObjectStatisticsLPTableGUI\__construct(), _showImageByStatus(), ilLMExplorer\checkLPIcon(), ilLMExplorerGUI\checkLPIcon(), ilLPProgressTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilLPObjectStatisticsLPTableGUI\getDetailItems(), ilTrSummaryTableGUI\getItems(), ilLearningProgressGUI\initCollectionManualForm(), ilLPTableBaseGUI\parseValue(), ilLPStatus\preloadListGUIData(), and ilLearningProgressGUI\showtlt().

323  {
324  include_once("./Services/Tracking/classes/class.ilLPStatus.php");
325 
326  // constants are either number or string, so make comparison string-based
327  switch((string)$a_status)
328  {
332  return ilUtil::getImagePath('scorm/incomplete.png');
333  break;
334 
338  return ilUtil::getImagePath('scorm/complete.png');
339  break;
340 
344  return ilUtil::getImagePath('scorm/not_attempted.png');
345  break;
346 
349  return ilUtil::getImagePath('scorm/failed.png');
350  break;
351 
352  default:
353  return ilUtil::getImagePath('scorm/not_attempted.png');
354  break;
355  }
356  }
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_PARTICIPATED
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_IN_PROGRESS
const LP_STATUS_NOT_PARTICIPATED
const LP_STATUS_FAILED
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const LP_STATUS_REGISTERED
const LP_STATUS_COMPLETED
const LP_STATUS_NOT_REGISTERED
const LP_STATUS_FAILED_NUM
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getStatusText()

ilLearningProgressBaseGUI::_getStatusText (   $a_status)

Get status alt text.

Definition at line 361 of file class.ilLearningProgressBaseGUI.php.

References $lng, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_IN_PROGRESS_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM.

Referenced by __appendLPDetails(), ilLPObjectStatisticsLPTableGUI\__construct(), ilTrSummaryTableGUI\fillHeaderCSV(), ilTrSummaryTableGUI\fillHeaderExcel(), ilLPProgressTableGUI\fillRow(), ilTrUserObjectsPropsTableGUI\fillRow(), ilLPProgressTableGUI\fillRowCSV(), ilTrObjectUsersPropsTableGUI\fillRowCSV(), ilTrUserObjectsPropsTableGUI\fillRowCSV(), ilTrMatrixTableGUI\fillRowCSV(), ilLPProgressTableGUI\fillRowExcel(), ilTrObjectUsersPropsTableGUI\fillRowExcel(), ilTrUserObjectsPropsTableGUI\fillRowExcel(), ilTrMatrixTableGUI\fillRowExcel(), ilLPObjectStatisticsLPTableGUI\getDetailItems(), ilLPObjectStatisticsLPTableGUI\getGraph(), ilTrSummaryTableGUI\getItems(), ilLearningProgressGUI\initCollectionManualForm(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilLPTableBaseGUI\parseValue(), ilLPStatus\preloadListGUIData(), and ilLearningProgressGUI\showtlt().

362  {
363  global $lng;
364 
365  include_once("./Services/Tracking/classes/class.ilLPStatus.php");
366 //echo "#".$a_status."#";
367  switch($a_status)
368  {
370  return $lng->txt(ilLPStatus::LP_STATUS_IN_PROGRESS);
371 
373  return $lng->txt(ilLPStatus::LP_STATUS_COMPLETED);
374 
376  return $lng->txt(ilLPStatus::LP_STATUS_FAILED);
377 
378  default:
379  if ($a_status === ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM)
380  {
381  return $lng->txt(ilLPStatus::LP_STATUS_NOT_ATTEMPTED);
382  }
383  return $lng->txt($a_status);
384  }
385  }
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_NOT_ATTEMPTED
const LP_STATUS_IN_PROGRESS_NUM
const LP_STATUS_IN_PROGRESS
const LP_STATUS_FAILED
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_COMPLETED
const LP_STATUS_FAILED_NUM
+ Here is the caller graph for this function:

◆ _showImageByStatus()

static ilLearningProgressBaseGUI::_showImageByStatus ( $tpl,
  $a_status,
  $tpl_prefix = "" 
)
static

Definition at line 308 of file class.ilLearningProgressBaseGUI.php.

References $lng, and _getImagePathForStatus().

Referenced by __showImageByStatus().

309  {
310  global $lng;
311 
312  $tpl->setVariable($tpl_prefix."STATUS_IMG",
314  $tpl->setVariable($tpl_prefix."STATUS_ALT",$lng->txt($a_status));
315 
316  return true;
317  }
_getImagePathForStatus($a_status)
Get image path for status.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ activateStatistics()

ilLearningProgressBaseGUI::activateStatistics (   $a_act = true)

Definition at line 108 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilObjContentObjectGUI\executeCommand().

109  {
110  $this->statistics_activated = $a_act;
111  }
+ Here is the caller graph for this function:

◆ getMode()

◆ getObjId()

◆ getRefId()

◆ getUserId()

ilLearningProgressBaseGUI::getUserId ( )

Definition at line 95 of file class.ilLearningProgressBaseGUI.php.

References $_GET, and $usr_id.

Referenced by __setSubTabs(), ilLearningProgressGUI\executeCommand(), ilLPListOfProgressGUI\executeCommand(), and ilLPListOfProgressGUI\show().

96  {
97  if($this->usr_id)
98  {
99  return $this->usr_id;
100  }
101  if((int) $_GET['user_id'])
102  {
103  return (int) $_GET['user_id'];
104  }
105  return 0;
106  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ ilLearningProgressBaseGUI()

ilLearningProgressBaseGUI::ilLearningProgressBaseGUI (   $a_mode,
  $a_ref_id = 0,
  $a_usr_id = 0 
)

Definition at line 50 of file class.ilLearningProgressBaseGUI.php.

References $ilCtrl, $lng, $tpl, ilObjUserTracking\_enabledUserRelatedData(), and ilObjectLP\getInstance().

51  {
52  global $tpl,$ilCtrl,$lng,$ilObjDataCache,$ilTabs;
53 
54  $this->tpl =& $tpl;
55  $this->ctrl =& $ilCtrl;
56  $this->lng =& $lng;
57  $this->lng->loadLanguageModule('trac');
58  $this->tabs_gui =& $ilTabs;
59 
60  $this->mode = $a_mode;
61  $this->ref_id = $a_ref_id;
62  $this->obj_id = $ilObjDataCache->lookupObjId($this->ref_id);
63  $this->obj_type = $ilObjDataCache->lookupType($this->obj_id);
64  $this->usr_id = $a_usr_id;
65 
66  $this->anonymized = (bool)!ilObjUserTracking::_enabledUserRelatedData();
67  if(!$this->anonymized && $this->obj_id)
68  {
69  include_once "Services/Object/classes/class.ilObjectLP.php";
70  $olp = ilObjectLP::getInstance($this->obj_id);
71  $this->anonymized = $olp->isAnonymized();
72  }
73  }
global $ilCtrl
Definition: ilias.php:18
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ isAnonymized()

ilLearningProgressBaseGUI::isAnonymized ( )

◆ isObjectOffline()

static ilLearningProgressBaseGUI::isObjectOffline (   $a_obj_id,
  $a_type = null 
)
static

Definition at line 764 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilLPProgressTableGUI\getItems(), and ilTrSummaryTableGUI\getItems().

765  {
766  global $objDefinition, $ilObjDataCache;
767 
768  if(!$a_type)
769  {
770  $a_type = $ilObjDataCache->lookupType($a_obj_id);
771  }
772 
773  if($objDefinition->isPluginTypeName($a_type))
774  {
775  return false;
776  }
777 
778  $class = "ilObj".$objDefinition->getClassName($a_type)."Access";
779  include_once $objDefinition->getLocation($a_type)."/class.".$class.".php";
780  return call_user_func(array($class,'_isOffline'), $a_obj_id);
781 
782  // PHP 5.3 only ?
783  //return $class::_isOffline($obj_id);
784  }
+ Here is the caller graph for this function:

Field Documentation

◆ $anonymized

ilLearningProgressBaseGUI::$anonymized
protected

Definition at line 30 of file class.ilLearningProgressBaseGUI.php.

Referenced by isAnonymized().

◆ $ctrl

ilLearningProgressBaseGUI::$ctrl = null

Definition at line 24 of file class.ilLearningProgressBaseGUI.php.

◆ $lng

◆ $mode

ilLearningProgressBaseGUI::$mode = 0

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

Referenced by getMode().

◆ $ref_id

ilLearningProgressBaseGUI::$ref_id = 0

Definition at line 26 of file class.ilLearningProgressBaseGUI.php.

Referenced by getRefId().

◆ $statistics_activated

ilLearningProgressBaseGUI::$statistics_activated = false

Definition at line 28 of file class.ilLearningProgressBaseGUI.php.

◆ $tpl

◆ LP_ACTIVE_LM_STATISTICS

const ilLearningProgressBaseGUI::LP_ACTIVE_LM_STATISTICS = 4

Definition at line 41 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_MATRIX

const ilLearningProgressBaseGUI::LP_ACTIVE_MATRIX = 11

Definition at line 48 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_OBJECTS

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJECTS = 2

Definition at line 39 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_OBJSTATACCESS

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATACCESS = 7

Definition at line 44 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_OBJSTATADMIN

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATADMIN = 10

Definition at line 47 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_OBJSTATDAILY

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATDAILY = 9

Definition at line 46 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_OBJSTATTYPES

const ilLearningProgressBaseGUI::LP_ACTIVE_OBJSTATTYPES = 8

Definition at line 45 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_PROGRESS

const ilLearningProgressBaseGUI::LP_ACTIVE_PROGRESS = 3

Definition at line 40 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_SETTINGS

const ilLearningProgressBaseGUI::LP_ACTIVE_SETTINGS = 1

Definition at line 38 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_SUMMARY

const ilLearningProgressBaseGUI::LP_ACTIVE_SUMMARY = 6

Definition at line 43 of file class.ilLearningProgressBaseGUI.php.

◆ LP_ACTIVE_USERS

const ilLearningProgressBaseGUI::LP_ACTIVE_USERS = 5

Definition at line 42 of file class.ilLearningProgressBaseGUI.php.

◆ LP_CONTEXT_ADMINISTRATION

const ilLearningProgressBaseGUI::LP_CONTEXT_ADMINISTRATION = 2

◆ LP_CONTEXT_ORG_UNIT

const ilLearningProgressBaseGUI::LP_CONTEXT_ORG_UNIT = 5

◆ LP_CONTEXT_PERSONAL_DESKTOP

const ilLearningProgressBaseGUI::LP_CONTEXT_PERSONAL_DESKTOP = 1

◆ LP_CONTEXT_REPOSITORY

◆ LP_CONTEXT_USER_FOLDER

const ilLearningProgressBaseGUI::LP_CONTEXT_USER_FOLDER = 4

Definition at line 35 of file class.ilLearningProgressBaseGUI.php.

Referenced by ilObjUserGUI\executeCommand().


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