Skip to content

Commit

Permalink
Merge branch 'release/1.8.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChemiKyle committed Mar 16, 2021
2 parents bcba9cf + 1f8cf92 commit ee18651
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to the Imagemap module will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).


## [1.8.0] - 2021-03-16
### Added
- add option to use api urls (Andrew Martin)


## [1.7.0] - 2020-10-20
### Added
- Add fibromyalgia map (willsvankumc)
Expand Down
5 changes: 3 additions & 2 deletions ExternalModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ function redcap_every_page_top($project_id) {
* The relative path to the js file.
*/
protected function includeJs($path) {
// Use noauth method, but not the API endpoint, to load resources while not in network
$ext_path = $this->getUrl($path, true, false);
$use_api_urls = (bool) $this->getSystemSetting('use-api-urls');
$ext_path = $this->getUrl($path, true, $use_api_urls);

echo '<script src="' . $ext_path . '"></script>';
}

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ This REDCap module replaces an input, radio, or checkbox field with an image tha
- Go to **Control Center > External Modules** and enable Image Map.
- To activate this module for a particular project, go to the project home page, click on the **External Modules** link, and then enable Image Map for that project.

## Global Configuration

- **Use API endpoint for urls**: May need to be checked to allow module to work as expected in surveys.
- You may or may not need this depending on your web server's configuration (determining which is beyond the scope of this document).


## Features included
This module defines a new action tag: `@IMAGEMAP`. The possible values for this tag are:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.0
1.8.0
8 changes: 8 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
"compatibility": {
"redcap-version-min": "8.0.3"
},
"system-settings": [
{
"key": "use-api-urls",
"name": "<b>Use API endpoint for urls</b><br>If you use SAML you may need to use the API endpoint for js urls in order for public (non-authenticated) browsers to be able to use this module on a survey",
"required": false,
"type": "checkbox"
}
],
"default-image-maps": {
"PAINMAP_MALE": {
"name": "painmap_male",
Expand Down

0 comments on commit ee18651

Please sign in to comment.