Students with permission "View all submissions" in moodle 3.0

Re: Students with permission "View all submissions" in moodle 3.0

by David Mudrák -
Number of replies: 4
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

Ouch. That looks like a regression of MDL-50673. By looking at the code, you are right. In 3.0, the list of others' submissions is displayed via grading report. But that is available only when you also have the capability to display all assessments.

Congratulations, you found a bug!

Average of ratings: Useful (2)
In reply to David Mudrák

Re: Students with permission "View all submissions" in moodle 3.0

by Toni Capilla -

Dear David,

I know you are doing a great job, Moodle is awesome but I upgraded to the 3.1.3 version and I have the same bug. Don't worry, I have tried to edit the code to fix this bug but I don't have enough knowledge of Moodle code so I did what I could.

I changed the file renderer.php:

  • I put the line 437 inside the if statement:
    • if ($options->showauthornames) {
          $table->head[] = $sortbyname;
      }
  • I added "$options->showauthornames and" in the line 489 
    • if ($options->showauthornames and $tr == 0) {

Now If I set  "mod/workshop:viewallassessments" and "mod/workshop:viewallsubmissions" permissions to students Rol and I remove "mod/workshop:viewauthornames", "mod/workshop:viewauthornames", "mod/workshop:viewauthorpublished", "mod/workshop:viewpublishedsubmissions" and "mod/workshop:viewreviewernames" permissions to students Rol my students can view all submissions without the name of the authors.

I have attached the renderer.php file with the changes.

I don't know if this site is the best place to put my changes.


All the best,

Toni

Average of ratings: Useful (1)
In reply to Toni Capilla

Re: Students with permission "View all submissions" in moodle 3.0

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Dear Toni,

Thanks a lot for sharing your bug fix. The best place to put your changes is the Moodle Tracker. You'll need to create an account there, then you'll be able to create a new issue (as described in the Tracker introduction guide). Thanks again for helping improve Moodle for everybody! smile

Average of ratings: Useful (1)