Skip to content

Commit

Permalink
Merge branch '19-migration-einbau-auf-ansicht-der-zertifikatsliste' i…
Browse files Browse the repository at this point in the history
…nto 'trunk'

Resolve "Migration: Einbau auf Ansicht der Zertifikatsliste"

Closes ILIAS-eLearning#19

See merge request ntheen/ilias-certificates!146
  • Loading branch information
mjansenDatabay committed Sep 18, 2018
2 parents 9d42442 + ce18bc9 commit b7c856c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
26 changes: 23 additions & 3 deletions Services/Badge/classes/class.ilBadgeProfileGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @author Jörg Lützenkirchen <[email protected]>
* @version $Id:$
* @ilCtrl_Calls ilBadgeProfileGUI: ilUserCertificateTableGUI
* @ilCtrl_Calls ilBadgeProfileGUI: ilUserCertificateTableGUI, ilCertificateMigrationGUI
*
* @package ServicesBadge
*/
Expand Down Expand Up @@ -94,15 +94,25 @@ function executeCommand()
$nextClass = $ilCtrl->getNextClass();
switch($nextClass)
{
case "ilcertificatemigrationgui":
include_once("./Services/Certificate/classes/class.ilCertificateMigrationGUI.php");
$cert_migration_gui = new \ilCertificateMigrationGUI();
$ret = $ilCtrl->forwardCommand($cert_migration_gui);
/** @var ilTemplate $tpl */
$tpl->setMessage(ilTemplate::MESSAGE_TYPE_SUCCESS, $ret, true);
$this->setTabs();
$this->listCertificates(true);
break;

default:
$this->setTabs();
$cmd = $ilCtrl->getCmd("listBadges");
$cmd = $ilCtrl->getCmd("listBadges");
$this->$cmd();
break;
}
}

public function listCertificates()
public function listCertificates($a_migration_started = false)
{
if (!$this->certificateSettings->get('active')) {
return $this->ctrl->redirect($this,"listBadges");
Expand Down Expand Up @@ -133,6 +143,16 @@ public function listCertificates()
);
}

if (!$a_migration_started) {
$cert_ui_elements = new \ilCertificateMigrationUIElements();
$messagebox_link = $this->ctrl->getLinkTargetByClass(['ilCertificateMigrationGUI'], 'startMigration', false, true, false);
$messagebox = $cert_ui_elements->getMigrationMessageBox($messagebox_link);
$this->tpl->setCurrentBlock('mess');
$this->tpl->setVariable('MESSAGE', $messagebox);
$this->tpl->parseCurrentBlock('mess');
}


$table->setData($data);

$this->tpl->setContent( $table->getHTML());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Class ilCertificateMigrationGUI
* @author Ralph Dittrich <[email protected]>
*
* @ilCtrl_IsCalledBy ilCertificateMigrationGUI: ilCertificateGUI, ilPersonalProfileGUI
* @ilCtrl_IsCalledBy ilCertificateMigrationGUI: ilCertificateGUI, ilPersonalProfileGUI, ilBadgeProfileGUI
*
*/
class ilCertificateMigrationGUI
Expand Down
5 changes: 5 additions & 0 deletions setup/sql/dbupdate_04.php
Original file line number Diff line number Diff line change
Expand Up @@ -22905,3 +22905,8 @@ function writeCtrlClassEntry(ilPluginSlot $slot, array $plugin_data) {
}
$ilCtrlStructureReader->getStructure();
?>
<#5297>
<?php
$ilCtrlStructureReader->getStructure();
?>

0 comments on commit b7c856c

Please sign in to comment.