country and $CFG->country) { $admin->country = $CFG->country; } if (empty($CFG->siteidentifier)) { // Unique site identification code set_config('siteidentifier', random_string(32).$_SERVER['HTTP_HOST']); } /// Print headings $stradministration = get_string("administration"); $strregistration = get_string("registration"); $strregistrationinfo = get_string("registrationinfo"); $navlinks = array(); $navlinks[] = array('name' => $stradministration, 'link' => "../$CFG->admin/index.php", 'type' => 'misc'); $navlinks[] = array('name' => $strregistration, 'link' => null, 'type' => 'misc'); $navigation = build_navigation($navlinks); print_header("$site->shortname: $strregistration", $site->fullname, $navigation); print_heading($strregistration); print_simple_box($strregistrationinfo, "center", "70%"); /// Print the form echo "
\n"; echo '
'; echo 'Registration Information'; echo "\n"; echo "\n"; echo "\n"; echo "wwwroot\" />\n"; echo "siteidentifier\" />\n"; echo "\n"; echo "\n"; echo "version\" />\n"; echo "release\" />\n"; echo '
'; echo '
'; echo '
'.$CFG->wwwroot.'
'; echo '
'; echo '
'; echo '
'; echo '
'."$CFG->release ($CFG->version)".'
'; echo '
'; echo '
'; echo '
'; echo '
'; echo ''; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; choose_from_menu (get_list_of_countries(), "country", $admin->country, get_string("selectacountry")."...", "", ""); echo '
'; echo '
'; echo '
'; echo ''; echo '
'; $options[0] = get_string("publicdirectory0"); $options[1] = get_string("publicdirectory1"); $options[2] = get_string("publicdirectory2"); choose_from_menu ($options, "public", "2", "", "", ""); unset($options); echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; $options[0] = get_string("registrationcontactno"); $options[1] = get_string("registrationcontactyes"); choose_from_menu ($options, "contact", "1", "", "", ""); unset($options); echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; $count = count_records('course')-1; echo get_string("courses").": ".$count; echo "\n"; echo '
'; $count = count_records('user', 'deleted', 0); echo get_string("users").": ".$count; echo "\n"; echo '
'; // total number of role assignments $count = count_records('role_assignments'); echo get_string('roleassignments', 'role').": ".$count; echo "\n"; echo '
'; // first find all distinct roles with mod/course:update // please change the name and strings to something appropriate to reflect the new data collected $sql = "SELECT COUNT(DISTINCT u.id) FROM {$CFG->prefix}role_capabilities rc, {$CFG->prefix}role_assignments ra, {$CFG->prefix}user u WHERE (rc.capability = 'moodle/course:update' or rc.capability='moodle/site:doanything') AND rc.roleid = ra.roleid AND u.id = ra.userid"; $count = count_records_sql($sql); echo get_string("teachers").": ".$count; echo "\n"; echo '
'; $count = count_records('forum_posts'); echo get_string("posts", 'forum').": ".$count; echo "\n"; echo '
'; $count = count_records('question'); echo get_string("questions", 'quiz').": ".$count; echo "\n"; echo '
'; $count = count_records('resource'); echo get_string("modulenameplural", "resource").": ".$count; echo "\n"; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo ""; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; echo "email\" />"; echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; $options[0] = get_string("registrationno"); $options[1] = get_string("registrationyes"); choose_from_menu ($options, "mailme", "1", "", "", ""); unset($options); echo '
'; echo '
'; echo '
'; echo "
\n"; echo "
\n"; print_footer(); ?>