-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6d15e5
commit 9e547c5
Showing
41 changed files
with
487 additions
and
195 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 |
---|---|---|
|
@@ -115,15 +115,11 @@ public static function isVanderbilt() { | |
} | ||
|
||
public static function getProjectTitle($pid = NULL) { | ||
if ($pid) { | ||
$token = self::getSetting("token", $pid); | ||
$server = self::getSetting("server", $pid); | ||
} else { | ||
$token = self::getSetting("token"); | ||
$server = self::getSetting("server"); | ||
if (!$pid) { | ||
$pid = Sanitizer::sanitizePid($_GET['pid'] ?? ""); | ||
} | ||
if ($token && $server) { | ||
return Download::projectTitle($token, $server); | ||
if ($pid) { | ||
return Download::projectTitle($pid); | ||
} | ||
return ""; | ||
} | ||
|
@@ -687,14 +683,18 @@ public static function getExporterFields($metadata) { | |
return REDCapManagement::screenForFields($metadata, CareerDev::$exporterFields); | ||
} | ||
|
||
public static function getServerEmail() { | ||
return $_SERVER['SSL_SERVER_S_DN_Email'] ?? ""; | ||
} | ||
|
||
public static function isMSTP($pid = NULL) { | ||
if (!$pid) { | ||
$pid = CareerDev::getPid(); | ||
} | ||
if (Application::isVanderbilt() && ($pid == 149668)) { // TODO For now | ||
return TRUE; | ||
} | ||
if (Application::isLocalhost() && ($pid == 17)) { | ||
if (Application::isLocalhost() && ($pid == 17) && (self::getServerEmail() == "[email protected]")) { | ||
return TRUE; | ||
} | ||
return FALSE; | ||
|
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 |
---|---|---|
|
@@ -14,17 +14,24 @@ | |
use Vanderbilt\CareerDevLibrary\Publications; | ||
|
||
# test projects | ||
define("LOCALHOST_TEST_PROJECT", 16); | ||
define("LOCALHOST_TEST_PROJECT", CareerDev::getLocalhostPluginPID()); | ||
define("NEWMAN_SOCIETY_PROJECT", 66635); | ||
define("REDCAPTEST_TEST_PROJECT", 761); | ||
|
||
class CareerDev { | ||
public static $passedModule = NULL; | ||
|
||
public static function getVersion() { | ||
return "6.9.3"; | ||
return "6.10.0"; | ||
} | ||
|
||
public static function getLocalhostPluginPid() { | ||
if (Application::getServerEmail() == "[email protected]") { | ||
return 16; | ||
} | ||
return ""; | ||
} | ||
|
||
public static function getLatestReleaseVersion() { | ||
$module = self::getModule(); | ||
$sql = "SELECT `value` FROM redcap_config WHERE field_name = ?"; | ||
|
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
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
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
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
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
Oops, something went wrong.