Skip to content

Commit

Permalink
Merge branch 'fixQuestionsCreator-701' into 'main'
Browse files Browse the repository at this point in the history
Corrige problema com importação de classe

See merge request softwares-pkp/plugins_ojs/demographicData!12
  • Loading branch information
JhonathanLepidus committed Sep 26, 2024
2 parents cd798bb + e85f413 commit f1549b3
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 5 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/generate-package.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion DemographicDataPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
# Dados Demográficos
# 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__
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace APP\plugins\generic\demographicData\tests;
namespace APP\plugins\generic\demographicData\classes\test;

use APP\core\Application;
use APP\plugins\generic\demographicData\classes\demographicQuestion\DemographicQuestion;
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<version>
<application>demographicData</application>
<type>plugins.generic</type>
<release>0.0.0.6</release>
<date>2024-09-18</date>
<release>0.0.0.7</release>
<date>2024-09-26</date>
</version>

0 comments on commit f1549b3

Please sign in to comment.