Source for file sl_setup_notecard.php
Documentation is available at sl_setup_notecard.php
* Sloodle configuration notecard generation script.
* Can be accessed by a Moodle administrator via web-browser to generate text for a configuration notecard.
* @copyright Copyright (c) 2007-8 Sloodle (various contributors)
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
* @contributor Edmund Edgar
* @contributor Peter R. Bloomfield
/** Sloodle/Moodle configuration */
require_once('config.php');
/** General Sloodle functionality */
require_once(SLOODLE_DIRROOT.
'/lib/sl_generallib.php');
$courseid =
optional_param('courseid',null,PARAM_RAW);
print_header(get_string("cfgnotecard:header", "sloodle"), '', '', '', false, '', '', false, '');
print_heading(get_string("cfgnotecard:header", "sloodle"));
$sloodle_pwd = (string)
mtrand(100000000,999999999);
print
get_string("primpass:errornotset", "sloodle");
print
'<h3>'.
get_string("choosecourse", "sloodle") .
'</h3>';
print
'<p>'.
get_string("cfgnotecard:choosecourse", "sloodle") .
'</p>';
print
'<form method="post" action="sl_setup_notecard.php">';
$courses =
get_courses();
// Sort the array of courses by name
$sortedcourses =
array();
foreach ($courses as $cid =>
$c) {
$sortedcourses[$cid] =
$c->fullname;
foreach($sortedcourses as $cid =>
$cname) {
print
'<input type="radio" name="courseid" value="'.
$cid.
'" />'.
$cname;
print
'<br/><input type="submit" value="'.
get_string("cfgnotecard:generate", "sloodle") .
'" />';
print
get_string("needadmin", "sloodle");;
print
'<div align="center">';
print
'<p>'.
get_string("cfgnotecard:instructions", "sloodle") .
'</p>';
print
'<p>'.
get_string("cfgnotecard:security", "sloodle") .
'</p>';
print
'<textarea cols=60 rows=4>';
print
'set:sloodleserverroot|'.
$wwwroot;
print
'set:sloodle_courseid|'.
$courseid;
print
'<p>'.
get_string("cfgnotecard:setnote", "sloodle") .
'</p>';
print
'<p><a href="'.
$CFG->wwwroot.
'/admin/module.php?module=sloodle">'.
get_string("backtosloodlesetup", "sloodle") .
'</a>.';
Documentation generated on Tue, 04 Mar 2008 15:08:55 +0000 by phpDocumentor 1.4.0