From a0c8c0bac909b539fcd00f7813c6e6c52e6e2a6c Mon Sep 17 00:00:00 2001 From: nolmac <81175961+nolmac@users.noreply.github.com> Date: Wed, 8 Mar 2023 15:10:59 -0600 Subject: [PATCH 1/2] Fix issue interpreting account info `strictLimit` --- scormcloud/scormcloudplugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scormcloud/scormcloudplugin.php b/scormcloud/scormcloudplugin.php index cdad30c..66b6d79 100644 --- a/scormcloud/scormcloudplugin.php +++ b/scormcloud/scormcloudplugin.php @@ -129,7 +129,7 @@ public static function remaining_registrations() { $response = $account_service->GetAccountInfo(); $account_info = json_decode($response); - if ( 'trial' !== (string) $account_info->accountType && 'false' === (string) $account_info->strictLimit ) { + if ( 'trial' !== (string) $account_info->accountType && !$account_info->strictLimit ) { return 1; } else { $reg_limit = (int) $account_info->regLimit; From e2ca7ae8d0a29400be876ddaaf3efb1677caa077 Mon Sep 17 00:00:00 2001 From: nolmac <81175961+nolmac@users.noreply.github.com> Date: Wed, 8 Mar 2023 15:36:22 -0600 Subject: [PATCH 2/2] Updated changelog and version number --- scormcloud/readme.txt | 3 +++ scormcloud/scormcloud.php | 2 +- scormcloud/scormcloudplugin.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/scormcloud/readme.txt b/scormcloud/readme.txt index b96c46f..5583568 100644 --- a/scormcloud/readme.txt +++ b/scormcloud/readme.txt @@ -48,6 +48,9 @@ The SCORM Cloud For WordPress basic functionality works with BuddyPress without == Changelog == += 2.0.8 = +Fixes an issue determining whether an account has a strict registration limit + = 2.0.7 = Fixes an issue loading the training details page diff --git a/scormcloud/scormcloud.php b/scormcloud/scormcloud.php index e80638c..c8bfc0a 100644 --- a/scormcloud/scormcloud.php +++ b/scormcloud/scormcloud.php @@ -4,7 +4,7 @@ Plugin URI: http://scorm.com/wordpress Description: Tap the power of SCORM to deliver and track training right from your WordPress-powered site. Just add the SCORM Cloud widget to the sidebar or use the SCORM Cloud button to add a link directly in a post or page. Author: Rustici Software -Version: 2.0.7 +Version: 2.0.8 Author URI: http://www.scorm.com */ diff --git a/scormcloud/scormcloudplugin.php b/scormcloud/scormcloudplugin.php index 66b6d79..1b22563 100644 --- a/scormcloud/scormcloudplugin.php +++ b/scormcloud/scormcloudplugin.php @@ -97,7 +97,7 @@ public static function get_cloud_service( $force_network_settings = false ) { $proxy = get_option( 'proxy' ); } - $origin = ScormEngineUtilities::getCanonicalOriginString( 'Rustici Software', 'WordPress', '2.0.7' ); + $origin = ScormEngineUtilities::getCanonicalOriginString( 'Rustici Software', 'WordPress', '2.0.8' ); if ( strlen( $engine_url ) < 1 ) { $engine_url = 'https://cloud.scorm.com/api/v2';