From e85bf09052b1f6f013d5145244872446c50ff434 Mon Sep 17 00:00:00 2001 From: Jhon Date: Thu, 26 Sep 2024 14:29:51 -0400 Subject: [PATCH 1/3] Changes directory of default test questions creator class Issue: documentacao-e-tarefas/scielo#701 Signed-off-by: Jhon --- DemographicDataPlugin.php | 2 +- {tests => classes/test}/DefaultTestQuestionsCreator.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename {tests => classes/test}/DefaultTestQuestionsCreator.php (98%) diff --git a/DemographicDataPlugin.php b/DemographicDataPlugin.php index 1f36185..f47cf61 100644 --- a/DemographicDataPlugin.php +++ b/DemographicDataPlugin.php @@ -18,7 +18,7 @@ use APP\plugins\generic\demographicData\classes\OrcidClient; use APP\plugins\generic\demographicData\classes\DataCollectionEmailSender; use APP\plugins\generic\demographicData\classes\DemographicDataService; -use APP\plugins\generic\demographicData\tests\DefaultTestQuestionsCreator; +use APP\plugins\generic\demographicData\classes\test\DefaultTestQuestionsCreator; use APP\plugins\generic\demographicData\DemographicDataSettingsForm; class DemographicDataPlugin extends GenericPlugin diff --git a/tests/DefaultTestQuestionsCreator.php b/classes/test/DefaultTestQuestionsCreator.php similarity index 98% rename from tests/DefaultTestQuestionsCreator.php rename to classes/test/DefaultTestQuestionsCreator.php index b434e3e..d6f8c69 100644 --- a/tests/DefaultTestQuestionsCreator.php +++ b/classes/test/DefaultTestQuestionsCreator.php @@ -1,6 +1,6 @@ Date: Thu, 26 Sep 2024 14:43:14 -0400 Subject: [PATCH 2/3] Adds github workflow file and updates version.xml Issue: documentacao-e-tarefas/scielo#701 Signed-off-by: Jhon --- .github/workflows/generate-package.yml | 58 ++++++++++++++++++++++++++ version.xml | 4 +- 2 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/generate-package.yml diff --git a/.github/workflows/generate-package.yml b/.github/workflows/generate-package.yml new file mode 100644 index 0000000..990b0bc --- /dev/null +++ b/.github/workflows/generate-package.yml @@ -0,0 +1,58 @@ +on: + push: + tags: + - 'v*' + +name: Create release and tar.gz package for it + +jobs: + create-release: + name: Create release and package + env: + PLUGIN_NAME: demographicData + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Check version.xml + run: | + sudo apt install xmlstarlet + application=$(xmlstarlet sel -t -v 'version/application' version.xml) + if [ $application != $PLUGIN_NAME ]; then exit 1; fi + release=$(xmlstarlet sel -t -v 'version/release' version.xml) + tag=${{ github.ref }} + tag=${tag/refs\/tags\/v} + if [[ $release != $tag* ]]; then exit 1; fi + date_version=$(xmlstarlet sel -t -v 'version/date' version.xml) + current_date=$(date +'%Y-%m-%d') + if [ $date_version != $current_date ]; then exit 1; fi + shell: bash + - name: Create the tar.gz package + run: | + mkdir $PLUGIN_NAME + shopt -s extglob + cp -r !($PLUGIN_NAME|.git*|.|..|tests|cypress) $PLUGIN_NAME + tar -zcvf $PLUGIN_NAME.tar.gz $PLUGIN_NAME + shell: bash + - name: Create the release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload the package as release asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./${{ env.PLUGIN_NAME }}.tar.gz + asset_name: ${{ env.PLUGIN_NAME }}.tar.gz + asset_content_type: application/x-compressed-tar diff --git a/version.xml b/version.xml index e1e5190..eb795ec 100644 --- a/version.xml +++ b/version.xml @@ -12,6 +12,6 @@ demographicData plugins.generic - 0.0.0.6 - 2024-09-18 + 0.0.0.7 + 2024-09-26 From e85f4138b03850f7f9111b54e18dc4b47327a508 Mon Sep 17 00:00:00 2001 From: Jhon Date: Thu, 26 Sep 2024 15:13:50 -0400 Subject: [PATCH 3/3] Updates README Issue: documentacao-e-tarefas/scielo#701 Signed-off-by: Jhon --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cc7da6..16ade7d 100644 --- a/README.md +++ b/README.md @@ -1 +1,37 @@ -# Dados Demográficos \ No newline at end of file +# Demographic Data + +This plugin allows the collection of demographic data from authors via a questionnaire. + +## Compatibility + +The latest release of this plugin is compatible with the following PKP applications: + +* OJS 3.4.0 + +Using PHP 8.1 or later. + +## Plugin Download + +To download the plugin, go to the [Releases page](https://github.com/lepidus/demographicData/releases) and download the tar.gz package of the latest release compatible with your website. + +## Installation + +1. Install the plugin dependencies. +2. Enter the administration area of ​​your application and navigate to `Settings`>` Website`> `Plugins`> `Upload a new plugin`. +3. Under __Upload file__ select the file __demographicData.tar.gz__. +4. Click __Save__ and the plugin will be installed on your website. + +## Instructions for use +Once enabled, the demographic questionnaire is displayed in the users profile page. When accessing this page, the user will find a new tab, called "Demographic Data", where they can consent to answer the questionnaire or not. + +For authors who are not registered in the system, an e-mail is sent when the submission is accepted, requesting them to fill in the demographic questionnaire. This e-mail is only sent to authors where there is no user with the same e-mail address in the system. + +The e-mail sent offers two ways of filling in the data. The first requires an ORCID record to be authenticated, so that the data is associated with this record. The second uses the author's e-mail address and is recommended only for those who do not have an ORCID record. + +Authors can view and delete their demographic data at any time. Subsequently, if they create an account in the system with the e-mail address or ORCID used, their data will be migrated to this new user. + +## License + +__This plugin is licensed under the GNU General Public License v3.0__ + +__Copyright (c) 2024 Lepidus Tecnologia__ \ No newline at end of file