Skip to content

Commit

Permalink
MDL-82292 mod_assign: Merge picture and name columns
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed Jun 27, 2024
1 parent ad7fc69 commit 40e85c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mod/assign/gradingtable.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,7 @@ public function __construct(assign $assignment,

// User picture.
if ($this->hasviewblind || !$this->assignment->is_blind_marking()) {
if (!$this->is_downloading()) {
$columns[] = 'picture';
$headers[] = get_string('pictureofuser');
} else {
if ($this->is_downloading()) {
$columns[] = 'recordid';
$headers[] = get_string('recordid', 'assign');
}
Expand Down Expand Up @@ -896,8 +893,8 @@ public function col_picture(stdClass $row) {
public function col_fullname($row) {
if (!$this->is_downloading()) {
$courseid = $this->assignment->get_course()->id;
$link = new moodle_url('/user/view.php', array('id' => $row->id, 'course' => $courseid));
$fullname = $this->output->action_link($link, $this->assignment->fullname($row));
$fullname = $this->output->render(\core_user::get_profile_picture($row, null,
['courseid' => $courseid, 'includefullname' => true]));
} else {
$fullname = $this->assignment->fullname($row);
}
Expand Down
4 changes: 4 additions & 0 deletions mod/assign/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@
white-space: nowrap;
}

.path-mod-assign .gradingtable .d-inline-block {
white-space: nowrap;
}

.path-mod-assign .gradingtable .moodle-actionmenu[data-enhanced].show .menu a {
padding-left: 12px;
padding-right: 12px;
Expand Down

0 comments on commit 40e85c1

Please sign in to comment.