From 26188b25b73330124ae85834f2ef010158c2d43f Mon Sep 17 00:00:00 2001 From: Bhavya Shukla Date: Tue, 9 Jul 2024 22:45:00 +0100 Subject: [PATCH] [Polish] Added test page for author aide and fixed version LRN-4482 --- .version | 2 +- docs/quickstart/ai/author-aide.php | 71 ++++++++++++++++++++++++++ docs/quickstart/ai/authoring-items.php | 70 +++++++++++++++++++++++++ docs/quickstart/index.html | 4 ++ 4 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 docs/quickstart/ai/author-aide.php create mode 100644 docs/quickstart/ai/authoring-items.php diff --git a/.version b/.version index 570c796..e946d6b 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v1.0.2 +v1.0.3 diff --git a/docs/quickstart/ai/author-aide.php b/docs/quickstart/ai/author-aide.php new file mode 100644 index 0000000..e48bf04 --- /dev/null +++ b/docs/quickstart/ai/author-aide.php @@ -0,0 +1,71 @@ + [ + 'id' => 'brian', + 'firstname' => 'Brian', + 'lastname' => 'Smith', + 'email' => 'test@test.com' + ] + ]; + + // Public & private security keys required to access Learnosity APIs and + // data. These keys grant access to Learnosity's public demos account, + // loaded from a configuration file on line 13. + // Learnosity will provide keys for your own private account. + $consumerKey = $config['consumerKey']; + $consumerSecret = $config['consumerSecret']; + + // Parameters used to create security authorization. + $security = [ + 'domain' => $_SERVER['SERVER_NAME'], + 'consumer_key' => $consumerKey + ]; + + // Use Learnosity SDK to construct Author aide API configuration parameters, + // and sign them securely with the $security and $consumerSecret parameters. + $init = new Init( + 'authoraide', + $security, + $consumerSecret, + $request + ); + $initOptions = $init->generate(); + ?> + + + + + + +

AuthorAide Example

+ + +
+ + + + + + + + diff --git a/docs/quickstart/ai/authoring-items.php b/docs/quickstart/ai/authoring-items.php new file mode 100644 index 0000000..bc29e8f --- /dev/null +++ b/docs/quickstart/ai/authoring-items.php @@ -0,0 +1,70 @@ + 'item_list', // Display the Item list view on load. + 'title.show' => true, + 'user' => [ + 'id' => 'author123456' // Unique author id + ] + ]; + + // Public & private security keys required to access Learnosity APIs and + // data. These keys grant access to Learnosity's public demos account, + // loaded from a configuration file on line 13. + // Learnosity will provide keys for your own private account. + $consumerKey = $config['consumerKey']; + $consumerSecret = $config['consumerSecret']; + + // Parameters used to create security authorization. + $security = [ + 'domain' => $_SERVER['SERVER_NAME'], + 'consumer_key' => $consumerKey, + ]; + + // Use Learnosity SDK to construct Author API configuration parameters, + // and sign them securely with the $security and $consumerSecret parameters. + $init = new Init( + 'author', + $security, + $consumerSecret, + $request + ); + $initOptions = $init->generate(); // JSON blob of signed config params. + ?> + + + + + + +

Authoring Items Example

+ + +
+ + + + + + + + diff --git a/docs/quickstart/index.html b/docs/quickstart/index.html index 3e0f521..26a5401 100644 --- a/docs/quickstart/index.html +++ b/docs/quickstart/index.html @@ -14,6 +14,10 @@

Learnosity Quick Start Examples

Authoring examples