Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions wp-content/plugins/candela-outcomes/candela-outcomes.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@ function outcome_display_html($id){
<?php
}
}

//Display user lti html
add_action('display_user_lti_id', '\Candela\Outcomes\display_user_id_html', 10, 1);

function display_user_id_html( $user_id ) {
switch_to_blog(1);
$external_id = get_user_meta( $user_id, 'candelalti_external_userid', TRUE );
restore_current_blog();
if(!empty($external_id)){
?>
<div id="lti_user_id" style='display:none'
data-user-id='<?php print $external_id; ?>'>
</div>
<?php
}
}

//Add Candela Outcomes to import meta
add_filter( 'pb_import_metakeys', 'get_import_metakeys' );

Expand Down
3 changes: 3 additions & 0 deletions wp-content/plugins/candela-utility/themes/candela/single.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<!-- place hidden GUIDs on applicable pages -->
<?php do_action('display_outcome_html', $post->ID); ?>

<!-- place hidden user LTI id on applicable pages -->
<?php do_action('display_user_lti_id', $current_user->ID); ?>

<?php if ( $citation = CandelaCitation::renderCitation( $post->ID ) ): ?>
<section role="contentinfo">
<div class="post-citations sidebar">
Expand Down