Skip to content

Commit

Permalink
fixed some whitespace problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiesensei committed Oct 17, 2006
1 parent e13cc88 commit b6241ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 92 deletions.
69 changes: 0 additions & 69 deletions course/request.html

This file was deleted.

35 changes: 17 additions & 18 deletions course/request.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php // $Id$

/// this allows a student to request a course be created for them.

require_once('../config.php');
include_once $CFG->libdir.'/formslib.php';

require_login();
require_once('request_form.php');

require_once('request_form.php');

if (isguest()) {
error("No guests here!");
Expand All @@ -16,38 +16,37 @@
if (empty($CFG->enablecourserequests)) {
error(get_string('courserequestdisabled'));
}


$strtitle = get_string('courserequest');
print_header($strtitle,$strtitle,$strtitle);

print_simple_box_start("center");
print_string('courserequestintro');
print_string('courserequestintro');
print_simple_box_end();

$requestform = new course_request_form('request.php');
if (($data = $requestform->data_submitted())) {

if (($data = $requestform->data_submitted())) {

$data->requester = $USER->id;

if (insert_record('course_request',$data)) {
notice(get_string('courserequestsuccess'));
}
else {
} else {
notice(get_string('courserequestfailed'));
}
print_footer();
exit;
}


}


$requestform->display();

print_footer();

exit;


Expand Down
9 changes: 4 additions & 5 deletions course/request_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function definition() {
$mform->addRule('shortname',get_string('missingfullname'),'required', null, 'client');
$mform->setType('shortname', PARAM_TEXT);

$mform->addElement('textarea','summary',get_string("summary"),array('rows'=>'15','cols'=>'50'));
$mform->addElement('htmleditor','summary',get_string("summary"),array('rows'=>'15','cols'=>'50'));
$mform->addRule('summary',get_string('missingsummary'),'required', null, 'client');
$mform->setType('summary', PARAM_TEXT);

Expand All @@ -22,7 +22,7 @@ function definition() {
$mform->addElement('text','password',get_string("enrolmentkey"),'size="25"');
$mform->setType('password', PARAM_RAW);


$mform->addElement('submit','',get_string("savechanges"));
}

Expand All @@ -44,14 +44,13 @@ function validation($data) {
}

if (!empty($foundcourses)) {

if (!empty($foundcourses)) {
foreach ($foundcourses as $foundcourse) {
if (isset($foundcourse->requester) && $foundcourse->requester) {
$pending = 1;
$foundcoursenames[] = $foundcourse->fullname.' [*]';
}
else {
} else {
$foundcoursenames[] = $foundcourse->fullname;
}
}
Expand Down

0 comments on commit b6241ce

Please sign in to comment.