forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '19-migration-einbau-auf-ansicht-der-zertifikatsliste' i…
…nto 'trunk' Resolve "Migration: Einbau auf Ansicht der Zertifikatsliste" Closes ILIAS-eLearning#19 See merge request ntheen/ilias-certificates!146
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* | ||
* @author Jörg Lützenkirchen <[email protected]> | ||
* @version $Id:$ | ||
* @ilCtrl_Calls ilBadgeProfileGUI: ilUserCertificateTableGUI | ||
* @ilCtrl_Calls ilBadgeProfileGUI: ilUserCertificateTableGUI, ilCertificateMigrationGUI | ||
* | ||
* @package ServicesBadge | ||
*/ | ||
|
@@ -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"); | ||
|
@@ -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()); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
* Class ilCertificateMigrationGUI | ||
* @author Ralph Dittrich <[email protected]> | ||
* | ||
* @ilCtrl_IsCalledBy ilCertificateMigrationGUI: ilCertificateGUI, ilPersonalProfileGUI | ||
* @ilCtrl_IsCalledBy ilCertificateMigrationGUI: ilCertificateGUI, ilPersonalProfileGUI, ilBadgeProfileGUI | ||
* | ||
*/ | ||
class ilCertificateMigrationGUI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters