MDL-12025, enable row markings via javascript to keep track of current row
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* enables highlight of rows in user grade tables
|
||||
*
|
||||
*/
|
||||
function markRowsInit() {
|
||||
// for every table row ...
|
||||
var rows = document.getElementById('user-grades').getElementsByTagName('tr');
|
||||
for ( var i = 0; i < rows.length; i++ ) {
|
||||
// ... with the class 'odd' or 'even' ...
|
||||
// ... and to mark the row on click ...
|
||||
rows[i].onmousedown = function() {
|
||||
|
||||
if (this.className.search(/marked/) != -1) {
|
||||
this.className = this.className.replace(' marked', '');
|
||||
} else {
|
||||
this.className += ' marked';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
window.onload=markRowsInit;
|
||||
@@ -159,7 +159,9 @@ if (!empty($studentsperpage)) {
|
||||
print_paging_bar($numusers, $report->page, $studentsperpage, $report->pbarurl);
|
||||
}
|
||||
|
||||
$reporthtml = '<table id="user-grades" class="gradestable flexible boxaligncenter generaltable">';
|
||||
$reporthtml = '<script src="functions.js" type="text/javascript"></script>';
|
||||
|
||||
$reporthtml .= '<table id="user-grades" class="gradestable flexible boxaligncenter generaltable">';
|
||||
$reporthtml .= $report->get_headerhtml();
|
||||
$reporthtml .= $report->get_rangehtml();
|
||||
$reporthtml .= $report->get_studentshtml();
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
|
||||
.grade-report-grader table#user-grades tr.marked td.cell {
|
||||
background-color: #FFCC99 ;
|
||||
}
|
||||
|
||||
.grade-report-grader table#user-grades .catlevel1 {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user