Comments (6)
Thanks Richard, any chance you can give me access to a course where this happens?
from moodle-report_advancedgrading.
That is kinda difficult to realize as we do not create accounts in our own Moodle, everyone logs in using ADFS.
What I could do is create a backup from this specific assignment and send it to you? Would that help?
Also, we are using multiple attempts in assignments. Could that be a problem in the report?
from moodle-report_advancedgrading.
Yes a backup/restore would probably help and yes multiple attempts might be an issue (though I have a vague recollection of testing against that).
This report does a similar thing and it would be interesting to know if it runs without error on your site..
https://github.com/brickfield/moodle-gradereport_rubrics
from moodle-report_advancedgrading.
Error message
Exception - count(): Argument #1 ($value) must be of type Countable|array, null given
More information about this error
Debug info:
Error code: generalexceptionmessage×Dismiss this notification
Stack trace:
line 54 of /report/advancedgrading/guide.php: TypeError thrown
×Dismiss this notification
Output buffer:
- line 1691 of /lib/dml/moodle_database.php: call to debugging()
- line 50 of /report/advancedgrading/locallib.php: call to moodle_database->get_record_sql()
- line 178 of /report/advancedgrading/locallib.php: call to get_grading_definition()
- line 39 of /report/advancedgrading/guide.php: call to init()
- line 356 of /lib/classes/string_manager_standard.php: call to debugging()
- line 7414 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
- line 99 of /report/advancedgrading/locallib.php: call to get_string()
- line 186 of /report/advancedgrading/locallib.php: call to header_fields()
- line 39 of /report/advancedgrading/guide.php: call to init()
- line 1691 of /lib/dml/moodle_database.php: call to debugging()
- line 50 of /report/advancedgrading/locallib.php: call to moodle_database->get_record_sql()
- line 187 of /report/advancedgrading/locallib.php: call to get_grading_definition()
- line 39 of /report/advancedgrading/guide.php: call to init()
Looking into the plugin function
https://github.com/marcusgreen/moodle-report_advancedgrading/blob/main/locallib.php#L41
/**
- Get the structure of this grading definition
- @param int $assignid
- @return \stdClass
*/
function get_grading_definition(int $assignid): \stdClass {
global $DB;
$sql = "SELECT gdef.id AS definitionid, ga.activemethod, gdef.name AS definition
FROM {assign} assign
JOIN {course_modules} cm ON cm.instance = assign.id
JOIN {context} ctx ON ctx.instanceid = cm.id
JOIN {grading_areas} ga ON ctx.id=ga.contextid
JOIN {grading_definitions} gdef ON ga.id = gdef.areaid
WHERE assign.id = :assignid";
$definition = $DB->get_record_sql($sql, ['assignid' => $assignid]);
return $definition;
}
The current query has the potential to join to unrelated course module or context records, that is why it is happening the error.
$sql = "SELECT gdef.id AS definitionid, ga.activemethod, gdef.name AS definition
FROM {assign} assign
JOIN {course_modules} cm ON cm.instance = assign.id
JOIN {modules} m ON m.id = cm.module AND m.name = 'assign'
JOIN {context} ctx ON ctx.instanceid = cm.id AND ctx.contextlevel = 70
JOIN {grading_areas} ga ON ctx.id=ga.contextid
JOIN {grading_definitions} gdef ON ga.id = gdef.areaid
WHERE assign.id = :assignid"
from moodle-report_advancedgrading.
I will investigate
from moodle-report_advancedgrading.
I still had this on my to do list, but unfortunately I was unable to share the backup as there's personalized data inside the course.
So thanks to @CristhianBohorquez for sharing additional info.
I think the trouble is the many 0 points in the rubric.
from moodle-report_advancedgrading.
Related Issues (19)
- Report should spread out like the gradebook report
- Site level reporting of Advanced Grading HOT 3
- The plugin don't apply the filters everywhere HOT 3
- A strings isn't localized HOT 1
- Javascript ordering and pagination isn't localized HOT 4
- Issue with number of submissions HOT 20
- Suggestion: a profile field should be selected by default HOT 1
- Problem loading datatables JS breaks javascript for site HOT 12
- Report in course context with course secondary navigation NOT module navigation links HOT 3
- 'Graded by' report issue HOT 10
- Failing unit test HOT 5
- Direct users to add a grading form if it doesn't exist
- Rubric breakdown report tab is visible to students HOT 8
- Support for Ranged Rubrics HOT 2
- Bug: User group data is not exported HOT 7
- Only active grading instances should be shown HOT 3
- headers in grading report occasionally do not match the data itself HOT 1
- Dowload report fails when images contained in assignment feedback. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-report_advancedgrading.