fixed capitalization and quoting of attribute values

This commit is contained in:
gustav_delius 2004-09-12 17:34:35 +00:00
parent 41905731b7
commit d1290cec39
121 changed files with 1401 additions and 1401 deletions

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This php script contains all the stuff to backup/restore
//scorm mods

View file

@ -1,8 +1,8 @@
<form method="post" action="module.php" name="form">
<table cellpadding=9 cellspacing=0 >
<tr valign=top>
<td align=right><p>scorm_validate:</td>
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td align="right"><p>scorm_validate:</td>
<td>
<?php
unset($choices);
@ -20,17 +20,17 @@
<?php print_string("validationtype", "scorm") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>scorm_framesize:</td>
<tr valign="top">
<td align="right"><p>scorm_framesize:</td>
<td>
<input name=scorm_framesize type=text size=5 value="<?php p($CFG->scorm_framesize) ?>" />
<input name="scorm_framesize" type="text" size="5" value="<?php p($CFG->scorm_framesize) ?>" />
</td>
<td>
<?php print_string("configframesize", "scorm") ?>
</td>
</tr>
<tr valign=top>
<td align=right><p>scorm_popup:</td>
<tr valign="top">
<td align="right"><p>scorm_popup:</td>
<td>
<?php
unset($choices);
@ -45,11 +45,11 @@
</tr>
<?php foreach ($SCORM_WINDOW_OPTIONS as $optionname) {
$defaultvalue = "scorm_popup$optionname";
echo "<tr valign=top>";
echo "<td align=right><p>$defaultvalue:</td>";
echo "<tr valign=\"top\">";
echo "<td align=\"right\"><p>$defaultvalue:</td>";
echo "<td>";
if ($optionname == "height" or $optionname == "width") {
echo "<input name=$defaultvalue type=text size=5 value=\"".$CFG->$defaultvalue."\" />";
echo "<input name=$defaultvalue type=\"text\" size=\"5\" value=\"".$CFG->$defaultvalue."\" />";
} else {
choose_from_menu ($choices, $defaultvalue, $CFG->$defaultvalue, "");
}
@ -61,7 +61,7 @@
}
?>
<tr>
<td colspan=3 align=center>
<td colspan="3" align="center">
<input type="submit" value="<?php print_string("savechanges") ?>" />
</td>
</tr>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
// Manage ONLY ZIP & PIF uploaded files in a course file area
@ -82,7 +82,7 @@
print_heading(get_string("publicsitefileswarning"), "center", 2);
}
echo "<table border=0 align=center cellspacing=3 cellpadding=3 width=640>";
echo "<table border=\"0\" align=\"center\" cellspacing=\"3\" cellpadding=\"3\" width=\"640\">";
echo "<tr>";
echo "<td colspan=\"2\">";
}
@ -147,25 +147,25 @@
$strmaxsize = get_string("maxsize", "", $filesize);
$strcancel = get_string("cancel");
echo "<P>$struploadafile ($strmaxsize) --> <B>$wdir</B>";
echo "<TABLE><TR><TD COLSPAN=2>";
echo "<FORM ENCTYPE=\"multipart/form-data\" METHOD=\"post\" ACTION=\"".$ME."\">";
echo " <INPUT TYPE=hidden NAME=MAX_FILE_SIZE value=\"$upload_max_filesize\" />";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=upload />";
echo " <INPUT NAME=\"userfile\" TYPE=\"file\" size=\"60\" />";
echo " </TD><TR><TD WIDTH=10>";
echo " <INPUT TYPE=submit NAME=save VALUE=\"$struploadthisfile\" />";
echo "</FORM>";
echo "</TD><TD WIDTH=100%>";
echo "<FORM ACTION=\"".$ME."\" METHOD=\"get\">";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"$strcancel\" />";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "<p>$struploadafile ($strmaxsize) --> <b>$wdir</b>";
echo "<table><tr><td colspan=\"2\">";
echo "<form enctype=\"multipart/form-data\" method=\"post\" action=\"".$ME."\">";
echo " <input type=\"hidden\" name=MAX_FILE_SIZE value=\"$upload_max_filesize\" />";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"upload\" />";
echo " <input name=\"userfile\" type=\"file\" size=\"60\" />";
echo " </td><tr><td width=\"10\">";
echo " <input type=\"submit\" name=\"save\" value=\"$struploadthisfile\" />";
echo "</form>";
echo "</td><td width=\"100%\">";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"$strcancel\" />";
echo "</form>";
echo "</td></tr></table>";
}
html_footer();
break;
@ -176,7 +176,7 @@
foreach ($USER->filelist as $file) {
$fullfile = $basedir.$file;
if (! fulldelete($fullfile)) {
echo "<BR>Error: Could not delete: $fullfile";
echo "<br>Error: Could not delete: $fullfile";
}
}
clearfilelist();
@ -186,7 +186,7 @@
} else {
html_header($course, $wdir);
if (setfilelist($_POST)) {
echo "<p align=center>".get_string("deletecheckwarning").":</p>";
echo "<p align=\"center\">".get_string("deletecheckwarning").":</p>";
print_simple_box_start("center");
printfilelist($USER->filelist);
print_simple_box_end();
@ -206,7 +206,7 @@
if ($count = setfilelist($_POST)) {
$USER->fileop = $action;
$USER->filesource = $wdir;
echo "<p align=center>";
echo "<p align=\"center\">";
print_string("selectednowmove", "moodle", $count);
echo "</p>";
}
@ -222,7 +222,7 @@
$oldfile = $basedir.$file;
$newfile = $basedir.$wdir."/".$shortfile;
if (!rename($oldfile, $newfile)) {
echo "<P>Error: $shortfile not moved";
echo "<p>Error: $shortfile not moved";
}
}
}
@ -247,24 +247,24 @@
$strcancel = get_string("cancel");
$strrenamefileto = get_string("renamefileto", "moodle", $file);
html_header($course, $wdir, "form.name");
echo "<P>$strrenamefileto:";
echo "<TABLE><TR><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=\"post\" NAME=\"form\">";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=rename />";
echo " <INPUT TYPE=hidden NAME=oldname VALUE=\"$file\" />";
echo " <INPUT TYPE=text NAME=name SIZE=35 VALUE=\"$file\" />";
echo " <INPUT TYPE=submit VALUE=\"$strrename\" />";
echo "</FORM>";
echo "</TD><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"$strcancel\" />";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "<p>$strrenamefileto:";
echo "<table><tr><td>";
echo "<form action=\"".$ME."\" method=\"post\" name=\"form\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"rename\" />";
echo " <input type=\"hidden\" name=\"oldname\" value=\"$file\" />";
echo " <input type=\"text\" name=\"name\" size=\"35\" value=\"$file\" />";
echo " <input type=\"submit\" value=\"$strrename\" />";
echo "</form>";
echo "</td><td>";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"$strcancel\" />";
echo "</form>";
echo "</td></tr></table>";
}
html_footer();
break;
@ -285,23 +285,23 @@
$strcancel = get_string("cancel");
$strcreatefolder = get_string("createfolder", "moodle", $wdir);
html_header($course, $wdir, "form.name");
echo "<P>$strcreatefolder:";
echo "<TABLE><TR><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=post NAME=form>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=mkdir />";
echo " <INPUT TYPE=text NAME=name SIZE=35 />";
echo " <INPUT TYPE=submit VALUE=\"$strcreate\" />";
echo "</FORM>";
echo "</TD><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"$strcancel\" />";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "<p>$strcreatefolder:";
echo "<table><tr><td>";
echo "<form action=\"".$ME."\" method=\"post\" name=\"form\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"mkdir\" />";
echo " <input type=\"text\" name=\"name\" size=\"35\" />";
echo " <input type=\"submit\" value=\"$strcreate\" />";
echo "</form>";
echo "</td><td>";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"$strcancel\" />";
echo "</form>";
echo "</td></tr></table>";
}
html_footer();
break;
@ -315,7 +315,7 @@
displaydir($wdir);
} else {
$streditfile = get_string("edit", "", "<B>$file</B>");
$streditfile = get_string("edit", "", "<b>$file</b>");
$fileptr = fopen($basedir.$file, "r");
$contents = fread($fileptr, filesize($basedir.$file));
fclose($fileptr);
@ -334,24 +334,24 @@
print_heading("$streditfile");
echo "<TABLE><TR><TD COLSPAN=2>";
echo "<FORM ACTION=\"".$ME."\" METHOD=\"post\" NAME=\"form\" $onsubmit>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" />";
echo " <INPUT TYPE=hidden NAME=file VALUE=\"$file\" />";
echo " <INPUT TYPE=hidden NAME=action VALUE=edit />";
echo "<table><tr><td colspan=\"2\">";
echo "<form action=\"".$ME."\" method=\"post\" name=\"form\" $onsubmit>";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"file\" value=\"$file\" />";
echo " <input type=\"hidden\" name=\"action\" value=\"edit\" />";
print_textarea($usehtmleditor, 25, 80, 680, 400, "text", $contents);
echo "</TD></TR><TR><TD>";
echo " <INPUT TYPE=submit VALUE=\"".get_string("savechanges")."\" />";
echo "</FORM>";
echo "</TD><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"".get_string("cancel")."\" />";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "</td></tr><tr><td>";
echo " <input type=\"submit\" value=\"".get_string("savechanges")."\" />";
echo "</form>";
echo "</td><td>";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"".get_string("cancel")."\" />";
echo "</form>";
echo "</td></tr></table>";
if ($usehtmleditor) {
print_richedit_javascript("form", "text", "yes");
@ -392,28 +392,28 @@
html_header($course, $wdir, "form.name");
if (setfilelist($_POST)) {
echo "<P ALIGN=CENTER>".get_string("youareabouttocreatezip").":</P>";
echo "<p align=\"center\">".get_string("youareabouttocreatezip").":</p>";
print_simple_box_start("center");
printfilelist($USER->filelist);
print_simple_box_end();
echo "<BR>";
echo "<P ALIGN=CENTER>".get_string("whattocallzip");
echo "<TABLE><TR><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=post NAME=form>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" />";
echo " <INPUT TYPE=hidden NAME=action VALUE=zip />";
echo " <INPUT TYPE=text NAME=name SIZE=35 VALUE=\"new.zip\" />";
echo " <INPUT TYPE=submit VALUE=\"".get_string("createziparchive")."\" />";
echo "</FORM>";
echo "</TD><TD>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"".get_string("cancel")."\" />";
echo "</FORM>";
echo "</TD></TR></TABLE>";
echo "<br>";
echo "<p align=\"center\">".get_string("whattocallzip");
echo "<table><tr><td>";
echo "<form action=\"".$ME."\" method=\"post\" name=\"form\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"action\" value=\"zip\" />";
echo " <input type=\"text\" name=\"name\" size=\"35\" value=\"new.zip\" />";
echo " <input type=\"submit\" value=\"".get_string("createziparchive")."\" />";
echo "</form>";
echo "</td><td>";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"".get_string("cancel")."\" />";
echo "</form>";
echo "</td></tr></table>";
} else {
displaydir($wdir);
clearfilelist();
@ -432,7 +432,7 @@
$strok = get_string("ok");
$strunpacking = get_string("unpacking", "", $file);
echo "<P ALIGN=CENTER>$strunpacking:</P>";
echo "<p align=\"center\">$strunpacking:</p>";
$file = basename($file);
@ -442,11 +442,11 @@
if (!$list = $archive->extract("$basedir/$wdir")) {
error($archive->errorInfo(true));
} else { // print some output
echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=640>";
echo "<tr><th align=left>$strname</th>";
echo "<th align=right>$strsize</th>";
echo "<th align=right>$strmodified</th>";
echo "<th align=right>$strstatus</th></tr>";
echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=\"640\">";
echo "<tr><th align=\"left\">$strname</th>";
echo "<th align=\"right\">$strsize</th>";
echo "<th align=\"right\">$strmodified</th>";
echo "<th align=\"right\">$strstatus</th></tr>";
foreach ($list as $item) {
echo "<tr>";
$item['filename'] = str_replace("$basedir/$wdir/", "", $item['filename']);
@ -466,20 +466,20 @@
} else { // Use external unzip program
print_simple_box_start("center");
echo "<PRE>";
echo "<pre>";
$command = "cd $basedir/$wdir ; $CFG->unzip -o $file 2>&1";
passthru($command);
echo "</PRE>";
echo "</pre>";
print_simple_box_end();
}
echo "<CENTER><FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"$strok\" />";
echo "</FORM>";
echo "</CENTER>";
echo "<center><form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"$strok\" />";
echo "</form>";
echo "</center>";
} else {
displaydir($wdir);
}
@ -495,7 +495,7 @@
$strok = get_string("ok");
$strlistfiles = get_string("listfiles", "", $file);
echo "<P ALIGN=CENTER>$strlistfiles:</P>";
echo "<p align=\"center\">$strlistfiles:</p>";
$file = basename($file);
include_once($CFG->libdir.'/pclzip/pclzip.lib.php');
@ -504,8 +504,8 @@
notify($archive->errorInfo(true));
} else {
echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=640>";
echo "<tr><th align=left>$strname</th><th align=right>$strsize</th><th align=right>$strmodified</th></tr>";
echo "<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" width=\"640\">";
echo "<tr><th align=\"left\">$strname</th><th align=\"right\">$strsize</th><th align=\"right\">$strmodified</th></tr>";
foreach ($list as $item) {
echo "<tr>";
print_cell("left", $item['filename']);
@ -520,13 +520,13 @@
}
echo "</table>";
}
echo "<br /><center><form action=\"".$ME."\" method=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=$wdir />";
echo " <INPUT TYPE=hidden NAME=action VALUE=cancel />";
echo " <INPUT TYPE=submit VALUE=\"$strok\" />";
echo "</FORM>";
echo "</CENTER>";
echo "<br /><center><form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=$wdir />";
echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
echo " <input type=\"submit\" value=\"$strok\" />";
echo "</form>";
echo "</center>";
} else {
displaydir($wdir);
}
@ -636,7 +636,7 @@ function printfilelist($filelist) {
foreach ($filelist as $file) {
if (is_dir($basedir.$file)) {
echo "<img src=\"$CFG->pixpath/f/folder.gif\" height=16 width=16> $file<br />";
echo "<img src=\"$CFG->pixpath/f/folder.gif\" height=\"16\" width=\"16\"> $file<br />";
$subfilelist = array();
$currdir = opendir($basedir.$file);
while ($subfile = readdir($currdir)) {
@ -648,18 +648,18 @@ function printfilelist($filelist) {
} else {
$icon = mimeinfo("icon", $file);
echo "<img src=\"$CFG->pixpath/f/$icon\" height=16 width=16> $file<br />";
echo "<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\"> $file<br />";
}
}
}
function print_cell($alignment="center", $text="&nbsp;") {
echo "<TD ALIGN=\"$alignment\" NOWRAP>";
echo "<FONT SIZE=\"-1\" FACE=\"Arial, Helvetica\">";
echo "<td align=\"$alignment\" nowrap=\"nowrap\">";
echo "<font size=\"-1\" face=\"Arial, Helvetica\">";
echo "$text";
echo "</FONT>";
echo "</TD>\n";
echo "</font>";
echo "</td>\n";
}
function displaydir ($wdir) {
@ -704,15 +704,15 @@ function displaydir ($wdir) {
$strchoose = get_string("choose");
echo "<FORM ACTION=\"".$ME."\" METHOD=post NAME=dirform>";
echo "<TABLE BORDER=0 cellspacing=2 cellpadding=2 width=640>";
echo "<TR>";
echo "<TH WIDTH=5></TH>";
echo "<TH ALIGN=left>$strname</TH>";
echo "<TH ALIGN=right>$strsize</TH>";
echo "<TH ALIGN=right>$strmodified</TH>";
echo "<TH ALIGN=right>$straction</TH>";
echo "</TR>\n";
echo "<form action=\"".$ME."\" method=\"post\" name=\"dirform\">";
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\">";
echo "<tr>";
echo "<th width=\"5\"></th>";
echo "<th align=\"left\">$strname</th>";
echo "<th align=\"right\">$strsize</th>";
echo "<th align=\"right\">$strmodified</th>";
echo "<th align=\"right\">$straction</th>";
echo "</tr>\n";
if ($wdir == "/") {
$wdir = "";
@ -731,15 +731,15 @@ function displaydir ($wdir) {
$filesafe = rawurlencode($dir);
$filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p");
echo "<TR>";
echo "<tr>";
print_cell("center", "<INPUT TYPE=checkbox NAME=\"file$count\" VALUE=\"$fileurl\" />");
print_cell("left", "<A HREF=\"".basename($ME)."?id=$id&wdir=$fileurl\"><IMG SRC=\"$CFG->pixpath/f/folder.gif\" HEIGHT=16 WIDTH=16 BORDER=0 ALT=\"Folder\"></A> <A HREF=\"".basename($ME)."?id=$id&wdir=$fileurl\">".htmlspecialchars($dir)."</A>");
print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />");
print_cell("left", "<a href=\"".basename($ME)."?id=$id&wdir=$fileurl\"><img src=\"$CFG->pixpath/f/folder.gif\" height=\"16\" width=\"16\" border=\"0\" alt=\"Folder\"></a> <a href=\"".basename($ME)."?id=$id&wdir=$fileurl\">".htmlspecialchars($dir)."</a>");
print_cell("right", "-");
print_cell("right", $filedate);
print_cell("right", "<A HREF=\"".basename($ME)."?id=$id&wdir=$wdir&file=$filesafe&action=rename\">$strrename</A>");
print_cell("right", "<a href=\"".basename($ME)."?id=$id&wdir=$wdir&file=$filesafe&action=rename\">$strrename</a>");
echo "</TR>";
echo "</tr>";
}
}
@ -772,9 +772,9 @@ function displaydir ($wdir) {
print_cell("center", "<input type=\"checkbox\" name=\"file$count\" value=\"$fileurl\" />");
echo "<td align=left nowrap>";
echo "<td align=\"left\" nowrap=\"nowrap\">";
link_to_popup_window ($ffurl, "display",
"<img src=\"$CFG->pixpath/f/$icon\" height=16 width=16 border=0 alt=\"file\">",
"<img src=\"$CFG->pixpath/f/$icon\" height=\"16\" width=\"16\" border=\"0\" alt=\"file\">",
480, 640);
echo "<font size=\"-1\" face=\"Arial, Helvetica\">";
link_to_popup_window ($ffurl, "display", htmlspecialchars($file), 480, 640);
@ -793,22 +793,22 @@ function displaydir ($wdir) {
$edittext .= "<a href=\"".basename($ME)."?id=$id&wdir=$wdir&file=$fileurl&action=listzip\">$strlist</a> ";
}
print_cell("right", "$edittext <A HREF=\"".basename($ME)."?id=$id&wdir=$wdir&file=$filesafe&action=rename\">$strrename</A>");
print_cell("right", "$edittext <a href=\"".basename($ME)."?id=$id&wdir=$wdir&file=$filesafe&action=rename\">$strrename</a>");
echo "</tr>";
}
}
echo "</table>";
echo "<hr width=640 align=center noshade size=1>";
echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\">";
if (empty($wdir)) {
$wdir = "/";
}
echo "<TABLE BORDER=0 cellspacing=2 cellpadding=2 width=640>";
echo "<TR><TD>";
echo "<INPUT TYPE=hidden NAME=id VALUE=\"$id\" />";
echo "<INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" /> ";
echo "<table border=\"0\" cellspacing=\"2\" cellpadding=\"2\" width=\"640\">";
echo "<tr><td>";
echo "<input type=\"hidden\" name=\"id\" value=\"$id\" />";
echo "<input type=\"hidden\" name=\"wdir\" value=\"$wdir\" /> ";
$options = array (
"move" => "$strmovetoanotherfolder",
"delete" => "$strdeletecompletely",
@ -818,34 +818,34 @@ function displaydir ($wdir) {
choose_from_menu ($options, "action", "", "$strwithchosenfiles...", "javascript:document.dirform.submit()");
}
echo "</FORM>";
echo "<TD ALIGN=center>";
echo "</form>";
echo "<td align=\"center\">";
if (!empty($USER->fileop) and ($USER->fileop == "move") and ($USER->filesource <> $wdir)) {
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" />";
echo " <INPUT TYPE=hidden NAME=action VALUE=paste />";
echo " <INPUT TYPE=submit VALUE=\"$strmovefilestohere\" />";
echo "</FORM>";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"action\" value=\"paste\" />";
echo " <input type=\"submit\" value=\"$strmovefilestohere\" />";
echo "</form>";
}
echo "<TD ALIGN=right>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" />";
echo " <INPUT TYPE=hidden NAME=action VALUE=mkdir />";
echo " <INPUT TYPE=submit VALUE=\"$strmakeafolder\" />";
echo "</FORM>";
echo "</TD>";
echo "<TD ALIGN=right>";
echo "<FORM ACTION=\"".$ME."\" METHOD=get>";
echo " <INPUT TYPE=hidden NAME=id VALUE=$id />";
echo " <INPUT TYPE=hidden NAME=wdir VALUE=\"$wdir\" />";
echo " <INPUT TYPE=hidden NAME=action VALUE=upload />";
echo " <INPUT TYPE=submit VALUE=\"$struploadafile\" />";
echo "</FORM>";
echo "</TD></TR>";
echo "</TABLE>";
echo "<HR WIDTH=640 ALIGN=CENTER NOSHADE SIZE=1>";
echo "<td align=\"right\">";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"action\" value=\"mkdir\" />";
echo " <input type=\"submit\" value=\"$strmakeafolder\" />";
echo "</form>";
echo "</td>";
echo "<td align=\"right\">";
echo "<form action=\"".$ME."\" method=\"get\">";
echo " <input type=\"hidden\" name=\"id\" value=$id />";
echo " <input type=\"hidden\" name=\"wdir\" value=\"$wdir\" />";
echo " <input type=\"hidden\" name=\"action\" value=\"upload\" />";
echo " <input type=\"submit\" value=\"$struploadafile\" />";
echo "</form>";
echo "</td></tr>";
echo "</table>";
echo "<hr width=\"640\" align=\"center\" noshade=\"noshade\" size=\"1\">";
}

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
function scorm_upgrade($oldversion) {
/// This function does anything necessary to upgrade

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
function scorm_upgrade($oldversion) {
// This function does anything necessary to upgrade

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
require_once("lib.php");
@ -82,17 +82,17 @@
//
print_simple_box_start("center", "", "$THEME->cellheading");
echo "<table cellpadding=\"5\" align=\"center\">\n";
echo " <tr><td align=\"right\" nowrap><p><b>$strname:</b></p></td><td><p>$form->name</p></a></td></tr>\n";
echo " <tr><td align=\"right\" nowrap><p><b>".get_string("validation","scorm").":</b></p></td><td><p>".get_string($result,"scorm")."</p></a></td></tr>\n";
echo " <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>$strname:</b></p></td><td><p>$form->name</p></a></td></tr>\n";
echo " <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>".get_string("validation","scorm").":</b></p></td><td><p>".get_string($result,"scorm")."</p></a></td></tr>\n";
if ($errorlogs != '') {
$lines = round(count($errors)/4);
if ($lines < 5) {
$lines = 5;
}
echo " <tr><td align=\"right\" nowrap><p><b>".get_string("errorlogs","scorm").":</b></p></td><td><textarea rows=\"".$lines."\" cols=\"30\" readonly>".$errorlogs."</textarea></a></td></tr>\n";
echo " <tr><td align=\"right\" nowrap=\"nowrap\"><p><b>".get_string("errorlogs","scorm").":</b></p></td><td><textarea rows=\"".$lines."\" cols=\"30\" readonly>".$errorlogs."</textarea></a></td></tr>\n";
}
if (($form->mode == "update") && ($form->launch == 0) && (get_records("scorm_sco_users","scormid",$form->instance)))
echo " <tr><td align=\"center\" colspan=\"2\" nowrap><p><b>".get_string("trackingloose","scorm")."</b></p></td></tr>\n";
echo " <tr><td align=\"center\" colspan=\"2\" nowrap=\"nowrap\"><p><b>".get_string("trackingloose","scorm")."</b></p></td></tr>\n";
echo "</table>\n";
if (($result == "regular") || ($result == "found")){
if (empty($form->auto)) {
@ -150,8 +150,8 @@
?>
<table cellpadding="5" align="center">
<tr valign=top>
<td align=right><p><b><?php print_string("grademethod", "scorm") ?>:</b></p></td>
<tr valign="top">
<td align="right"><p><b><?php print_string("grademethod", "scorm") ?>:</b></p></td>
<td>
<?php
$options = array();
@ -163,8 +163,8 @@
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
<tr valign="top">
<td align="right"><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
<td>
<?php
for ($i=100; $i>=1; $i--) {
@ -176,8 +176,8 @@
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("autocontinue","scorm") ?>:</b></p></td>
<tr valign="top">
<td align="right"><p><b><?php print_string("autocontinue","scorm") ?>:</b></p></td>
<td>
<?php
$options = array();
@ -188,7 +188,7 @@
</td>
</tr>
<tr valign="top">
<td align="right" nowrap>
<td align="right" nowrap="nowrap">
<p><b><?php p($strnewwindow) ?></b></p>
</td>
<td>
@ -207,8 +207,8 @@
echo "document.theform.auto.disabled=true;\n";
?>
</script>
<input name="setnewwindow" type=hidden value=1 />
<input name="newwindow" type=checkbox value=1 <?php p($newwindow) ?> onclick="autowindow();return lockoptions('theform','newwindow', subitems);" />
<input name="setnewwindow" type="hidden" value="1" />
<input name="newwindow" type="checkbox" value="1" <?php p($newwindow) ?> onclick="autowindow();return lockoptions('theform','newwindow', subitems);" />
<?php p($strnewwindowopen) ?>
<ul>
<?php
@ -223,10 +223,10 @@
}
?>
<input name="hwidth" type=hidden value="0" />
<input name="width" type=text size=4 value="<?php p($window->width) ?>" /> <?php p($strwidth) ?><br />
<input name="hheight" type=hidden value="0" />
<input name="height" type=text size=4 value="<?php p($window->height) ?>" /> <?php p($strheight) ?><br />
<input name="hwidth" type="hidden" value="0" />
<input name="width" type="text" size="4" value="<?php p($window->width) ?>" /> <?php p($strwidth) ?><br />
<input name="hheight" type="hidden" value="0" />
<input name="height" type="text" size="4" value="<?php p($window->height) ?>" /> <?php p($strheight) ?><br />
<?php
if (!$newwindow) {
echo "<script>\n<!--\n";
@ -253,7 +253,7 @@
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<div align="center">
<input type="submit" value="<?php print_string("savechanges") ?>" />
<input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
<input type="submit" name="cancel" value="<?php print_string("cancel") ?>" />
</div>
</form>
<?php

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
require_once("../../config.php");
@ -10,7 +10,7 @@
if ($course->category) {
require_login($course->id);
$navigation = "<A HREF=\"../../course/view.php?id=$course->id\">$course->shortname</A> ->";
$navigation = "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->";
} else {
$navigation = '';
}
@ -58,20 +58,20 @@
$tt = "$scorm->section";
}
} else {
$tt = "<FONT SIZE=1>".userdate($scorm->timemodified);
$tt = "<font size=\"1\">".userdate($scorm->timemodified);
}
if (!$scorm->visible) {
//Show dimmed if the mod is hidden
$table->data[] = array ($tt, "<A class=\"dimmed\" HREF=\"view.php?id=$scorm->coursemodule\">$scorm->name</A>",
$table->data[] = array ($tt, "<a class=\"dimmed\" href=\"view.php?id=$scorm->coursemodule\">$scorm->name</a>",
text_to_html($scorm->summary) );
} else {
//Show normal if the mod is visible
$table->data[] = array ($tt, "<A HREF=\"view.php?id=$scorm->coursemodule\">$scorm->name</A>",
$table->data[] = array ($tt, "<a href=\"view.php?id=$scorm->coursemodule\">$scorm->name</a>",
text_to_html($scorm->summary) );
}
}
echo "<BR>";
echo "<br>";
print_table($table);

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
/// Library of functions and constants for module scorm
/// (replace scorm with the name of your module and delete this line)
@ -588,7 +588,7 @@ function scorm_string_round($stringa) {
// Crop a string to $len character and set an anchor title to the full string
$len=11;
if ( strlen($stringa)>$len ) {
return "<A name=\"\" title=\"$stringa\">".substr($stringa,0,$len-4).'...'.substr($stringa,strlen($stringa)-1,1).'</A>';
return "<a name=\"\" title=\"$stringa\">".substr($stringa,0,$len-4).'...'.substr($stringa,strlen($stringa)-1,1).'</a>';
} else
return $stringa;
}

View file

@ -15,11 +15,11 @@
<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/details.php">
<table cellpadding=5>
<tr valign=top>
<td align=right><p><b><?php print_string("name") ?>:</b></p></td>
<table cellpadding="5">
<tr valign="top">
<td align="right"><p><b><?php print_string("name") ?>:</b></p></td>
<td>
<input type="text" name="name" size=50 value="<?php p($form->name) ?>" />
<input type="text" name="name" size="50" value="<?php p($form->name) ?>" />
</td>
</tr>
<?php
@ -27,7 +27,7 @@
$strchooseafile = get_string("chooseapacket", "scorm");
?>
<tr valign="top">
<td align="right" nowrap>
<td align="right" nowrap="nowrap">
<p><b><?php echo $strfilename?>:</b></p>
</td>
<td>
@ -38,8 +38,8 @@
?>
</td>
</tr>
<tr valign=top>
<td align=right><p><b><?php print_string("summary") ?>:</b></p>
<tr valign="top">
<td align="right"><p><b><?php print_string("summary") ?>:</b></p>
<font size="1">
<?php
helpbutton("summary", get_string("summary"), "scorm", true, true);
@ -55,20 +55,20 @@
</td>
</tr>
</table>
<input type="hidden" name=course value="<?php p($form->course) ?>" />
<input type="hidden" name=coursemodule value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name=datadir value="<?php p($form->datadir) ?>" />
<input type="hidden" name=launch value="<?php p($form->launch) ?>" />
<input type="hidden" name=popup value="<?php p($form->popup) ?>" />
<input type="hidden" name=auto value="<?php p($form->auto) ?>" />
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="datadir" value="<?php p($form->datadir) ?>" />
<input type="hidden" name="launch" value="<?php p($form->launch) ?>" />
<input type="hidden" name="popup" value="<?php p($form->popup) ?>" />
<input type="hidden" name="auto" value="<?php p($form->auto) ?>" />
<input type="hidden" name="maxgrade" value="<?php p($form->maxgrade) ?>" />
<input type="hidden" name="grademethod" value="<?php p($form->grademethod) ?>" />
<input type="hidden" name=section value="<?php p($form->section) ?>" />
<input type="hidden" name=module value="<?php p($form->module) ?>" />
<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
<input type="hidden" name=instance value="<?php p($form->instance) ?>" />
<input type="hidden" name=mode value="<?php p($form->mode) ?>" />
<input type="hidden" name=destination value="<?php echo $ME ?>" />
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
<input type="hidden" name="destination" value="<?php echo $ME ?>" />
<center>
<input type="submit" value="<?php print_string("continue") ?>" />
</center>

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
/// This page prints a particular instance of scorm
/// (Replace scorm with the name of your module)
@ -81,7 +81,7 @@
echo "<table width=\"100%\">\n <tr><td align=\"center\">".text_to_html($scorm->summary, true, false)."</td>\n";
if ($mode == "browse")
echo "<td align=\"right\" width=\"10%\" nowrap>".get_string("browsemode","scorm")."</td>\n";
echo "<td align=\"right\" width=\"10%\" nowrap=\"nowrap\">".get_string("browsemode","scorm")."</td>\n";
echo " </tr>\n</table>\n";
if ($scorm->popup != "") {
@ -122,7 +122,7 @@
print_simple_box_start("CENTER");
echo "<table>\n";
echo " <tr><th>".get_string("coursestruct","scorm")."</th></tr>\n";
echo " <tr><td nowrap>\n<ul class=\"scormlist\"'>\n";
echo " <tr><td nowrap=\"nowrap\">\n<ul class=\"scormlist\"'>\n";
$incomplete = false;
if ($scoes = get_records_select("scorm_scoes","scorm='$scorm->id' AND organization='$currentorg' order by id ASC")){
$level=0;
@ -212,7 +212,7 @@
}
echo "<table width=\"100%\">\n <tr>\n";
echo " <td align=\"center\" nowrap>
echo " <td align=\"center\" nowrap=\"nowrap\">
<iframe name=\"cmi\" width=\"1\" height=\"1\" src=\"cmi.php?id=$cm->id\" style=\"visibility: hidden\"></iframe>
<form name=\"navform\" method=\"POST\" action=\"playscorm.php?id=$cm->id\" target=\"_top\">
<input name=\"scoid\" type=\"hidden\" />

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
// This script uses installed report plugins to print quiz reports
@ -52,7 +52,7 @@
$strreport = get_string("report", "scorm");
print_header("$course->shortname: $scorm->name", "$course->fullname",
"$navigation <A HREF=index.php?id=$course->id>$strscorms</A>
"$navigation <a href=\"index.php?id=$course->id\">$strscorms</a>
-> <a href=\"view.php?id=$cm->id\">$scorm->name</a> -> $strreport",
"", "", true);

View file

@ -1,4 +1,4 @@
<?PHP //$Id$
<?php //$Id$
//This php script contains all the stuff to backup/restore
//reservation mods

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
/////////////////////////////////////////////////////////////////////////////////
/// Code fragment to define the version of scorm

View file

@ -1,4 +1,4 @@
<?PHP // $Id$
<?php // $Id$
/// This page prints a particular instance of scorm
/// (Replace scorm with the name of your module)
@ -72,9 +72,9 @@
if (isteacher($course->id)) {
if ($sco_users = get_records_select("scorm_sco_users", "scormid='$scorm->id' GROUP BY userid")) {
echo "<p align=right><a target=\"{$CFG->framename}\" href=\"report.php?id=$cm->id\">".get_string("viewallreports","scorm",count($sco_users))."</a></p>";
echo "<p align=\"right\"><a target=\"{$CFG->framename}\" href=\"report.php?id=$cm->id\">".get_string("viewallreports","scorm",count($sco_users))."</a></p>";
} else {
echo "<p align=right>".get_string("noreports","scorm")."</p>";
echo "<p align=\"right\">".get_string("noreports","scorm")."</p>";
}
}
// Print the main part of the page
@ -112,7 +112,7 @@
$orgidentifier = $org->organization;
}
}
echo " <tr><td nowrap>\n<ul class=\"scormlist\"'>\n";
echo " <tr><td nowrap=\"nowrap\">\n<ul class=\"scormlist\"'>\n";
$incomplete = false;
if ($scoes = get_records_select("scorm_scoes","scorm='$scorm->id' AND organization='$orgidentifier' order by id ASC")){
$level=0;