Skip to content

Display intro field during online text import#61

Draft
Copilot wants to merge 76 commits intoexperimentalfrom
copilot/add-feedback-to-export
Draft

Display intro field during online text import#61
Copilot wants to merge 76 commits intoexperimentalfrom
copilot/add-feedback-to-export

Conversation

Copy link
Contributor

Copilot AI commented Feb 11, 2026

The intro field ("Kurzbeschreibung") was not visible when importing online text submissions, only appearing post-save. This obscured what content would be imported.

Changes

Added $post->intro initialization in form display data:

// import_moodle_add_file.php, line 232
if ($checkedonlinetext) {
    $post->intro = format_text($checkedonlinetext->onlinetext, $checkedonlinetext->onlineformat);
}

The form structure ($existing->intro) was already set but display values ($post->intro) were missing. Now both title and intro fields are prefilled during creation.

Original prompt

Problem Statement

Current Behavior

When a student exports an assignment submission from Moodle Assignments to Exaport using the "export to portfolio" button, the teacher's feedback files are not included in the export. This results in the loss of valuable feedback that the teacher provided on the assignment.

Desired Behavior

When an assignment submission is exported to Exaport, the system should:

  1. Detect if the submission has associated feedback files from the teacher
  2. Automatically acquire/retrieve those feedback files during the export process
  3. Store the feedback files in the appropriate feedback section of the artifact in Exaport
  4. Ensure the feedback is immediately visible and accessible as part of the portfolio artifact

Technical Context

  • Source: Moodle core Assignments module (repository: moodle/moodle)
  • Target: Exabis ePortfolio (Exaport) plugin (repository: gtn/exaport)
  • Export mechanism: Moodle's portfolio export functionality
  • Languages: Primarily PHP (85.8% of exaport codebase)

Implementation Requirements

  1. Identify where Exaport receives exported assignment submissions from Moodle
  2. Extend the import/receive logic to check for feedback files associated with the submission
  3. Use Moodle's assignment API to retrieve feedback files (likely from the assignment feedback file area)
  4. Store the retrieved feedback files in Exaport's artifact feedback structure
  5. Ensure proper permissions and access controls are maintained
  6. Handle edge cases:
    • Multiple feedback files
    • No feedback files present
    • Different feedback file types
    • Large files

Expected Outcome

Students will be able to export their assignment submissions to Exaport while preserving all teacher feedback, creating a complete portfolio artifact that includes both the original submission and the feedback received.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 11, 2026 10:53
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add teacher feedback files to Exaport export Add automatic teacher feedback file import for assignment submissions Feb 11, 2026
@richardwolfmayr
Copy link
Contributor

No, this does nothing at all
Analyze how the export works before changing the code again.
For example, exaport/lib/portfolio_plugin/lib.php steal_control() gets called by moodle when using the export function

Copilot AI and others added 3 commits February 11, 2026 12:31
…ntext

Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Copilot AI changed the title Add automatic teacher feedback file import for assignment submissions Add feedback file support to portfolio export button path Feb 11, 2026
Copilot AI and others added 2 commits February 12, 2026 10:52
…assignments

Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Copilot AI changed the title Add feedback file support to portfolio export button path Consolidate assignment import paths and add feedback-only support Feb 12, 2026
Copilot AI and others added 2 commits February 12, 2026 11:08
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Copilot AI changed the title Consolidate assignment import paths and add feedback-only support Fix SQL query to display feedback-only assignments in import list Feb 12, 2026
…ign_submission.status instead of checking for file (there could be online-text submissions) and simplify the logic in general. Fix "has_submission" check to not always display true, even thought he submission is "new"
richardwolfmayr and others added 30 commits February 13, 2026 11:53
… is unnecessary, as there is always the root category
…ings

Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
…ionid and gradeid fields

Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
…indexing

Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Fix: Assignment records with NULL submissionid lost due to array key collision
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Co-authored-by: richardwolfmayr <24298463+richardwolfmayr@users.noreply.github.com>
Display original filename in artifact view instead of artifact name
…s function is just pretty different to the import from exaport. Might get reworked at another point
…feedback_files_for_export would only be used by export from assignment, which will be changed later on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants