mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-13050 Reverting, it's not working out as well as planned
This commit is contained in:
parent
e5eabf22fe
commit
6dac764d18
6 changed files with 7 additions and 127 deletions
|
@ -1020,26 +1020,7 @@ class assignment_base {
|
||||||
|
|
||||||
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
|
add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
|
||||||
|
|
||||||
$navlinks = array();
|
$navigation = build_navigation($this->strsubmissions, $this->cm);
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => $this->strsubmissions,
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'link');
|
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
|
|
||||||
print_header_simple(format_string($this->assignment->name,true), "", $navigation,
|
print_header_simple(format_string($this->assignment->name,true), "", $navigation,
|
||||||
'', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
|
'', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
|
@ -50,25 +50,7 @@
|
||||||
$strsubmissions = get_string("submissions", "exercise");
|
$strsubmissions = get_string("submissions", "exercise");
|
||||||
|
|
||||||
// ... print the header and...
|
// ... print the header and...
|
||||||
$navlinks = array();
|
$navigation = build_navigation($strsubmissions, $cm);
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => $strsubmissions,
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'title');
|
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
print_header_simple(format_string($exercise->name), "", $navigation,
|
print_header_simple(format_string($exercise->name), "", $navigation,
|
||||||
"", "", true);
|
"", "", true);
|
||||||
|
|
||||||
|
|
|
@ -225,35 +225,16 @@
|
||||||
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
$strwaitingapproval = get_string('waitingapproval', 'glossary');
|
||||||
|
|
||||||
/// If we are in approval mode, prit special header
|
/// If we are in approval mode, prit special header
|
||||||
$navlinks = array();
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
|
|
||||||
if ($tab == GLOSSARY_APPROVAL_VIEW) {
|
if ($tab == GLOSSARY_APPROVAL_VIEW) {
|
||||||
require_capability('mod/glossary:approve', $context);
|
require_capability('mod/glossary:approve', $context);
|
||||||
|
|
||||||
$navlinks[] = array(
|
$navigation = build_navigation($strwaitingapproval, $cm);
|
||||||
'name' => $strwaitingapproval,
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'title');
|
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
||||||
|
|
||||||
print_heading($strwaitingapproval);
|
print_heading($strwaitingapproval);
|
||||||
} else { /// Print standard header
|
} else { /// Print standard header
|
||||||
$navigation = build_navigation($navlinks);
|
$navigation = build_navigation('', $cm);
|
||||||
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
|
||||||
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,7 +408,6 @@ function hotpot_delete_selected_attempts(&$hotpot, $del) {
|
||||||
/// report selector menus
|
/// report selector menus
|
||||||
|
|
||||||
function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||||
global $CFG;
|
|
||||||
$strmodulenameplural = get_string("modulenameplural", "hotpot");
|
$strmodulenameplural = get_string("modulenameplural", "hotpot");
|
||||||
$strmodulename = get_string("modulename", "hotpot");
|
$strmodulename = get_string("modulename", "hotpot");
|
||||||
|
|
||||||
|
@ -416,22 +415,6 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||||
$heading = $course->fullname;
|
$heading = $course->fullname;
|
||||||
|
|
||||||
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
$modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
|
||||||
|
|
||||||
$navlinks = array();
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
|
|
||||||
|
|
||||||
if (has_capability('mod/hotpot:viewreport',$modulecontext)) {
|
if (has_capability('mod/hotpot:viewreport',$modulecontext)) {
|
||||||
if ($mode=='overview' || $mode=='simplestat' || $mode=='fullstat') {
|
if ($mode=='overview' || $mode=='simplestat' || $mode=='fullstat') {
|
||||||
$module = "quiz";
|
$module = "quiz";
|
||||||
|
@ -439,18 +422,10 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
|
||||||
$module = "hotpot";
|
$module = "hotpot";
|
||||||
}
|
}
|
||||||
|
|
||||||
$navlinks[] = array(
|
$navigation = build_navigation(get_string("report$mode", $module), $cm);
|
||||||
'name' => get_string("report$mode", $module),
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'title');
|
|
||||||
} else {
|
} else {
|
||||||
$navlinks[] = array(
|
$navigation = build_navigation(get_string("report", "quiz"), $cm);
|
||||||
'name' => get_string("report", "quiz"),
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'title');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
|
|
||||||
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
$button = update_module_button($cm->id, $course->id, $strmodulename);
|
||||||
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
|
||||||
|
|
|
@ -27,21 +27,7 @@ class quiz_default_report {
|
||||||
$strquizzes = get_string("modulenameplural", "quiz");
|
$strquizzes = get_string("modulenameplural", "quiz");
|
||||||
$strquiz = get_string("modulename", "quiz");
|
$strquiz = get_string("modulename", "quiz");
|
||||||
/// Print the page header
|
/// Print the page header
|
||||||
$navlinks = array();
|
$navigation = build_navigation('', $cm);
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
|
|
||||||
print_header_simple(format_string($quiz->name), "", $navigation,
|
print_header_simple(format_string($quiz->name), "", $navigation,
|
||||||
'', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
|
'', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
|
||||||
|
|
|
@ -68,32 +68,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// ...display header...
|
// ...display header...
|
||||||
|
|
||||||
if ($action == 'teachersview') {
|
|
||||||
$navlinks = array();
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('grades'),
|
|
||||||
'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'link');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => get_string('modulenameplural', $cm->modname),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
|
|
||||||
'type' => 'activity');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => format_string($cm->name),
|
|
||||||
'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
|
|
||||||
'type' => 'activityinstance');
|
|
||||||
$navlinks[] = array(
|
|
||||||
'name' => $action,
|
|
||||||
'link' => '',
|
|
||||||
'type' => 'title');
|
|
||||||
|
|
||||||
|
|
||||||
$navigation = build_navigation($navlinks);
|
|
||||||
} else {
|
|
||||||
$navigation = build_navigation($action, $cm);
|
$navigation = build_navigation($action, $cm);
|
||||||
}
|
|
||||||
|
|
||||||
print_header_simple(format_string($workshop->name), "", $navigation,
|
print_header_simple(format_string($workshop->name), "", $navigation,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
|
"", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue