Commit graph

28 commits

Author SHA1 Message Date
504fb793ff
refactor: Removes unused Spreadsheet styles
Cleans up unused imports in the spreadsheet styling part,
eliminating unnecessary dependencies. This improves code
maintainability by reducing clutter.
2024-11-27 21:27:04 +01:00
537fb3f085
feat: Enhances text display in Excel export
Enables text wrapping for better readability of exported data
by adjusting alignment settings in each row of the output.

This change helps improve the presentation of multiline text
in the generated Excel sheet.
2024-11-27 15:38:29 +01:00
56494f7d15
feat: Add HTML to text conversion and enhance Excel export
Integrates soundasleep/html2text library for HTML to text conversion in user grade export.
Applies consistent styling in Excel export, enhancing readability.
Includes email field in exported user details.
2024-11-27 15:36:37 +01:00
9923bab2fb
fix: Adds autoload support for external libraries
Integrates Composer's autoloading to streamline library
inclusion, facilitating easier extension and maintenance of
dependencies such as PhpSpreadsheet.
2024-11-25 10:11:20 +01:00
80ac83db92
feat: Add XLSX export for user grades report
Introduces XLSX export functionality to the user grades report.
Adds a checkbox for selecting XLSX export in the form interface.
Uses PhpSpreadsheet to generate and download detailed Excel
files containing user grades and quiz attempts.

Enhancement enables convenient data export for offline analysis
and sharing.
2024-11-25 10:09:36 +01:00
7252b729b2
feat: Add Composer support with PhpSpreadsheet dependency
Introduces Composer to manage PHP dependencies for the project.
Includes phpoffice/phpspreadsheet as a required library to
facilitate spreadsheet manipulation.

The `.gitignore` file is updated to exclude composer.phar
and the vendor directory, ensuring sensitive data and
unnecessary files are not tracked.

These changes enable more efficient dependency management
and streamline the integration of third-party packages.
2024-11-25 09:55:11 +01:00
b7014cccd4
fix: Adds localization to user details table headings
Updates table headers to support localization by providing
the localization key for 'field' and 'value' in the user
details section. Improves consistency in string translations
throughout the report.

Enhances user interface by displaying the user table directly
on the page using html_writer, improving readability.
2024-11-21 20:59:55 +01:00
6229cb02f7
fix: Update string function calls for language support
Specifies the language component in get_string function calls
to enhance string retrieval for user attributes in the table.

Ensures consistent localization for the 'report_usergrades'
component strings.
2024-11-21 20:59:02 +01:00
1af48be553
feat: Add user details display to report
Introduces a user details table for displaying username, first name,
last name, and email in the report. Updates language strings to
support new user details headings and labels for the table fields.

Increments the plugin version for release tracking.
2024-11-21 20:57:29 +01:00
1dac3d1e99
feat: Enhances question detail display in reports
Displays question name and text in report tables to improve
clarity of user responses alongside their grades.

Improves readability and context by enriching question details.
2024-11-21 20:54:21 +01:00
77614bc8c3
fix: Filters empty question grades
Updates the iteration over question grades to only include entries with a non-zero fraction to prevent adding incomplete or irrelevant data to the attempt table.
2024-11-21 20:52:40 +01:00
0388d71ef9
fix: Fixes retrieval of question grades
Changes the database query to retrieve multiple records
instead of a single record. This addresses an issue where
only one grade was being fetched even if multiple
assessment steps exist for a question attempt, ensuring
correct display of all attempts and associated grades.
2024-11-21 20:51:24 +01:00
6692dbb617
fix: Fix multiple grade entries in attempts table
Adjusts the logic to iterate over question grades, ensuring
all entries for a given question attempt are included in
the attempts table instead of only the first one.

This fixes data representation issues in the attempts interface.
2024-11-21 20:48:10 +01:00
9b823767ca
fix: Fix question_attempts processing logic
Updates the loop to retrieve all question_attempts per usage.
Ensures each attempt's question and response are processed.
Corrects grading by iterating over multiple attempts in a usage.

Improves data accuracy in attempt_table generation.
2024-11-21 20:45:58 +01:00
52680853a3
fix: Fix question usage and display total quiz grade
Corrects variable reference to ensure proper retrieval of question
usages for quiz attempts. Enhances grade display by adding total
possible quiz grade for clarity.

No related issues mentioned.
2024-11-21 20:44:27 +01:00
7321ed9c1d
feat: Add new strings for enhanced user grade report
Introduces additional localization strings to improve the
clarity and functionality of the user grade report, including
labels for quizzes, attempts, and questions. This enhances
the report's interpretability for users.

Increments plugin version to reflect string additions.
2024-11-21 20:40:54 +01:00
d983f550bf
fix: Refactors question processing logic
Updates the question handling mechanism to use question usages
and attempts, replacing the previous reliance on question states
and attempt steps. This change enhances the accuracy of response
and grading information by aligning with the current database
structure.

Improves performance and maintainability by streamlining data
retrieval from the database.
2024-11-21 20:38:23 +01:00
afb5e818ad
fix: Fix incorrect quiz ID field in queries
Corrects the field name used for fetching quiz questions from
'quiz' to 'quizid' to align with the database schema. This fixes
query failures when retrieving quiz questions ensuring proper
data retrieval operations.

This minor change resolves an issue with quiz data handling.
2024-11-21 20:08:44 +01:00
59e82e4649
fix: Fixes quiz question retrieval method
Updates database query to use 'quiz_slots' instead of
'quiz_question_instances' to fetch quiz questions. This
change ensures compatibility with updated database schema
and correct data retrieval process.
2024-11-21 20:07:17 +01:00
06d6d26b6d
fix: Removes course-specific question fetch
Moves question retrieval outside course loop to improve
performance by avoiding redundant database queries for
each course iteration.
2024-11-21 20:02:34 +01:00
e3fd691910
fix: Extract user selection components to classes
Extracts and refactors user selection logic by moving user selector
and form functionality into separate class files. This enhances code
modularity and reusability across different parts of the application.

Adds a detailed user grades report page that displays quiz attempts
and grades for selected users, improving user grade reporting.

Updates admin settings to include detailed report page link for
navigation ease.
2024-11-21 19:59:07 +01:00
d3eed13d51
fix: Removes login page error check for usergrades
Eliminates redundant $hassiteconfig condition, preventing potential
login page errors as site configuration check is unnecessary for
accessing the user grades report administration.

Updates URL concatenation to use $CFG->wwwroot for consistency.
2024-11-20 18:15:02 +01:00
8d339008c1
feat: Enhances usergrades report page configuration
Replaces hardcoded URL with moodle_url for flexibility and security.
Adds capability requirement 'report/usergrades:view' for improved access control.
2024-11-20 17:46:27 +01:00
79aa7978bb
feat: Add capability for viewing user grades
Defines a new capability 'report/usergrades:view' with associated
risks and context level. Grants managers permission to access
this report.

Updates page setup to check the new capability, ensuring
appropriate access control. Increments plugin version to
reflect these changes.

Enhances security and manages user access more effectively.
2024-11-20 17:38:16 +01:00
d58349069d
fix: Removes debug output from form submission
Eliminates unnecessary print_r function call for form data,
enhancing code clarity and preventing potential data exposure
during form submission handling.
2024-11-20 15:16:24 +01:00
e77df1e29f
fix: Enhances user grade selection and display
Adds a custom user selector class to streamline user search
and selection based on name or email.

Improves grade display by showing the final grade and maximum
possible grade, enhancing clarity for end-users.

Includes new language strings for improved user interface
text clarity during user selection and grade reporting.

Updates the plugin version to reflect substantive changes.
2024-11-20 15:10:57 +01:00
a0d65305ab
fix: Fixes missing PHP opening tag
Adds the PHP opening tag to prevent potential parsing errors
and ensure correct script execution.
2024-11-20 14:24:58 +01:00
f89cf45a8e
feat: Add user grades report functionality
Introduces a new report to display grades for selected users.
Includes a user selection form and grade display logic.
Sets up plugin metadata and localization strings.

Enables administrators to view a user's grades across courses.

Includes default plugin settings and version information.
2024-11-19 16:06:49 +01:00