Thank u Emma
everything is OK now
Thank u Emma
everything is OK now
The patch above solved it. The issue I was having was only with JPGs. As for the Google question, we use Google anyway for most of our students writing, so having Google doing the rendering makes it look exactly as the student intended.
I think, If you want assignments to show up for a teacher then add a date to the (new in 3.3) setting "Reminder to grade by" when setting up the assignment.
Hi Dan,
Since your listing is for the ad-hoc reports plugin and is coded for the old deprecated assignment version, I just made the few changes needed to make it work with the new assign version in the current ad-hoc plugin. I am not positive that it is getting entirely what you want as it does leave out people who are in the course but have not submitted anything.
Try this:
SELECT
u.firstname AS "First",
u.lastname AS "Last",
c.fullname AS "Course",
a.name AS "Assignment"
FROM {assign_submission} AS asb
JOIN {assign} AS a ON a.id = asb.assignment
JOIN {user} AS u ON u.id = asb.userid
JOIN {assign_grades} AS ag ON ag.assignment = asb.assignment
JOIN {course} AS c ON c.id = a.course
JOIN {course_modules} AS cm ON c.id = cm.course
WHERE ag.grade < 0 AND cm.instance = a.id
AND cm.module = 1
ORDER BY c.fullname, a.name, u.lastname
Hello,
I seem to be having an issue with the "View all courses - System" role and assignments.
It seems that students names are missing when viewing all submissions, also feedback files receive a "File not found" error.
The capability mod/assign:view is allowed.
Jamie--Did you ever find a resolution for this. We have the same issue.
Thanks
Hello,
we are runnig moodle with 11000 registered users and about max 100-200 active simultanous users (based on active apache worker count). Courses are used on classes, so activity is concentrated during school hours, but problems occur even afternoon. We have hundreds of isolated student groups (we serve multiple schools, which have multiple classes) and each has a teacher within it. We have like 10 active courses.
Assignment (onlinetext) opening as student are usually taking less than 0.5 second with less than 0.1 second database time. Usually ~93 DB reads are made. But we often get 30 seconds to load and making 40k DB reads. Or 100 second with similar DB reads and DB write error.
Such request like /moodle/mod/assign/view.php?id=10125 can have 3 resolutions (on same assignment with same student testing account):
1. everything ok, fast load, RAM peak 10MB, ~93 DB reads
2. very slow load, 30 seconds and more, RAM peak 230MB, more than 40000 DB reads
3. very slow with failure, 30-100 seconds ending with error "Error during database write". RAM peak 230MB, more then 40000 DB reads
I have found such error in error_log:
[Tue Oct 09 17:18:33.513944 2018] [proxy_fcgi:error] [pid 6458] [client 1.2.3.4:11544] AH01071: Got error 'PHP message: Default exception handler: Chyba pri z\xc3\xa1pise do datab\xc3\xa1zy Debug: Duplicate entry '28748-3539' for key 'mdl_gradgrad_useite_uix'\nINSERT INTO mdl_grade_grades (itemid,userid,rawgrade,rawgrademax,rawgrademin,rawscaleid,usermodified,finalgrade,hidden,locked,locktime,exported,overridden,excluded,timecreated,timemodified,aggregationstatus,aggregationweight) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\n[array (\n 0 => '3539',\n 1 => '28748',\n 2 => NULL,\n 3 => 100,\n 4 => 0,\n 5 => NULL,\n 6 => NULL,\n 7 => NULL,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0,\n 13 => 0,\n 14 => NULL,\n 15 => NULL,\n 16 => 'unknown',\n 17 => NULL,\n)]\nError code: dmlwriteexception\n* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown\n* line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()\n* line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()\n* line 342 of /lib/grade/grade_object.php: call to m...\n', referer: https://www.ourmoodle.sk/moodle/mod/lesson/view.php?id=10125&forceview=1
Example load time for everything OK load
0.114565 secs
RAM: 9.6MB
RAM peak: 9.7MB
Included 276 files
get_string calls: 240
DB reads/writes: 93/0
DB queries time: 0.02436 secs
ticks: 12 user: 6sys: 4 cuser: 0 csys: 0
Load average: 1.23
Session (core\session\redis): 26.2KB
Caches used (hits/misses/sets): 0/0/0
Example load time for slow load, but successful
37.736572 secs
RAM: 10MB
RAM peak: 229.5MB
Included 297 files
get_string calls: 241
DB reads/writes: 41898/13
DB queries time: 29.1418 secs
ticks: 3773 user: 1055sys: 151 cuser: 0 csys: 0
Load average: 3.09
Session (core\session\redis): 26.2KB
Example load time for slow failed load
40.115793 secs
RAM: 10.1MB
RAM peak: 221.2MB
Included 278 files
get_string calls: 223
DB reads/writes: 40881/11
DB queries time: 29.61183 secs
ticks: 4011 user: 1239sys: 132 cuser: 0 csys: 0
Load average: 7.91
Session (core\session\redis): 29.6KB
All load times from same assignment.
I have logged queries from slow successful load.
Most of them are those 2 queries for different user every time.
SELECT gi.id, gg.aggregationstatus, gg.aggregationweight FROM mdl_grade_grades gg
JOIN mdl_grade_items gi ON (gg.itemid = gi.id)
WHERE gg.userid = ? AND (gi.categoryid = ? OR gi.id IN (?,?,?,?,?,?))
stacktrace:
* line 835 of /lib/grade/grade_category.php: call to mysqli_native_moodle_database->get_recordset_sql()
* line 793 of /lib/grade/grade_category.php: call to grade_category->set_usedinaggregation()
* line 541 of /lib/grade/grade_category.php: call to grade_category->aggregate_grades()
* line 736 of /lib/grade/grade_item.php: call to grade_category->generate_grades()
* line 1256 of /lib/gradelib.php: call to grade_item->regrade_final_grades()
* line 440 of /lib/gradelib.php: call to grade_regrade_final_grades()
* line 5716 of /mod/assign/locallib.php: call to grade_get_grades()
* line 5765 of /mod/assign/locallib.php: call to assign->submissions_open()
* line 4974 of /mod/assign/locallib.php: call to assign->can_edit_submission()
* line 5164 of /mod/assign/locallib.php: call to assign->get_assign_submission_status_renderable()
* line 5423 of /mod/assign/locallib.php: call to assign->view_student_summary()
* line 618 of /mod/assign/locallib.php: call to assign->view_submission_page()
* line 55 of /mod/assign/view.php: call to assign->view()
SELECT itemid
FROM mdl_grade_grades
WHERE itemid IN (?,?,?,?,?,?) AND userid = ?
stacktrace:
* line 637 of /lib/grade/grade_category.php: call to mysqli_native_moodle_database->get_records_sql()
* line 541 of /lib/grade/grade_category.php: call to grade_category->aggregate_grades()
* line 736 of /lib/grade/grade_item.php: call to grade_category->generate_grades()
* line 1256 of /lib/gradelib.php: call to grade_item->regrade_final_grades()
* line 440 of /lib/gradelib.php: call to grade_regrade_final_grades()
* line 5716 of /mod/assign/locallib.php: call to grade_get_grades()
* line 5765 of /mod/assign/locallib.php: call to assign->submissions_open()
* line 4974 of /mod/assign/locallib.php: call to assign->can_edit_submission()
* line 5164 of /mod/assign/locallib.php: call to assign->get_assign_submission_status_renderable()
* line 5423 of /mod/assign/locallib.php: call to assign->view_student_summary()
* line 618 of /mod/assign/locallib.php: call to assign->view_submission_page()
* line 55 of /mod/assign/view.php: call to assign->view()
That database error might be conflict during simultanous regrading? I don't know how moodle works internally.
I have checked some code in speed. Function grade_get_grades calls grade_regrade_final_grades if $course_item->needsupdate. But it does not pass $userid_or_ids to regrading function, which possibly causes regrading for whole course. grade_regrade_final_grades support only single userid, which could be passed as special case for single user regrading. But this will not work, as $course_item->needsupdate would halt regrading ('Can not do fast regrading after updating of raw grades');
https://github.com/moodle/moodle/blob/3cced42eb37a1e92a2ff38feb1c099ec54cc4e20/lib/gradelib.php#L440
This whole course regrading on assignment load possibly occured afternoon due some teacher evaluation action?
We have also experience moodle title page load time of 30 seconds, but 0.1 seconds in database. Probably not related. Title page load is mostly under 0.5 second load even during school hours.
Moodle 3.5.2 (Build: 20180910), Ubuntu 16.04, PHP 7.2 (via Ondrej Sury PPA), PHP-FPM, xsendfile, MySQL 5.7 (somewhat tuned), redis for sessions, memcache for everything possible.
We are not aware of such problems last season, when we used moodle 3.1 with PHP 5.6 and older versions of everything. We had 6vCPU 6GB RAM virtual machine then, now we are playing with 16vCPU+60GB RAM (will be optimized to 15GB after we solve this issue).
Wow! That's perhaps the most provided info about an issue I have ever seen in these forums!
Is this an all in one box? DB server/database on same server as code? Assuming it is cause you've not mentioned other wise.
And what does 'somewhat tuned' ... look like?
How much memory is the database server allowed to use?
Is server using any SWAP space? If so, what's using it?
'spirit of sharing', Ken
I am solving our problems for two weeks, so I am digging deep now. We have same virtual server on GCP for web and mysql server. 5 minute load always below 16 (16 cores VM), typically 10. Memory usage 9-12GB, capacity is 50GB (will be optimized later). Currently no swap as we have tons of RAM.
We migrated to GCP on monday evening. Before we even had separate mysql server and web server at local hosting company. Both 16vCPU and dozens of RAM. But still there were performance problems (extremely high load, low CPU usage, high stolen time). Local hosting company found hypervisor level issue, but after we migrated. Moodle Benchmark is now all green with score 200 points.
We even reached two Moodle Partner companies, but they were not able to help.
mysql configuration was tuned by some advices and by mysqltuner script (which always advises to increase buffers)
I had to increase open file limit in systemd unit to get more than 214 connections. ibtmp is in tmpfs mount
key_buffer_size= 32M
max_allowed_packet= 16M
thread_stack= 192K
thread_cache_size = 8
max_connections = 700
query_cache_limit= 2M
query_cache_size = 64M
query_cache_type = 1
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix
innodb_buffer_pool_size=8G
innodb_log_file_size=1G
innodb_temp_data_file_path=ram_disk_tmp/mysql_ibtmp1:12M:autoextend:max:1500M
join_buffer_size=8000K
sort_buffer_size=6000K
read_rnd_buffer_size=4000K
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake
table_open_cache = 4000
tmp-table-size = 32M
max-heap-table-size = 32M
slow log has 2 queries per minute like this:
# Query_time: 2.534468 Lock_time: 0.000193 Rows_sent: 395519 Rows_examined: 1186694
SET timestamp=1539326757;
SELECT g.id,g.itemid,g.userid,g.rawgrade,g.rawgrademax,g.rawgrademin,g.rawscaleid,g.usermodified,g.finalgrade,g.hidden,g.locked,g.locktime,g.exported,g.overridden,g.excluded,g.timecreated,g.timemodified,g.aggregationstatus,g.aggregationweight
FROM mdl_grade_grades g, mdl_grade_items gi
WHERE gi.id = g.itemid AND gi.id IN ('3540','3579','3580','3581','3582','3583','3584','3585','3586','3587','3589','3590','3591','3592','3593','3594','3595','3596','3597','3598','3599','3600','3601','3602','3603','3604','3605','3606','3607','3608','3609','3610','3611','3612','3613','3614','3615','3616','3617','3618','3619','3620','3621','3622','3623','3624','3625','3626','3627','3628','3629','3630','3631','3632','3633','3634','3635','3636','3637','3638','3639','3640','3641','3642','3643','3644','3645','3646','3648','3649','3650','3651','3652','3653','3654','3655','3657','3658','3659','3660','3661','3662','3663','3664','3665','3666','3667','3668','3669','3670','3671','3672','3673','3674','3675','3676','3677','3678','3679','3680','3681','3682','3683','3684','3685','3686','3688','3689','3690','3691','3715','3735','3736','3737','3738','3739','3740','3741','3742','3743','3745','3746','3747','3748','3750','3751','3752','3753','3754','3755','3758','3857','3858','3859','3860','3848','3539')
ORDER BY g.userid;
Why is moodle fetching 400k rows? Why is there 1200k rows examined? We just started season a month ago.
mysql does not seem to be a problem now. Looks like moodle level problem for me. Are there any practical limits of student count on larger course? We are reusing and updating courses each season. We also delete student and teacher accounts between seasons. Is it possible, that some older grading data were left in tables? But regrading should use only referenced data for existing enrolled users.
What is GCP ... Google Cloud Platform?
2 MP's and no resolution? Surprising ...
About old data being retained ... if the table in question has any columns for time (date) one could query that table and see if there is any time(date) earlier than the date of your new academic year.
The only item missing from config of mysql is innodb_buffer_pool_instance ... which, according to what I've read from Percona blogs/advice, 1 per every Gig of innodb_buffer_pool_size
'spirit of sharing', Ken
Yes, Google Cloud Platform.
First MP backed out before discovering regrading issue, only suggested some browser related performance settings. They were given option to access our server, so they could examine log files. That did not happen and they don't have experience with our moodle size. Second MP is busy with other clients a cannot help us now. No response to regrading issue.
I briefly checked mdl_grade_grades and could not find any rows referencing older users marked as deleted. I also noticed there are grade rows precreated for users*grade_items with rawgrade=NULL. Only 10k of 855k rows has some rawgrade.
What can force grade recalculation during normal non-editing actions - during lessons?
By the way, how do I safely remove users marked as deleted from database? I am not sure, if 'DELETE FROM mdl_user WHERE deleted=1;' is safe.
Quick thought about slow assignment load time ... if you can ID those assignments, do they have any external URL to an image, etc. or app associated? External URL/resource would require a DNS lookup.
I have a very small GCP instance of 2 Moodles and will tinker to see what's up, but don't hold your breath!
"What can force grade recalculation during normal non-editing actions - during lessons?"
Dunno!
"By the way, how do I safely remove users marked as deleted from database?"
If you resort to direct database actions, make sure the accounts to be removed/erased from DB don't have anything residing in files ... id number from mdl_user cross referenced with userid in mdl_files. For that matter, any course that issued certificates, as an example, might still list the students certificate as a URL but file cannot be found.
If something remains for the accounts they become orphaned and pretty much hidden from Moodle Admin view.
A site your size, it's like looking for a needle in haystack ... for real! :\
You might check into moosh - CLI only. It has several commands for users.
https://moosh-online.com/commands/
'spirit of sharing', Ken
But, to a client/student whose DNS not working so well, it would have the appearance of moodle slow.
Ok, looked at this question again ... "2 queries per minute" - sounds like a task.
and the task related to assignments and grades are? A few I looked for in task ...
Prep submissions for annotation - related to assignments and grades.
Publish as LTI tool grade sync \enrol_lti\task\sync_grades
LTI Assignment and Grade Services table cleanup \ltiservice_gradebookservices\task\cleanup_task
Background processing for gradebook \core\task\grade_cron_task
Would need to cross reference these: 3540','3579','3580','3581','3582','3583','3584','3585' - itemid's?
Think those are Assignment ID's so looking for a brief description of those along with maybe type of assignment might give clues.
'spirit of sharing', Ken
Isn't this post in the Assignment forum? Why move it to the General Forum?
I was hoping to see an option to delete the entire submission (Online Text and File submission). As a site admin we can delete a quiz attempt and a SCORM attempt, so I was expecting to find a comparable option with the assignment submissions. I can select the submission for the assignment, but the only actions available are:
Reverting the submission to draft status does allow the student and the admin to replace the file that was attached to the submission but it does not give the student or anyone else the option to delete the entire submission. I could find nothing in the site-wide settings for the assignment or in the settings for the individual assignment that would allow anyone to do this.
That is what is addressed by MDL-59577. There is no bug because it is working as designed. I can understand why it was designed like that. However, I don't understand why there is not a "Delete submission" option in the list above like we see in the quiz module and the SCORM module. People make mistakes and need to delete things sometimes.
Hello Rod. This thread is better in the assignment forum, I agree. I believe that tracker issue IS a bug or rather, a regression, because in 2.7 a new capability was added to give to teachers with the purpose of allowing them to edit or delete submissions. https://docs.moodle.org/en/Capabilities/mod/assign:editothersubmission For online text this works OK because you can delete the text, but for submitted files it no longer works as it should - I think - because of a fix to a different problem, as outlined in the tracker issue. /MDL-59577
There never was a "Delete submission" option, but there is an Edit submission option (if the person has that capability). It does seem now, however, that when using this to delete a submitted file, it is then no longer possible to save the assignment.
Is there any way that the teacher can upload a file in Assignment(Rubric grading method) on behalf of all the Students, regardless of the student submitting Assignment. Actually, we discover that if the teacher wants to take an oral test, she can upload the paper in the rubric for each student without telling them(also by invisible the Assignment). When she takes the oral test, she can directly mark the mistake on the paper and T the same time she can grade in the Rubric. This is one of the best ways to use the Rubric and complete the task. The problem arises when there are more than 50 students, it's hard for the teacher to upload a file for every Students.
I just want to request, in the Setting option where there is Feedface box to drop a file. Please, if possible for programmer can also add a box" for teacher file drop" that allows the file to appear in all the student Rubric window. We are using this system vastly. I really need help regarding it.
we are using Moodle 3.2
Thanks
Hi ,
I have problem about Group submission settings section that includes four settings for the group assignment . My assignment show only "Students submit in groups " but can not enable ,and my assignment not show apply grade and feedback to entire group button.
How to solve this problem ? Thank you for your help.
I think it’s not enabled in your settings because a student has already submitted something. Try creating a new Assignment activity and the setting will likely be enabled for you to use.
You can view one student’s assignment submissions at a glance by accessing that student’s activity report. Click on the student name in the Participants’ list and under the Reports section click on Complete report. I don’t think you can actually grade on this screen but if you’re ok with grading through the Gradebook interface rather than the Assignment interface you can always have the student’s ‘Single view’ form in the gradebook open in another tab/window, at the same time, for ease of access to grading for that individual student only.