Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Not needed any more ... use the "News" forum instead.

  • Loading branch information...
commit 4c86dda63efb35574c6a3e3675d1cb7f034f7133 1 parent 3760280
martin authored
Showing with 0 additions and 80 deletions.
  1. +0 −32 course/email.html
  2. +0 −48 course/email.php
View
32 course/email.html
@@ -1,32 +0,0 @@
-<FORM name="form" method="post" action="email.php">
-<TABLE cellpadding=10 CELLSPACING=0 ALIGN=CENTER>
-<TR>
-<TD valign=top align=right BGCOLOR="<?=$THEME->cellheading?>">
- <P>Subject:</P>
-</TD>
-<TD valign=top align=left BGCOLOR="<?=$THEME->cellheading?>">
-<FONT SIZE=2><INPUT TYPE=text SIZE=60 NAME=subject VALUE="<? p($form->subject); ?>">
-</TD>
-</TR>
-<TR>
-<TD valign=top align=right BGCOLOR="<?=$THEME->cellheading?>">
- <P>Email:</P>
-</TD>
-<TD BGCOLOR="<?=$THEME->cellheading?>">
-<FONT SIZE=2><TEXTAREA NAME=message COLS=60 ROWS=15 WRAP=hard><? p($form->message); ?></TEXTAREA>
-</TD>
-</TR>
-<TR>
-<TD BGCOLOR="<?=$THEME->cellheading?>">
-&nbsp;
-</TD>
-<TD BGCOLOR="<?=$THEME->cellheading?>">
- <P>
- <INPUT type="hidden" name=id value="<?=$form->id ?>">
- <INPUT type="submit" value="Send this email to everyone now">
- <INPUT type="reset" value="Revert">
- </P>
-</TD>
-</TABLE>
-
-</FORM>
View
48 course/email.php
@@ -1,48 +0,0 @@
-<?PHP // $Id$
-
- require("../config.php");
-
- require_variable($id); // Course ID
-
- if (! $course = get_record("course", "id", $id)) {
- error("Could not find the course!");
- }
-
- require_login($course->id);
-
- if (!isteacher($course->id)) {
- error("Only teachers can send mail this way!");
- }
-
-
-/// If data submitted, then process and store.
-
- if (match_referer() && isset($HTTP_POST_VARS)) {
-
- $link = "$CFG->wwwroot/course/view.php?id=$course->id";
-
- //XXXX The following function is now wrong - needs fixing
- //if (! email_to_course($USER, $course, true, $subject, $message, "$link")) {
- // error("An error occurred while trying to send mail!");
- //}
-
- add_to_log($course->id, "course", "email", "email.php?id=$course->id", "");
-
- redirect("view.php?id=$course->id", "Email sent", 1);
- exit;
- }
-
-
- $form->id = $course->id;
-
- print_header("$course->shortname: Mail", "$course->fullname",
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> Send mail");
-
- print_heading("Send an email to all participants");
-
- include("email.html");
-
- print_footer($course);
-
-
-?>
Please sign in to comment.
Something went wrong with that request. Please try again.