Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 88... Línea 88...
88
$USER->grade_last_report[$course->id] = 'overview';
88
$USER->grade_last_report[$course->id] = 'overview';
Línea 89... Línea 89...
89
 
89
 
90
$actionbar = new \core_grades\output\general_action_bar($context,
90
$actionbar = new \core_grades\output\general_action_bar($context,
Línea -... Línea 91...
-
 
91
    new moodle_url('/grade/report/overview/index.php', ['id' => $courseid]), 'report', 'overview');
-
 
92
 
-
 
93
$taskindicator = new \core\output\task_indicator(
-
 
94
    \core_course\task\regrade_final_grades::create($courseid),
-
 
95
    get_string('recalculatinggrades', 'grades'),
-
 
96
    get_string('recalculatinggradesadhoc', 'grades'),
-
 
97
    $PAGE->url,
91
    new moodle_url('/grade/report/overview/index.php', ['id' => $courseid]), 'report', 'overview');
98
);
92
 
99
 
93
if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
100
if (has_capability('moodle/grade:viewall', $context) && $courseid != SITEID) {
94
    // Please note this would be extremely slow if we wanted to implement this properly for all teachers.
101
    // Please note this would be extremely slow if we wanted to implement this properly for all teachers.
Línea 113... Línea 120...
113
        print_grade_page_head($courseid, 'report', 'overview', false, false, false,
120
        print_grade_page_head($courseid, 'report', 'overview', false, false, false,
114
            true, null, null, null, $actionbar);
121
            true, null, null, null, $actionbar);
Línea 115... Línea 122...
115
 
122
 
Línea -... Línea 123...
-
 
123
        groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
-
 
124
 
-
 
125
        if ($taskindicator->has_task_record()) {
-
 
126
            echo $OUTPUT->render($taskindicator);
-
 
127
            echo $OUTPUT->footer();
-
 
128
            exit;
116
        groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
129
        }
117
 
130
 
118
        if ($user_selector) {
131
        if ($user_selector) {
119
            $renderer = $PAGE->get_renderer('gradereport_overview');
132
            $renderer = $PAGE->get_renderer('gradereport_overview');
120
            echo $renderer->graded_users_selector('overview', $course, $userid, $currentgroup, false);
133
            echo $renderer->graded_users_selector('overview', $course, $userid, $currentgroup, false);
Línea 129... Línea 142...
129
        print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview') .
142
        print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview') .
130
            ' - ' . fullname($report->user), false, false, true, null, null,
143
            ' - ' . fullname($report->user), false, false, true, null, null,
131
            $report->user, $actionbar);
144
            $report->user, $actionbar);
132
        groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
145
        groups_print_course_menu($course, $gpr->get_return_url('index.php?id='.$courseid, array('userid'=>0)));
Línea -... Línea 146...
-
 
146
 
-
 
147
        if ($taskindicator->has_task_record()) {
-
 
148
            echo $OUTPUT->render($taskindicator);
-
 
149
            echo $OUTPUT->footer();
-
 
150
            exit;
-
 
151
        }
133
 
152
 
134
        if ($user_selector) {
153
        if ($user_selector) {
135
            $renderer = $PAGE->get_renderer('gradereport_overview');
154
            $renderer = $PAGE->get_renderer('gradereport_overview');
136
            echo $renderer->graded_users_selector('overview', $course, $userid, $currentgroup, false);
155
            echo $renderer->graded_users_selector('overview', $course, $userid, $currentgroup, false);
Línea 166... Línea 185...
166
            } else if ($node = $PAGE->settingsnav->get('usercurrentsettings', navigation_node::TYPE_CONTAINER)) {
185
            } else if ($node = $PAGE->settingsnav->get('usercurrentsettings', navigation_node::TYPE_CONTAINER)) {
167
                $node->forceopen = true;
186
                $node->forceopen = true;
168
            }
187
            }
Línea 169... Línea 188...
169
 
188
 
-
 
189
            echo $OUTPUT->header();
-
 
190
            if ($taskindicator->has_task_record()) {
-
 
191
                echo $OUTPUT->render($taskindicator);
-
 
192
                echo $OUTPUT->footer();
-
 
193
                exit;
170
            echo $OUTPUT->header();
194
            }
171
            if ($report->fill_table(true, true)) {
195
            if ($report->fill_table(true, true)) {
172
                echo html_writer::tag('h3', get_string('coursesiamtaking', 'grades'));
196
                echo html_writer::tag('h3', get_string('coursesiamtaking', 'grades'));
173
                echo '<br />' . $report->print_table(true);
197
                echo '<br />' . $report->print_table(true);
174
            }
198
            }
175
        } else { // We have a course context. We must be navigating from the gradebook.
199
        } else { // We have a course context. We must be navigating from the gradebook.
176
            print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview')
200
            print_grade_page_head($courseid, 'report', 'overview', get_string('pluginname', 'gradereport_overview')
177
                . ' - ' . fullname($report->user), false, false, true, null, null,
201
                . ' - ' . fullname($report->user), false, false, true, null, null,
-
 
202
                $report->user, $actionbar);
-
 
203
            if ($taskindicator->has_task_record()) {
-
 
204
                echo $OUTPUT->render($taskindicator);
-
 
205
                echo $OUTPUT->footer();
-
 
206
                exit;
178
                $report->user, $actionbar);
207
            }
179
            if ($report->fill_table()) {
208
            if ($report->fill_table()) {
180
                echo '<br />' . $report->print_table(true);
209
                echo '<br />' . $report->print_table(true);
181
            }
210
            }
182
        }
211
        }
Línea 187... Línea 216...
187
        $PAGE->set_heading(fullname($report->user));
216
        $PAGE->set_heading(fullname($report->user));
188
        echo $OUTPUT->header();
217
        echo $OUTPUT->header();
189
    }
218
    }
Línea 190... Línea 219...
190
 
219
 
-
 
220
    if (count($report->teachercourses)) {
-
 
221
        if ($taskindicator->has_task_record()) {
-
 
222
            echo $OUTPUT->render($taskindicator);
-
 
223
            echo $OUTPUT->footer();
-
 
224
            exit;
191
    if (count($report->teachercourses)) {
225
        }
192
        echo html_writer::tag('h3', get_string('coursesiamteaching', 'grades'));
226
        echo html_writer::tag('h3', get_string('coursesiamteaching', 'grades'));
193
        $report->print_teacher_table();
227
        $report->print_teacher_table();
Línea 194... Línea 228...
194
    }
228
    }