mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
MDL-10870 All files updated to new build_navigation() method.
This commit is contained in:
parent
d8c684de7e
commit
f1af7aaaf5
14 changed files with 125 additions and 91 deletions
|
@ -18,9 +18,11 @@
|
||||||
$stradministration = get_string("administration");
|
$stradministration = get_string("administration");
|
||||||
$site = get_site();
|
$site = get_site();
|
||||||
|
|
||||||
|
$navigation = build_navigation(array(
|
||||||
|
array('name'=>$stradministration, 'link'=>'index.php', 'type'=>'misc'),
|
||||||
|
array('name'=>$strdatabaseperformance, 'link'=>null, 'type'=>'misc')));
|
||||||
if (!empty($topframe)) {
|
if (!empty($topframe)) {
|
||||||
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
|
print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", $navigation);
|
||||||
"<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,8 @@
|
||||||
error_reporting($CFG->debug);
|
error_reporting($CFG->debug);
|
||||||
if (empty($agreelicense)) {
|
if (empty($agreelicense)) {
|
||||||
$strlicense = get_string('license');
|
$strlicense = get_string('license');
|
||||||
print_header($strlicense, $strlicense, $strlicense, "", "", false, " ", " ");
|
$navigation = build_navigation(array(array('name'=>$strlicense, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strlicense, $strlicense, $navigation, "", "", false, " ", " ");
|
||||||
print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
|
print_heading("<a href=\"http://moodle.org\">Moodle</a> - Modular Object-Oriented Dynamic Learning Environment");
|
||||||
print_heading(get_string('copyrightnotice'));
|
print_heading(get_string('copyrightnotice'));
|
||||||
print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
|
print_box(text_to_html(get_string('gpl')), 'copyrightnotice');
|
||||||
|
@ -141,7 +142,8 @@
|
||||||
}
|
}
|
||||||
if (empty($confirmrelease)) {
|
if (empty($confirmrelease)) {
|
||||||
$strcurrentrelease = get_string("currentrelease");
|
$strcurrentrelease = get_string("currentrelease");
|
||||||
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
|
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, " ", " ");
|
||||||
print_heading("Moodle $release");
|
print_heading("Moodle $release");
|
||||||
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
|
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'), 'generalbox boxaligncenter boxwidthwide');
|
||||||
echo '<form action="index.php"><div>';
|
echo '<form action="index.php"><div>';
|
||||||
|
@ -157,7 +159,8 @@
|
||||||
|
|
||||||
$strdatabasesetup = get_string("databasesetup");
|
$strdatabasesetup = get_string("databasesetup");
|
||||||
$strdatabasesuccess = get_string("databasesuccess");
|
$strdatabasesuccess = get_string("databasesuccess");
|
||||||
print_header($strdatabasesetup, $strdatabasesetup, $strdatabasesetup,
|
$navigation = build_navigation(array(array('name'=>$strdatabasesetup, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strdatabasesetup, $strdatabasesetup, $navigation,
|
||||||
"", upgrade_get_javascript(), false, " ", " ");
|
"", upgrade_get_javascript(), false, " ", " ");
|
||||||
/// return to original debugging level
|
/// return to original debugging level
|
||||||
$CFG->debug = $origdebug;
|
$CFG->debug = $origdebug;
|
||||||
|
@ -167,13 +170,13 @@
|
||||||
|
|
||||||
/// Both old .sql files and new install.xml are supported
|
/// Both old .sql files and new install.xml are supported
|
||||||
/// But we prioritise install.xml (XMLDB) if present
|
/// But we prioritise install.xml (XMLDB) if present
|
||||||
|
|
||||||
change_db_encoding(); // first try to change db encoding to utf8
|
change_db_encoding(); // first try to change db encoding to utf8
|
||||||
if (!setup_is_unicodedb()) {
|
if (!setup_is_unicodedb()) {
|
||||||
// If could not convert successfully, throw error, and prevent installation
|
// If could not convert successfully, throw error, and prevent installation
|
||||||
print_error('unicoderequired', 'admin');
|
print_error('unicoderequired', 'admin');
|
||||||
}
|
}
|
||||||
|
|
||||||
$status = false;
|
$status = false;
|
||||||
if (file_exists("$CFG->libdir/db/install.xml")) {
|
if (file_exists("$CFG->libdir/db/install.xml")) {
|
||||||
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
|
$status = install_from_xmldb_file("$CFG->libdir/db/install.xml"); //New method
|
||||||
|
@ -267,7 +270,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($confirmupgrade)) {
|
if (empty($confirmupgrade)) {
|
||||||
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
$navigation = build_navigation(array(array('name'=>$strdatabasechecking, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strdatabasechecking, $stradministration, $navigation,
|
||||||
"", "", false, " ", " ");
|
"", "", false, " ", " ");
|
||||||
|
|
||||||
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
|
notice_yesno(get_string('upgradesure', 'admin', $a->newversion), 'index.php?confirmupgrade=1', 'index.php');
|
||||||
|
@ -275,14 +279,15 @@
|
||||||
|
|
||||||
} else if (empty($confirmrelease)){
|
} else if (empty($confirmrelease)){
|
||||||
$strcurrentrelease = get_string("currentrelease");
|
$strcurrentrelease = get_string("currentrelease");
|
||||||
print_header($strcurrentrelease, $strcurrentrelease, $strcurrentrelease, "", "", false, " ", " ");
|
$navigation = build_navigation(array(array('name'=>$strcurrentrelease, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strcurrentrelease, $strcurrentrelease, $navigation, "", "", false, " ", " ");
|
||||||
print_heading("Moodle $release");
|
print_heading("Moodle $release");
|
||||||
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
|
print_box(get_string('releasenoteslink', 'admin', 'http://docs.moodle.org/en/Release_Notes'));
|
||||||
|
|
||||||
require_once($CFG->libdir.'/environmentlib.php');
|
require_once($CFG->libdir.'/environmentlib.php');
|
||||||
print_heading(get_string('environment', 'admin'));
|
print_heading(get_string('environment', 'admin'));
|
||||||
if (!check_moodle_environment($release, $environment_results, true)) {
|
if (!check_moodle_environment($release, $environment_results, true)) {
|
||||||
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
|
notice_yesno(get_string('environmenterrorupgrade', 'admin'),
|
||||||
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
|
'index.php?confirmupgrade=1&confirmrelease=1', 'index.php');
|
||||||
} else {
|
} else {
|
||||||
notify(get_string('environmentok', 'admin'), 'notifysuccess');
|
notify(get_string('environmentok', 'admin'), 'notifysuccess');
|
||||||
|
@ -300,7 +305,8 @@
|
||||||
die;
|
die;
|
||||||
} else {
|
} else {
|
||||||
$strdatabasesuccess = get_string("databasesuccess");
|
$strdatabasesuccess = get_string("databasesuccess");
|
||||||
print_header($strdatabasechecking, $stradministration, $strdatabasechecking,
|
$navigation = build_navigation(array(array('name'=>$strdatabasesuccess, 'link'=>null, 'type'=>'misc')));
|
||||||
|
print_header($strdatabasechecking, $stradministration, $navigation,
|
||||||
"", upgrade_get_javascript(), false, " ", " ");
|
"", upgrade_get_javascript(), false, " ", " ");
|
||||||
|
|
||||||
/// return to original debugging level
|
/// return to original debugging level
|
||||||
|
@ -309,7 +315,7 @@
|
||||||
upgrade_log_start();
|
upgrade_log_start();
|
||||||
|
|
||||||
/// Upgrade current language pack if we can
|
/// Upgrade current language pack if we can
|
||||||
upgrade_language_pack();
|
upgrade_language_pack();
|
||||||
|
|
||||||
print_heading($strdatabasechecking);
|
print_heading($strdatabasechecking);
|
||||||
$db->debug=true;
|
$db->debug=true;
|
||||||
|
@ -337,7 +343,7 @@
|
||||||
}
|
}
|
||||||
// update core events
|
// update core events
|
||||||
events_update_definition();
|
events_update_definition();
|
||||||
|
|
||||||
require_once($CFG->libdir.'/statslib.php');
|
require_once($CFG->libdir.'/statslib.php');
|
||||||
if (!stats_upgrade_for_roles_wrapper()) {
|
if (!stats_upgrade_for_roles_wrapper()) {
|
||||||
notify('Couldn\'t upgrade the stats tables to use the new roles system');
|
notify('Couldn\'t upgrade the stats tables to use the new roles system');
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
print_header("$site->shortname: $strmnetsettings", "$site->fullname",
|
$navlinks = array();
|
||||||
'<a href="'.$CFG->wwwroot.'/admin/index.php">'.$stradministration.'</a> -> '.
|
$navlinks[] = array('name' => $stradministration, 'link' => $CFG->wwwroot.'/admin/index.php', 'type' => 'misc');
|
||||||
'<a href="'.$CFG->wwwroot.'/admin/mnet/index.php">'.get_string('mnetsettings', 'mnet').'</a> -> Delete host');
|
$navlinks[] = array('name' => get_string('mnetsettings', 'mnet'), 'link' => $CFG->wwwroot.'/admin/mnet/index.php', 'type' => 'misc');
|
||||||
|
$navlinks[] = array('name' => get_string('deletehost', 'mnet'), 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header("$site->shortname: $strmnetsettings", "$site->fullname", $navigation);
|
||||||
|
|
||||||
print_heading(get_string('mnetsettings', 'mnet'));
|
print_heading(get_string('mnetsettings', 'mnet'));
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -33,9 +33,11 @@
|
||||||
$stradministration = get_string("administration");
|
$stradministration = get_string("administration");
|
||||||
$strregistration = get_string("registration");
|
$strregistration = get_string("registration");
|
||||||
$strregistrationinfo = get_string("registrationinfo");
|
$strregistrationinfo = get_string("registrationinfo");
|
||||||
|
$navlinks = array();
|
||||||
print_header("$site->shortname: $strregistration", $site->fullname,
|
$navlinks[] = array('name' => $stradministration, 'link' => "../$CFG->admin/index.php", 'type' => 'misc');
|
||||||
"<a href=\"../$CFG->admin/index.php\">$stradministration</a> -> $strregistration");
|
$navlinks[] = array('name' => $strregistration, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header("$site->shortname: $strregistration", $site->fullname, $navigation);
|
||||||
|
|
||||||
print_heading($strregistration);
|
print_heading($strregistration);
|
||||||
|
|
||||||
|
@ -63,12 +65,12 @@
|
||||||
echo '<div class="fitemtitle"><label>URL</label></div>';
|
echo '<div class="fitemtitle"><label>URL</label></div>';
|
||||||
echo '<div class="felement ftext">'.$CFG->wwwroot.'</div>';
|
echo '<div class="felement ftext">'.$CFG->wwwroot.'</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div class="fitem">';
|
echo '<div class="fitem">';
|
||||||
echo '<div class="fitemtitle"><label>'.get_string("currentversion").'</label></div>';
|
echo '<div class="fitemtitle"><label>'.get_string("currentversion").'</label></div>';
|
||||||
echo '<div class="felement ftext">'."$CFG->release ($CFG->version)".'</div>';
|
echo '<div class="felement ftext">'."$CFG->release ($CFG->version)".'</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div class="fitem">';
|
echo '<div class="fitem">';
|
||||||
echo '<div class="fitemtitle"><label for="sitename">'.get_string("fullsitename").'</label></div>';
|
echo '<div class="fitemtitle"><label for="sitename">'.get_string("fullsitename").'</label></div>';
|
||||||
echo '<div class="felement ftext">';
|
echo '<div class="felement ftext">';
|
||||||
|
@ -103,7 +105,7 @@
|
||||||
unset($options);
|
unset($options);
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div class="fitem">';
|
echo '<div class="fitem">';
|
||||||
echo '<div class="fitemtitle"><label>'.get_string("statistics")."<br />(".get_string("notpublic").')'.'</label></div>';
|
echo '<div class="fitemtitle"><label>'.get_string("statistics")."<br />(".get_string("notpublic").')'.'</label></div>';
|
||||||
echo '<div class="felement ftext">';
|
echo '<div class="felement ftext">';
|
||||||
|
@ -119,7 +121,7 @@
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
|
||||||
// total number of role assignments
|
// total number of role assignments
|
||||||
$count = count_records('role_assignments');
|
$count = count_records('role_assignments');
|
||||||
echo get_string('roleassignments', 'role').": ".$count;
|
echo get_string('roleassignments', 'role').": ".$count;
|
||||||
echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\" />\n";
|
echo "<input type=\"hidden\" name=\"roleassignments\" value=\"$count\" />\n";
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
|
@ -127,13 +129,13 @@
|
||||||
// first find all distinct roles with mod/course:update
|
// first find all distinct roles with mod/course:update
|
||||||
// please change the name and strings to something appropriate to reflect the new data collected
|
// please change the name and strings to something appropriate to reflect the new data collected
|
||||||
$sql = "SELECT COUNT(DISTINCT u.id)
|
$sql = "SELECT COUNT(DISTINCT u.id)
|
||||||
FROM {$CFG->prefix}role_capabilities rc,
|
FROM {$CFG->prefix}role_capabilities rc,
|
||||||
{$CFG->prefix}role_assignments ra,
|
{$CFG->prefix}role_assignments ra,
|
||||||
{$CFG->prefix}user u
|
{$CFG->prefix}user u
|
||||||
WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything')
|
WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything')
|
||||||
AND rc.roleid = ra.roleid
|
AND rc.roleid = ra.roleid
|
||||||
AND u.id = ra.userid";
|
AND u.id = ra.userid";
|
||||||
|
|
||||||
$count = count_records_sql($sql);
|
$count = count_records_sql($sql);
|
||||||
echo get_string("teachers").": ".$count;
|
echo get_string("teachers").": ".$count;
|
||||||
echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\" />\n";
|
echo "<input type=\"hidden\" name=\"courseupdaters\" value=\"$count\" />\n";
|
||||||
|
@ -154,7 +156,7 @@
|
||||||
echo "<input type=\"hidden\" name=\"resources\" value=\"$count\" />\n";
|
echo "<input type=\"hidden\" name=\"resources\" value=\"$count\" />\n";
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
||||||
echo '<div class="fitem">';
|
echo '<div class="fitem">';
|
||||||
echo '<div class="fitemtitle"><label for="adminname">'.get_string("administrator").'</label></div>';
|
echo '<div class="fitemtitle"><label for="adminname">'.get_string("administrator").'</label></div>';
|
||||||
echo '<div class="felement ftext">';
|
echo '<div class="felement ftext">';
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
$timeformat = get_string('strftimedate');
|
$timeformat = get_string('strftimedate');
|
||||||
$today = time();
|
$today = time();
|
||||||
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
|
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
|
||||||
|
|
||||||
$basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
|
$basemenu[0] = get_string('startdate') . ' (' . userdate($course->startdate, $timeformat) . ')';
|
||||||
if ($course->enrollable != 2 || ($course->enrolstartdate == 0 || $course->enrolstartdate <= $today) && ($course->enrolenddate == 0 || $course->enrolenddate > $today)) {
|
if ($course->enrollable != 2 || ($course->enrolstartdate == 0 || $course->enrolstartdate <= $today) && ($course->enrolenddate == 0 || $course->enrolenddate > $today)) {
|
||||||
$basemenu[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
|
$basemenu[3] = get_string('today') . ' (' . userdate($today, $timeformat) . ')' ;
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
$basemenu[5] = get_string('courseenrolenddate') . ' (' . userdate($course->enrolenddate, $timeformat) . ')';
|
$basemenu[5] = get_string('courseenrolenddate') . ' (' . userdate($course->enrolenddate, $timeformat) . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Make sure this user can assign that role
|
/// Make sure this user can assign that role
|
||||||
|
|
||||||
if ($roleid) {
|
if ($roleid) {
|
||||||
|
@ -122,16 +122,22 @@
|
||||||
|
|
||||||
if ($context->contextlevel == CONTEXT_USER) {
|
if ($context->contextlevel == CONTEXT_USER) {
|
||||||
/// course header
|
/// course header
|
||||||
|
$navlinks = array();
|
||||||
if ($courseid != SITEID) {
|
if ($courseid != SITEID) {
|
||||||
print_header("$fullname", "$fullname",
|
$navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
|
||||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
|
||||||
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> ->".$straction,
|
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||||
"", "", true, " ", navmenu($course));
|
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
|
||||||
|
print_header("$fullname", "$fullname", $navigation, "", "", true, " ", navmenu($course));
|
||||||
|
|
||||||
/// site header
|
/// site header
|
||||||
} else {
|
} else {
|
||||||
print_header("$course->fullname: $fullname", $course->fullname,
|
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$courseid\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, " ", navmenu($course));
|
||||||
}
|
}
|
||||||
|
|
||||||
$showroles = 1;
|
$showroles = 1;
|
||||||
|
@ -190,7 +196,7 @@
|
||||||
$timestart = $course->enrolenddate;
|
$timestart = $course->enrolenddate;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($extendperiod > 0) {
|
if($extendperiod > 0) {
|
||||||
$timeend = $timestart + $extendperiod;
|
$timeend = $timestart + $extendperiod;
|
||||||
} else {
|
} else {
|
||||||
|
@ -251,7 +257,7 @@
|
||||||
if ($context->contextlevel==CONTEXT_SYSTEM) {
|
if ($context->contextlevel==CONTEXT_SYSTEM) {
|
||||||
print_box(get_string('globalroleswarning', 'role'));
|
print_box(get_string('globalroleswarning', 'role'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($roleid) { /// prints a form to swap roles
|
if ($roleid) { /// prints a form to swap roles
|
||||||
|
|
||||||
/// Get all existing participants in this context.
|
/// Get all existing participants in this context.
|
||||||
|
|
|
@ -100,8 +100,8 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($localoverrides[$capname])) {
|
if (isset($localoverrides[$capname])) {
|
||||||
// Something exists, so update it
|
// Something exists, so update it
|
||||||
assign_capability($capname, $value, $roleid, $context->id, true);
|
assign_capability($capname, $value, $roleid, $context->id, true);
|
||||||
} else { // insert a record
|
} else { // insert a record
|
||||||
if ($value != CAP_INHERIT) { // Ignore inherits
|
if ($value != CAP_INHERIT) { // Ignore inherits
|
||||||
|
@ -116,18 +116,22 @@
|
||||||
/// Print the header and tabs
|
/// Print the header and tabs
|
||||||
|
|
||||||
if ($context->contextlevel == CONTEXT_USER) {
|
if ($context->contextlevel == CONTEXT_USER) {
|
||||||
|
$navlinks = array();
|
||||||
/// course header
|
/// course header
|
||||||
if ($course->id != SITEID) {
|
if ($course->id != SITEID) {
|
||||||
print_header("$fullname", "$fullname",
|
$navlinks[] = array('name' => $course->shortname, 'link' => "$CFG->wwwroot/course/view.php?id=$course->id", 'type' => 'course');
|
||||||
"<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->
|
$navlinks[] = array('name' => $strparticipants, 'link' => "$CFG->wwwroot/user/index.php?id=$course->id", 'type' => 'misc');
|
||||||
<a href=\"$CFG->wwwroot/user/index.php?id=$course->id\">$strparticipants</a> -> <a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname</a> -> $straction",
|
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||||
"", "", true, " ", navmenu($course));
|
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header("$fullname", "$fullname", $navigation, "", "", true, " ", navmenu($course));
|
||||||
|
|
||||||
/// site header
|
/// site header
|
||||||
} else {
|
} else {
|
||||||
print_header("$course->fullname: $fullname", $course->fullname,
|
$navlinks[] = array('name' => $fullname, 'link' => "$CFG->wwwroot/user/view.php?id=$userid&course=$courseid", 'type' => 'misc');
|
||||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$userid&course=$course->id\">$fullname</a> -> $straction", "", "", true, " ", navmenu($course));
|
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header("$course->fullname: $fullname", $course->fullname, $navigation, "", "", true, " ", navmenu($course));
|
||||||
}
|
}
|
||||||
$showroles = 1;
|
$showroles = 1;
|
||||||
$currenttab = 'override';
|
$currenttab = 'override';
|
||||||
|
|
|
@ -13,7 +13,10 @@ if ($currenttab != 'update') {
|
||||||
|
|
||||||
case CONTEXT_SYSTEM:
|
case CONTEXT_SYSTEM:
|
||||||
$stradministration = get_string('administration');
|
$stradministration = get_string('administration');
|
||||||
print_header($SITE->fullname, "$SITE->fullname","<a href=\"../index.php\">$stradministration</a> -> $straction");
|
$navlinks[] = array('name' => $stradministration, 'link' => '../index.php', 'type' => 'misc');
|
||||||
|
$navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header($SITE->fullname, "$SITE->fullname", $navigation);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONTEXT_PERSONAL:
|
case CONTEXT_PERSONAL:
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
<?PHP // $Id$
|
<?PHP // $Id$
|
||||||
|
|
||||||
require_once('../config.php');
|
require_once('../config.php');
|
||||||
require_once($CFG->dirroot.'/my/pagelib.php');
|
require_once($CFG->dirroot.'/my/pagelib.php');
|
||||||
require_once($CFG->dirroot.'/lib/pagelib.php');
|
require_once($CFG->dirroot.'/lib/pagelib.php');
|
||||||
require_once($CFG->dirroot.'/lib/blocklib.php');
|
require_once($CFG->dirroot.'/lib/blocklib.php');
|
||||||
|
|
||||||
if (!empty($THEME->customcorners)) {
|
if (!empty($THEME->customcorners)) {
|
||||||
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
|
require_once($CFG->dirroot.'/lib/custom_corners_lib.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$pt = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
|
$pt = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
|
||||||
|
|
||||||
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
|
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
|
||||||
'lib' => '/my/pagelib.php',
|
'lib' => '/my/pagelib.php',
|
||||||
'name' => get_string('mymoodle','admin')),
|
'name' => get_string('mymoodle','admin')),
|
||||||
PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW,
|
PAGE_COURSE_VIEW => array('id' => PAGE_COURSE_VIEW,
|
||||||
'lib' => '/lib/pagelib.php',
|
'lib' => '/lib/pagelib.php',
|
||||||
'name' => get_string('stickyblockscourseview','admin'))
|
'name' => get_string('stickyblockscourseview','admin'))
|
||||||
// ... more?
|
// ... more?
|
||||||
|
@ -27,29 +27,33 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
require_login();
|
require_login();
|
||||||
|
|
||||||
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
|
require_capability('moodle/site:manageblocks', get_context_instance(CONTEXT_SYSTEM, SITEID));
|
||||||
|
|
||||||
// first thing to do is print the dropdown menu
|
// first thing to do is print the dropdown menu
|
||||||
|
|
||||||
$strtitle = get_string('stickyblocks','admin');
|
$strtitle = get_string('stickyblocks','admin');
|
||||||
$strheading = get_string('adminhelpstickyblocks');
|
$strheading = get_string('adminhelpstickyblocks');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!empty($pt)) {
|
if (!empty($pt)) {
|
||||||
|
|
||||||
require_once($CFG->dirroot.$pagetypes[$pt]['lib']);
|
require_once($CFG->dirroot.$pagetypes[$pt]['lib']);
|
||||||
|
|
||||||
define('ADMIN_STICKYBLOCKS',$pt);
|
define('ADMIN_STICKYBLOCKS',$pt);
|
||||||
|
|
||||||
$PAGE = page_create_object($pt, SITEID);
|
$PAGE = page_create_object($pt, SITEID);
|
||||||
$blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
|
$blocks = blocks_setup($PAGE,BLOCKS_PINNED_TRUE);
|
||||||
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
|
$blocks_preferred_width = bounded_number(180, blocks_preferred_width($blocks[BLOCK_POS_LEFT]), 210);
|
||||||
|
|
||||||
print_header($strtitle,$strtitle,'<a href="'.$CFG->wwwroot.'/'.$CFG->admin.'/index.php">'.
|
$navlinks = array(array('name' => get_string('administration'),
|
||||||
get_string('administration').'</a> -> '.$strtitle);
|
'link' => "$CFG->wwwroot/$CFG->admin/index.php",
|
||||||
|
'type' => 'misc'));
|
||||||
|
$navlinks[] = array('name' => $strtitle, 'link' => null, 'type' => 'misc');
|
||||||
|
$navigation = build_navigation($navlinks);
|
||||||
|
print_header($strtitle,$strtitle,$navigation);
|
||||||
|
|
||||||
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
|
echo '<table border="0" cellpadding="3" cellspacing="0" width="100%" id="layout-table">';
|
||||||
echo '<tr valign="top">';
|
echo '<tr valign="top">';
|
||||||
|
|
||||||
|
@ -60,7 +64,7 @@
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '<td valign="top" id="middle-column">';
|
echo '<td valign="top" id="middle-column">';
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
require_once($CFG->libdir.'/adminlib.php');
|
require_once($CFG->libdir.'/adminlib.php');
|
||||||
admin_externalpage_setup('stickyblocks');
|
admin_externalpage_setup('stickyblocks');
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
$strusers = get_string("users");
|
$strusers = get_string("users");
|
||||||
$strall = get_string("all");
|
$strall = get_string("all");
|
||||||
|
|
||||||
print_header($strtimezone, $strtimezone, $strtimezone);
|
print_header($strtimezone, $strtimezone, build_navigation(array(array('name' => $strtimezone, 'link' => null, 'type' => 'misc'))));
|
||||||
|
|
||||||
print_heading("");
|
print_heading("");
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,8 @@ $string['trustedhostsexplain'] = '<p>The trusted hosts mechanism allows
|
||||||
is available for scripts to control Moodle behaviour and can be
|
is available for scripts to control Moodle behaviour and can be
|
||||||
a very dangerous option to enable. If in doubt, keep it off.</p>
|
a very dangerous option to enable. If in doubt, keep it off.</p>
|
||||||
<p>This is <strong>not</strong> needed for Moodle Networking.</p>
|
<p>This is <strong>not</strong> needed for Moodle Networking.</p>
|
||||||
<p>To enable it, enter a list of IP addresses or networks,
|
<p>To enable it, enter a list of IP addresses or networks,
|
||||||
one on each line.
|
one on each line.
|
||||||
Some examples:</p>'.
|
Some examples:</p>'.
|
||||||
'Your local host:<br />'.
|
'Your local host:<br />'.
|
||||||
'127.0.0.1<br />'.
|
'127.0.0.1<br />'.
|
||||||
|
@ -50,6 +50,7 @@ $string['selectahost'] = 'Please select a remote Moodle host.';
|
||||||
$string['selectaccesslevel'] = 'Please select an access level from the list.';
|
$string['selectaccesslevel'] = 'Please select an access level from the list.';
|
||||||
$string['noaclentries'] = 'No entries in the SSO access control list';
|
$string['noaclentries'] = 'No entries in the SSO access control list';
|
||||||
$string['deleteaserver'] = 'Deleting a Server';
|
$string['deleteaserver'] = 'Deleting a Server';
|
||||||
|
$string['deletehost'] = 'Delete host';
|
||||||
$string['nosite'] = 'Could not find site-level course';
|
$string['nosite'] = 'Could not find site-level course';
|
||||||
$string['postrequired'] = 'The delete function requires a POST request.';
|
$string['postrequired'] = 'The delete function requires a POST request.';
|
||||||
$string['hostdeleted'] = 'Ok - host deleted';
|
$string['hostdeleted'] = 'Ok - host deleted';
|
||||||
|
@ -75,7 +76,7 @@ $string['expireyourkeyexplain'] = 'Moodle automatically rotates your key
|
||||||
'key has been compromised. A replacement will be immediately automatically generated.<br />'.
|
'key has been compromised. A replacement will be immediately automatically generated.<br />'.
|
||||||
'Deleting this key will make it impossible for other Moodles to communicate with you, until you '.
|
'Deleting this key will make it impossible for other Moodles to communicate with you, until you '.
|
||||||
'manually contact each administrator and provide them with your new key.';
|
'manually contact each administrator and provide them with your new key.';
|
||||||
$string['deleteoutoftime'] = 'Your 60-second window for deleting this key has expired. Please start again.';
|
$string['deleteoutoftime'] = 'Your 60-second window for deleting this key has expired. Please start again.';
|
||||||
$string['deletewrongkeyvalue'] = 'An error has occurred. If you were not trying to delete your server\'s SSL key, it is possible '.
|
$string['deletewrongkeyvalue'] = 'An error has occurred. If you were not trying to delete your server\'s SSL key, it is possible '.
|
||||||
'you have been the subject of a malicious attack. No action has been taken.';
|
'you have been the subject of a malicious attack. No action has been taken.';
|
||||||
|
|
||||||
|
@ -92,7 +93,7 @@ $string['forbidden-function'] = 'That function has not been enabled fo
|
||||||
$string['forbidden-transport'] = 'The transport method you are trying to use is not permitted.';
|
$string['forbidden-transport'] = 'The transport method you are trying to use is not permitted.';
|
||||||
|
|
||||||
$string['registerallhosts'] = 'Register all hosts (<em>Hub mode</em>)';
|
$string['registerallhosts'] = 'Register all hosts (<em>Hub mode</em>)';
|
||||||
$string['registerallhostsexplain'] = 'You can choose to register all hosts that try to connect to you automatically.
|
$string['registerallhostsexplain'] = 'You can choose to register all hosts that try to connect to you automatically.
|
||||||
This means that a record will appear in your hosts list for any '.
|
This means that a record will appear in your hosts list for any '.
|
||||||
'Moodle site that connects to you and requests your public key.<br />'.
|
'Moodle site that connects to you and requests your public key.<br />'.
|
||||||
'You have the option below to configure services for \'All Hosts\' and by enabling some services there, you are able to provide '.
|
'You have the option below to configure services for \'All Hosts\' and by enabling some services there, you are able to provide '.
|
||||||
|
@ -104,7 +105,7 @@ $string['ssl_acl_deny'] = 'SSO ACL: Deny user $a[0] from $a[1]';
|
||||||
$string['enabled_for_all'] = '(This service has been enabled for all hosts).';
|
$string['enabled_for_all'] = '(This service has been enabled for all hosts).';
|
||||||
$string['nosuchfile'] = 'The file/function $a does not exist.';
|
$string['nosuchfile'] = 'The file/function $a does not exist.';
|
||||||
$string['nosuchfunction'] = 'Unable to locate function, or function prohibited for RPC.';
|
$string['nosuchfunction'] = 'Unable to locate function, or function prohibited for RPC.';
|
||||||
$string['nosuchmodule'] = 'The function was incorrectly addressed and could not be located. Please use the
|
$string['nosuchmodule'] = 'The function was incorrectly addressed and could not be located. Please use the
|
||||||
mod/modulename/lib/functionname format.';
|
mod/modulename/lib/functionname format.';
|
||||||
$string['nosuchpublickey'] = 'Unable to obtain public key for signature verification.';
|
$string['nosuchpublickey'] = 'Unable to obtain public key for signature verification.';
|
||||||
$string['nosuchservice'] = 'The RPC service is not running on this host.';
|
$string['nosuchservice'] = 'The RPC service is not running on this host.';
|
||||||
|
@ -228,7 +229,7 @@ $string['logs'] = 'logs';
|
||||||
$string['courses'] = 'courses';
|
$string['courses'] = 'courses';
|
||||||
|
|
||||||
$string['enrolcourses_desc'] = 'Courses offered for remote enrolment by this host.';
|
$string['enrolcourses_desc'] = 'Courses offered for remote enrolment by this host.';
|
||||||
$string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using Moodle Network enrolments.
|
$string['enrolcourseenrol_desc'] = 'Enrol/unenrol users from this course using Moodle Network enrolments.
|
||||||
Note that users may have been enrolled in this course via other enrolment
|
Note that users may have been enrolled in this course via other enrolment
|
||||||
methods if the remote hosts allows them. Such enrolments are listed under
|
methods if the remote hosts allows them. Such enrolments are listed under
|
||||||
<em>Other enrolled users</em>';
|
<em>Other enrolled users</em>';
|
||||||
|
|
|
@ -2784,6 +2784,9 @@ function admin_externalpage_setup($section) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO document
|
||||||
|
*/
|
||||||
function admin_externalpage_print_header() {
|
function admin_externalpage_print_header() {
|
||||||
|
|
||||||
global $CFG, $PAGE, $SITE, $THEME;
|
global $CFG, $PAGE, $SITE, $THEME;
|
||||||
|
@ -2802,7 +2805,7 @@ function admin_externalpage_print_header() {
|
||||||
BLOCK_L_MAX_WIDTH);
|
BLOCK_L_MAX_WIDTH);
|
||||||
$PAGE->print_header();
|
$PAGE->print_header();
|
||||||
echo '<table id="layout-table" summary=""><tr>';
|
echo '<table id="layout-table" summary=""><tr>';
|
||||||
|
|
||||||
$lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
|
$lt = (empty($THEME->layouttable)) ? array('left', 'middle', 'right') : $THEME->layouttable;
|
||||||
foreach ($lt as $column) {
|
foreach ($lt as $column) {
|
||||||
$lt1[] = $column;
|
$lt1[] = $column;
|
||||||
|
@ -2817,12 +2820,12 @@ function admin_externalpage_print_header() {
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'middle':
|
case 'middle':
|
||||||
echo '<td id="middle-column">';
|
echo '<td id="middle-column">';
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
if (!empty($THEME->customcorners)) print_custom_corners_start();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'right':
|
case 'right':
|
||||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
|
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
|
||||||
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
|
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
|
||||||
|
@ -2872,12 +2875,12 @@ function admin_externalpage_print_footer() {
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'middle':
|
case 'middle':
|
||||||
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
if (!empty($THEME->customcorners)) print_custom_corners_end();
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'right':
|
case 'right':
|
||||||
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
|
if (blocks_have_content($pageblocks, BLOCK_POS_RIGHT)) {
|
||||||
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
|
echo '<td style="width: ' . $preferred_width_right . 'px;" id="right-column">';
|
||||||
|
|
|
@ -2246,17 +2246,17 @@ function get_html_lang($dir = false) {
|
||||||
* @uses $USER
|
* @uses $USER
|
||||||
* @uses $CFG
|
* @uses $CFG
|
||||||
* @uses $SESSION
|
* @uses $SESSION
|
||||||
* @param string $title Appears at the top of the window
|
* @param string $title Appears at the top of the window
|
||||||
* @param string $heading Appears at the top of the page
|
* @param string $heading Appears at the top of the page
|
||||||
* @param string $navigation Premade navigation string (for use as breadcrumbs links)
|
* @param array $navigation Array of $navlinks arrays (keys: name, link, type) for use as breadcrumbs links
|
||||||
* @param string $focus Indicates form element to get cursor focus on load eg inputform.password
|
* @param string $focus Indicates form element to get cursor focus on load eg inputform.password
|
||||||
* @param string $meta Meta tags to be added to the header
|
* @param string $meta Meta tags to be added to the header
|
||||||
* @param boolean $cache Should this page be cacheable?
|
* @param boolean $cache Should this page be cacheable?
|
||||||
* @param string $button HTML code for a button (usually for module editing)
|
* @param string $button HTML code for a button (usually for module editing)
|
||||||
* @param string $menu HTML code for a popup menu
|
* @param string $menu HTML code for a popup menu
|
||||||
* @param boolean $usexml use XML for this page
|
* @param boolean $usexml use XML for this page
|
||||||
* @param string $bodytags This text will be included verbatim in the <body> tag (useful for onload() etc)
|
* @param string $bodytags This text will be included verbatim in the <body> tag (useful for onload() etc)
|
||||||
* @param bool $return If true, return the visible elements of the header instead of echoing them.
|
* @param bool $return If true, return the visible elements of the header instead of echoing them.
|
||||||
*/
|
*/
|
||||||
function print_header ($title='', $heading='', $navigation='', $focus='',
|
function print_header ($title='', $heading='', $navigation='', $focus='',
|
||||||
$meta='', $cache=true, $button=' ', $menu='',
|
$meta='', $cache=true, $button=' ', $menu='',
|
||||||
|
@ -4263,7 +4263,7 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
|
||||||
*/
|
*/
|
||||||
function use_html_editor($name='', $editorhidebuttons='', $id='') {
|
function use_html_editor($name='', $editorhidebuttons='', $id='') {
|
||||||
global $THEME;
|
global $THEME;
|
||||||
|
|
||||||
$editor = 'editor_'.md5($name); //name might contain illegal characters
|
$editor = 'editor_'.md5($name); //name might contain illegal characters
|
||||||
if ($id === '') {
|
if ($id === '') {
|
||||||
$id = 'edit-'.$name;
|
$id = 'edit-'.$name;
|
||||||
|
@ -4274,7 +4274,7 @@ function use_html_editor($name='', $editorhidebuttons='', $id='') {
|
||||||
echo "var config = $editor.config;\n";
|
echo "var config = $editor.config;\n";
|
||||||
|
|
||||||
echo print_editor_config($editorhidebuttons);
|
echo print_editor_config($editorhidebuttons);
|
||||||
|
|
||||||
if (empty($THEME->htmleditorpostprocess)) {
|
if (empty($THEME->htmleditorpostprocess)) {
|
||||||
if (empty($name)) {
|
if (empty($name)) {
|
||||||
echo "\nHTMLArea.replaceAll($editor.config);\n";
|
echo "\nHTMLArea.replaceAll($editor.config);\n";
|
||||||
|
@ -6398,7 +6398,7 @@ function print_arrow($direction='up', $strsort=null, $return=false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns boolean true if the current language is right-to-left (Hebrew, Arabic etc)
|
* Returns boolean true if the current language is right-to-left (Hebrew, Arabic etc)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -6420,8 +6420,8 @@ function right_to_left() {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function fix_align_rtl($align) {
|
function fix_align_rtl($align) {
|
||||||
if (!right_to_left()) {
|
if (!right_to_left()) {
|
||||||
return $align;
|
return $align;
|
||||||
}
|
}
|
||||||
if ($align=='left') { return 'right'; }
|
if ($align=='left') { return 'right'; }
|
||||||
if ($align=='right') { return 'left'; }
|
if ($align=='right') { return 'left'; }
|
||||||
|
|
|
@ -98,7 +98,7 @@ class assignment_base {
|
||||||
$this->navigation[] = array('name' => $this->strassignment, 'link' => '', 'type' => 'activityinstance');
|
$this->navigation[] = array('name' => $this->strassignment, 'link' => '', 'type' => 'activityinstance');
|
||||||
$navigation = build_navigation($this->navigation);
|
$navigation = build_navigation($this->navigation);
|
||||||
|
|
||||||
print_header($pagetitle, $this->course->fullname, "$this->navigation $this->strassignment",
|
print_header($pagetitle, $this->course->fullname, $this->navigation,
|
||||||
"", "", true, '', navmenu($this->course, $this->cm));
|
"", "", true, '', navmenu($this->course, $this->cm));
|
||||||
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
|
notice(get_string("activityiscurrentlyhidden"), "$CFG->wwwroot/course/view.php?id={$this->course->id}");
|
||||||
}
|
}
|
||||||
|
@ -690,7 +690,7 @@ class assignment_base {
|
||||||
'grade'.$submission->userid, $buttontext, 450, 700, $buttontext, 'none', true, 'button'.$submission->userid);
|
'grade'.$submission->userid, $buttontext, 450, 700, $buttontext, 'none', true, 'button'.$submission->userid);
|
||||||
$output.= 'opener.document.getElementById("up'.$submission->userid.'").innerHTML="'.addslashes_js($button).'";';
|
$output.= 'opener.document.getElementById("up'.$submission->userid.'").innerHTML="'.addslashes_js($button).'";';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($CFG->enableoutcomes) and empty($SESSION->flextable['mod-assignment-submissions']->collapse['outcomes'])) {
|
if (!empty($CFG->enableoutcomes) and empty($SESSION->flextable['mod-assignment-submissions']->collapse['outcomes'])) {
|
||||||
if ($outcomes_data = grade_get_outcomes($this->course->id, 'mod', 'assignment', $this->assignment->id, $submission->userid)) {
|
if ($outcomes_data = grade_get_outcomes($this->course->id, 'mod', 'assignment', $this->assignment->id, $submission->userid)) {
|
||||||
foreach($outcomes_data as $n=>$data) {
|
foreach($outcomes_data as $n=>$data) {
|
||||||
|
@ -2482,9 +2482,9 @@ function assignment_count_real_submissions($assignment, $groupid=0) {
|
||||||
return count_records_sql("SELECT COUNT(DISTINCT gm.userid, gm.groupid)
|
return count_records_sql("SELECT COUNT(DISTINCT gm.userid, gm.groupid)
|
||||||
FROM {$CFG->prefix}assignment_submissions a,
|
FROM {$CFG->prefix}assignment_submissions a,
|
||||||
{$CFG->prefix}groups_members g
|
{$CFG->prefix}groups_members g
|
||||||
WHERE a.assignment = $assignment->id
|
WHERE a.assignment = $assignment->id
|
||||||
AND a.timemodified > 0
|
AND a.timemodified > 0
|
||||||
AND g.groupid = '$groupid'
|
AND g.groupid = '$groupid'
|
||||||
AND a.userid = g.userid ");
|
AND a.userid = g.userid ");
|
||||||
} else {
|
} else {
|
||||||
$cm = get_coursemodule_from_instance('assignment', $assignment->id);
|
$cm = get_coursemodule_from_instance('assignment', $assignment->id);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<form method="post" action="module.php" id="form">
|
<form method="post" action="module.php" id="form">
|
||||||
<div">
|
<div>
|
||||||
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
|
<input type="hidden" name="sesskey" value="<?php echo $USER->sesskey ?>" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue