diff --git a/app/models/phase.rb b/app/models/phase.rb index df47877..fa5109c 100644 --- a/app/models/phase.rb +++ b/app/models/phase.rb @@ -16,7 +16,7 @@ # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 attr_accessible :description, :number, :title, :template_id, - :template, :sections, :as => [:default, :admin] + :template, :sections, :modifiable, :as => [:default, :admin] ## # sluggable title diff --git a/app/models/question.rb b/app/models/question.rb index d0fde11..f7db830 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -24,7 +24,8 @@ :suggested_answer, :text, :section_id, :question_format_id, :question_options_attributes, :suggested_answers_attributes, :option_comment_display, :theme_ids, :section, :question_format, - :question_options, :suggested_answers, :answers, :themes, :as => [:default, :admin] + :question_options, :suggested_answers, :answers, :themes, + :modifiable, :as => [:default, :admin] diff --git a/app/models/question_option.rb b/app/models/question_option.rb index b16b0d9..c11151a 100644 --- a/app/models/question_option.rb +++ b/app/models/question_option.rb @@ -7,5 +7,5 @@ ## # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 - attr_accessible :text, :question_id, :is_default, :number, :as => [:default, :admin] + attr_accessible :text, :question_id, :is_default, :number, :question, :as => [:default, :admin] end diff --git a/app/models/section.rb b/app/models/section.rb index 3577dd9..34acdbe 100644 --- a/app/models/section.rb +++ b/app/models/section.rb @@ -11,7 +11,7 @@ # accepts_nested_attributes_for :version attr_accessible :organisation_id, :description, :number, :title, :published, :questions_attributes, - :organisation, :as => [:default, :admin] + :organisation, :modifiable, :phase, :as => [:default, :admin] ## # return the title of the section diff --git a/app/models/template.rb b/app/models/template.rb index fbee582..510eb9b 100644 --- a/app/models/template.rb +++ b/app/models/template.rb @@ -13,7 +13,7 @@ # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 attr_accessible :id, :organisation_id, :description, :published, :title, :locale, :is_default, - :guidance_group_ids, :organisation, :plans, :phases, :as => [:default, :admin] + :guidance_group_ids, :organisation, :plans, :phases, :org, :as => [:default, :admin] # defines the export setting for a template object has_settings :export, class_name: 'Settings::Template' do |s| diff --git a/db/seeds.rb b/db/seeds.rb index 49b58d2..4ac811c 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -19,7 +19,8 @@ {title: "Radio buttons"}, {title: "Check box"}, {title: "Dropdown"}, - {title: "Multi select box"} + {title: "Multi select box"}, + {title: "Date"} ] question_formats.map{ |qf| QuestionFormat.create!(qf) if QuestionFormat.find_by(title: qf[:title]).nil? } @@ -236,34 +237,34 @@ ● Consider how your data could complement and integrate with existing data, or whether there are any existing data or methods that you could reuse. ● If purchasing or reusing existing data, explain how issues such as copyright and IPR have been addressed. You should aim to m inimise any restrictions on the reuse (and subsequent sharing) of third-party data.", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Description')]}, {text: "● Clearly note what format(s) your data will be in, e.g., plain text (.txt), comma-separated values (.csv), geo-referenced TIFF (.tif, .tfw). ● Explain why you have chosen certain formats. Decisions may be based on staff expertise, a preference for open formats, the standards accepted by data centres or widespread usage within a given community. ● Using standardised, interchangeable or open formats ensures the long-term usability of data; these are recommended for sharing and archiving. ● See UK Data Service guidance on recommended formats or DataONE Best Practices for file formats", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Format')]}, {text: "● Note what volume of data you will create in MB/GB/TB ● Consider the implications of data volumes in terms of storage, access and preservation. Do you need to include additional costs? ● Consider whether the scale of the data will pose challenges when sharing or transferring data between sites; if so, how will you address these challenges?", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Volume')]}, {text: "● Outline how the data will be collected and processed. This should cover relevant standards or methods, quality assurance and data organisation. ● Indicate how the data will be organised during the project, mentioning, e.g., naming conventions, version control and folder structures. Consistent, well-ordered research data will be easier to find, understand and reuse ● Explain how the consistency and quality of data collection will be controlled and documented. This may include processes such as calibration, repeat samples or measurements, standardised data capture, data entry validation, peer review of data or representation with controlled vocabularies. ● See the DataOne Best Practices for data quality", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Collection')]}, {text: "● What metadata will be provided to help others identify and discover the data? ● Researchers are strongly encouraged to use community metadata standards where these are in place. The Research Data Alliance offers a Directory of Metadata Standards. ● Consider what other documentation is needed to enable reuse. This may include information on the methodology used to collect the data, analytical and procedural information, definitions of variables, units of measurement, any assumptions made, the format and file type of the data and software used to collect and/or process the data. ● Consider how you will capture this information and where it will be recorded, e.g., in a database with links to each item, in a ‘readme’ text file, in file headers, etc. ", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Metadata & Documentation')]}, {text: "● Investigators carrying out research involving human participants should request consent to preserve and share the data. Do not just ask for permission to use the data in your study or make unnecessary promises to delete it at the end. @@ -271,13 +272,13 @@ ● Ethical issues may affect how you store and transfer data, who can see/use it and how long it is kept. You should demonstrate that you are aware of this and have planned accordingly. ● See UK Data Service guidance on consent for data sharing ● See ICPSR approach to confidentiality and Health Insurance Portability and Accountability Act (HIPAA) regulations for health research", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Ethics & Privacy')]}, {text: "● State who will own the copyright and IPR of any new data that you will generate. For multi-partner projects, IPR ownership should be covered in the consortium agreement. ● Outline any restrictions needed on data sharing, e.g., to protect proprietary or patentable data. ● Explain how the data will be licensed for reuse. See the DCC guide on How to license research data and EUDAT’s data and software licensing wizard.", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Intellectual Property Rights')]}, {text: "● Describe where the data will be stored and backed up during the course of research activities. This may vary if you are doing fieldwork or working across multiple sites so explain each procedure. @@ -285,7 +286,7 @@ ● See UK Data Service Guidance on data storage or DataONE Best Practices for storage ● Also consider data security, particularly if your data is sensitive e.g., detailed personal data, politically sensitive information or trade secrets. Note the main risks and how these will be managed. ● Identify any formal standards that you will comply with, e.g., ISO 27001. See the DCC Briefing Paper on Information Security Management -ISO 27000 and UK Data Service guidance on data security", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Storage & Security')]}, {text: "● How will you share the data e.g. deposit in a data repository, use a secure data service, handle data requests directly or use another mechanism? The methods used will depend on a number of factors such as the type, size, complexity and sensitivity of the data. @@ -293,40 +294,40 @@ ● Who will be able to use your data? If you need to restricted access to certain communities or apply data sharing agreements, explain why. ● Consider strategies to minimise restrictions on sharing. These may include anonymising or aggregating data, gaining participant consent for data sharing, gaining copyright permissions, and agreeing a limited embargo period. ● How might your data be reused in other contexts? Where there is potential for reuse, you should use standards and formats that facilitate this, and ensure that appropriate metadata is available online so your data can be discovered. Persistent identifiers should be applied so people can reliably and efficiently find your data. They also help you to track citations and reuse.", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Sharing')]}, {text: "● Where will the data be deposited? If you do not propose to use an established repository, the data management plan should demonstrate that the data can be curated effectively beyond the lifetime of the grant. ● It helps to show that you have consulted with the repository to understand their policies and procedures, including any metadata standards. ● An international list of data repositories is available via Re3data and some universities or publishers provide lists of recommendations e.g. PLOS ONE recommended repositories", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Data Repository')]}, {text: "● Indicate which data are of long-term value and should be shared and/or preserved. ● Outline the plans for data sharing and preservation - how long will the data be retained and where will it be archived? ● Will additional resources be needed to prepare data for deposit or meet any charges from data repositories? See the DCC guide: How to appraise and select research data for curation or DataONE Best Practices: Identifying data with long-term value", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Preservation')]}, {text: "● Outline the roles and responsibilities for all activities, e.g., data capture, metadata production, data quality, storage and backup, data archiving & data sharing. Individuals should be named where possible. ● For collaborative projects you should explain the coordination of data management responsibilities across partners. ● See UK Data Service guidance on data management roles and responsibilities or DataONE Best Practices: Define roles and assign responsibilities for data management", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Roles & Responsibilities')]}, {text: "● Carefully consider and justify any resources needed to deliver the plan. These may include storage costs, hardware, staff time, costs of preparing data for deposit and repository charges. ● Outline any relevant technical expertise, support and training that is likely to be required and how it will be acquired. ● If you are not depositing in a data repository, ensure you have appropriate resources and systems in place to share and preserve the data. See UK Data Service guidance on costing data management", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Budget')]}, {text: "● Consider whether there are any existing procedures that you can base your approach on. If your group/department has local guidelines that you work to, point to them here. ● List any other relevant funder, institutional, departmental or group policies on data management, data sharing and data security. ", - guidance_groups: [GuidanceGroup.first], + guidance_group: GuidanceGroup.first, published: true, themes: [Theme.find_by(title: 'Related Policies')]}, {text: "Please tell us how much data you plan to collect and what format it will be in once its deposited.", - guidance_groups: [GuidanceGroup.last], + guidance_group: GuidanceGroup.last, published: true, themes: [Theme.find_by(title: 'Data Description')]} ] @@ -350,10 +351,11 @@ # Create 2 phases for the funder's template and one for our generic template # ------------------------------------------------------- phases = [ - {title: "Generic Data Management Planning Template", + {title: "Generic DMP", number: 1, template: Template.find_by(title: "My Curation Center's Default Template"), modifiable: false}, + {title: "Preliminary Statement of Work", number: 1, template: Template.find_by(title: "Department of Testing Award"), @@ -365,203 +367,242 @@ ] phases.map{ |p| Phase.create!(p) if Phase.find_by(title: p[:title]).nil? } +generic_template_phase_1 = Phase.find_by(title: "Generic DMP") +funder_template_phase_1 = Phase.find_by(title: "Preliminary Statement of Work") +funder_template_phase_2 = Phase.find_by(title: "Detailed Overview") + # Create sections for the 2 templates and their phases # ------------------------------------------------------- sections = [ - {title: "Overview", + # Sections for the 'Generic DMP' phase of the 'My Curation Center's Default Template' + {title: "Data Collection", number: 1, - phase: Phase.find_by(title: "Regional CurationCenter Data Management Plan"), + phase: generic_template_phase_1, published: true, modifiable: false}, - {title: "Collection", + {title: "Documentation and Metadata", number: 2, - phase: Phase.find_by(title: "Regional CurationCenter Data Management Plan"), + phase: generic_template_phase_1, published: true, modifiable: false}, - {title: "Documentation", + {title: "Ethics and Legal Compliance", number: 3, - phase: Phase.find_by(title: "Regional CurationCenter Data Management Plan"), + phase: generic_template_phase_1, published: true, modifiable: false}, - {title: "Sharing and Usage", + {title: "Storage and Backup", number: 4, - phase: Phase.find_by(title: "Regional CurationCenter Data Management Plan"), + phase: generic_template_phase_1, published: true, modifiable: false}, - {title: "Long Term Preservation", + {title: "Selection and Preservation", number: 5, - phase: Phase.find_by(title: "Regional CurationCenter Data Management Plan"), + phase: generic_template_phase_1, + published: true, + modifiable: false}, + {title: "Data Sharing", + number: 5, + phase: generic_template_phase_1, + published: true, + modifiable: false}, + {title: "Responsibilities and Resources", + number: 5, + phase: generic_template_phase_1, + published: true, + modifiable: false}, + + # Sections for the 'Preliminary Statement of Work' phase of the 'Department of Testing Award' + {title: "Data Description", + number: 1, + phase: funder_template_phase_1, + published: true, + modifiable: false}, + {title: "Collection Methodology", + number: 2, + phase: funder_template_phase_1, published: true, modifiable: false}, - {title: "Data Description", - number: 1, - phase: Phase.find_by(title: "Preliminary Statement of Work"), - published: true, - modifiable: false}, - {title: "Data Description", - number: 1, - phase: Phase.find_by(title: "Preliminary Statement of Work"), - published: true, - modifiable: false}, - + # Sections for the 'Detailed Overview' phase of the 'Department of Testing Award' {title: "Preservation Policy", number: 1, - phase: Phase.find_by(title: "Detailed Overview"), + phase: funder_template_phase_2, published: true, modifiable: false}, {title: "Data Format and Storage", - number: 1, - phase: Phase.find_by(title: "Detailed Overview"), + number: 2, + phase: funder_template_phase_2, published: true, modifiable: false}, {title: "Collection Process", - number: 1, - phase: Phase.find_by(title: "Detailed Overview"), + number: 3, + phase: funder_template_phase_2, published: true, modifiable: false}, {title: "Ethical Standards", - number: 1, - phase: Phase.find_by(title: "Detailed Overview"), + number: 4, + phase: funder_template_phase_2, published: true, modifiable: false}, {title: "Preservation and Reuse Policies", - number: 1, - phase: Phase.find_by(title: "Detailed Overview"), + number: 5, + phase: funder_template_phase_2, published: true, modifiable: false} ] sections.map{ |s| Section.create!(s) if Section.find_by(title: s[:title]).nil? } +text_area_format = QuestionFormat.find_by(title: 'Text area') -=begin - questions = { - "What data will you collect or create?" => { - text: "What data will you collect or create?", - section: "Data Collection", - number: 1, - guidance: "

Questions to consider:

Guidance:

Give a brief description of the data, including any existing data or third-party sources that will be used, in each case noting its content, type and coverage. Outline and justify your choice of format and consider the implications of data format and data volumes in terms of storage, backup and access.

", - themes: ["Theme 2"] - }, - "How will the data be collected or created?" => { - text: "How will the data be collected or created?", - section: "Data Collection", - number: 2, - guidance: "

Questions to consider:

Guidance:

Outline how the data will be collected/created and which community data standards (if any) will be used. Consider how the data will be organised during the project, mentioning for example naming conventions, version control and folder structures. Explain how the consistency and quality of data collection will be controlled and documented. This may include processes such as calibration, repeat samples or measurements, standardised data capture or recording, data entry validation, peer review of data or representation with controlled vocabularies.

", - themes: ["Theme 3"] - }, - "What documentation and metadata will accompany the data?" => { - text: "What documentation and metadata will accompany the data?", - section: "Documentation and Metadata", - number: 1, - guidance: "

Questions to consider:

Guidance:

Describe the types of documentation that will accompany the data to help secondary users to understand and reuse it. This should at least include basic details that will help people to find the data, including who created or contributed to the data, its title, date of creation and under what conditions it can be accessed.

Documentation may also include details on the methodology used, analytical and procedural information, definitions of variables, vocabularies, units of measurement, any assumptions made, and the format and file type of the data. Consider how you will capture this information and where it will be recorded. Wherever possible you should identify and use existing community standards.

", - themes: ["Theme 1"] - }, - "Data Overview" => { - text: "Overview of the Data", - section: "Data Overview", - number: 1, - guidance: "

Things to consider: