- | enrol_allowinternal: |
-
+ | enrol_allowinternal: |
+
enrol_allowinternal) echo "checked=\"true\"" ?> />
|
diff --git a/enrol/flatfile/config.html b/enrol/flatfile/config.html
index 0cfed7bcc65..19d3aa0ea28 100644
--- a/enrol/flatfile/config.html
+++ b/enrol/flatfile/config.html
@@ -1,8 +1,8 @@
- | enrol_flatfilelocation: |
-
+ | enrol_flatfilelocation: |
+
|
@@ -11,8 +11,8 @@
|
- | enrol_mailstudents: |
-
+ | enrol_mailstudents: |
+
enrol_mailstudents) echo "checked=\"true\"" ?> />
|
@@ -21,8 +21,8 @@
|
- | enrol_mailteachers: |
-
+ | enrol_mailteachers: |
+
enrol_mailteachers) echo "checked=\"true\"" ?> />
|
@@ -31,8 +31,8 @@
|
- | enrol_mailadmins: |
-
+ | enrol_mailadmins: |
+
enrol_mailadmins) echo "checked=\"true\"" ?> />
|
@@ -41,8 +41,8 @@
|
- | enrol_allowinternal: |
-
+ | enrol_allowinternal: |
+
enrol_allowinternal) echo "checked=\"true\"" ?> />
|
diff --git a/enrol/ldap/config.html b/enrol/ldap/config.html
index 7b0b6adabeb..71140e8d9f9 100755
--- a/enrol/ldap/config.html
+++ b/enrol/ldap/config.html
@@ -39,25 +39,25 @@ optional_variable($frm->enrol_ldap_template, '');
|
- | enrol_ldap_host_url: |
-
+ | enrol_ldap_host_url: |
+
-
- |
+
+
|
- | enrol_ldap_version: |
-
+ | enrol_ldap_version: |
+
enrol_ldap_version, "");
- if (isset($err["enrol_ldap_version"])) formerr($err["enrol_ldap_version"]);
+ if (isset($err["enrol_ldap_version"])) formerr($err["enrol_ldap_version"]);
?>
- |
+
|
@@ -89,8 +89,8 @@ optional_variable($frm->enrol_ldap_template, '');
- | enrol_ldap_student_contexts: |
-
+ | enrol_ldap_student_contexts: |
+
|
@@ -114,8 +114,8 @@ optional_variable($frm->enrol_ldap_template, '');
- | enrol_ldap_teacher_contexts: |
-
+ | enrol_ldap_teacher_contexts: |
+
|
@@ -253,13 +253,13 @@ optional_variable($frm->enrol_ldap_template, '');
- | enrol_ldap_autocreate: |
-
+ | enrol_ldap_autocreate: |
+
'no','1'=>'yes'), "enrol_ldap_autocreate", $frm->enrol_ldap_autocreate, "");
- if (isset($err["enrol_ldap_autocreate"])) formerr($err["enrol_ldap_autocreate"]);
+ if (isset($err["enrol_ldap_autocreate"])) formerr($err["enrol_ldap_autocreate"]);
?>
- |
+
|
diff --git a/enrol/paypal/config.html b/enrol/paypal/config.html
index bf78a985cc9..84f42d0fd26 100644
--- a/enrol/paypal/config.html
+++ b/enrol/paypal/config.html
@@ -1,8 +1,8 @@
- | enrol_cost: |
-
+ | enrol_cost: |
+
|
@@ -11,8 +11,8 @@
|
- | enrol_currency: |
-
+ | enrol_currency: |
+
enrol_currency, "","", "") ?>
|
@@ -21,8 +21,8 @@
|
- | enrol_paypalbusiness: |
-
+ | enrol_paypalbusiness: |
+
|
@@ -31,8 +31,8 @@
|
- | enrol_mailstudents: |
-
+ | enrol_mailstudents: |
+
enrol_mailstudents) echo "checked=\"true\"" ?> />
|
@@ -41,8 +41,8 @@
|
- | enrol_mailteachers: |
-
+ | enrol_mailteachers: |
+
enrol_mailteachers) echo "checked=\"true\"" ?> />
|
@@ -51,8 +51,8 @@
|
- | enrol_mailadmins: |
-
+ | enrol_mailadmins: |
+
enrol_mailadmins) echo "checked=\"true\"" ?> />
|
diff --git a/filter/algebra/AlgParser.pm b/filter/algebra/AlgParser.pm
index 6ab1e7967a9..804e8328198 100755
--- a/filter/algebra/AlgParser.pm
+++ b/filter/algebra/AlgParser.pm
@@ -69,16 +69,16 @@ sub nexttoken {
my($p1) = pos($self->{string}) || 0;
if(scalar($self->{string} =~ m/\G$tokenregexp/gc)) {
push @{$self->{posarray}}, [$p1, pos($self->{string})];
- if (defined($1)) {return ['binop3', $1];}
- if (defined($2)) {return ['binop2', $2];}
- if (defined($3)) {return ['binop1', $3];}
- if (defined($4)) {return ['openp', $4];}
- if (defined($5)) {return ['closep', $5];}
- if (defined($6)) {return ['func1', $6];}
- if (defined($7)) {return ['special', $7];}
- if (defined($8)) {return ['varname', $8];}
- if (defined($9)) {return ['numberE', $9];}
- if (defined($10)) {return ['number', $10];}
+ if (defined($1)) {return ['binop3', $1];}
+ if (defined($2)) {return ['binop2', $2];}
+ if (defined($3)) {return ['binop1', $3];}
+ if (defined($4)) {return ['openp', $4];}
+ if (defined($5)) {return ['closep', $5];}
+ if (defined($6)) {return ['func1', $6];}
+ if (defined($7)) {return ['special', $7];}
+ if (defined($8)) {return ['varname', $8];}
+ if (defined($9)) {return ['numberE', $9];}
+ if (defined($10)) {return ['number', $10];}
}
else {
push @{$self->{posarray}}, [$p1, undef];
@@ -120,7 +120,7 @@ sub parse {
while (${$currentref}->[0] !~ /^(openp|top)/) {
$currentref = pop @backtrace;
}
- my $index = ((${$currentref}->[0] eq 'top')?1:3);
+ my $index = ((${$currentref}->[0] eq 'top')?1:3);
${$currentref}->[$index] = ['binop1', $currenttok->[1],
${$currentref}->[$index], undef];
push @backtrace, $currentref;
@@ -550,12 +550,12 @@ sub tolatex {
if ($args[1]->[0] =~ /binop1|numberE/)
{($p1,$p2)=qw{ \left( \right) };}
# if ($args[2]->[0] =~ /binop[12]|numberE/)
- if ($args[2]->[0] =~ /binop[12]|numberE|unop1/)
+ if ($args[2]->[0] =~ /binop[12]|numberE|unop1/)
{($p3,$p4)=qw{ \left( \right) };}
if ($args[0] eq '/'){
# return('\frac{' . $p1 . $args[1]->tolatex() . $p2 . '}'.
# '{' . $p3 . $args[2]->tolatex() . $p4 . '}' );
- return('\frac{' . $args[1]->tolatex() . '}'.
+ return('\frac{' . $args[1]->tolatex() . '}'.
'{' . $args[2]->tolatex() . '}' );
}
else{
diff --git a/filter/algebra/algebradebug.php b/filter/algebra/algebradebug.php
index 4883263e479..3077f51d150 100644
--- a/filter/algebra/algebradebug.php
+++ b/filter/algebra/algebradebug.php
@@ -25,11 +25,11 @@
$algebra = substr($query,8,$splitpos);
$md5 = md5($algebra);
if (strpos($query,'ShowDB') || strpos($query,'DeleteDB')) {
- $texcache = get_record("cache_filters","filter","algebra", "md5key", $md5);
+ $texcache = get_record("cache_filters","filter","algebra", "md5key", $md5);
}
if (strpos($query,'ShowDB')) {
if ($texcache) {
- $output = "DB cache_filters entry for $algebra\n";
+ $output = "DB cache_filters entry for $algebra\n";
$output .= "id = $texcache->id\n";
$output .= "filter = $texcache->filter\n";
$output .= "version = $texcache->version\n";
@@ -45,7 +45,7 @@
$output = "Deleting DB cache_filters entry for $algebra\n";
$result = delete_records("cache_filters","id",$texcache->id);
if ($result) {
- $result = 1;
+ $result = 1;
} else {
$result = 0;
}
@@ -55,17 +55,17 @@
}
}
if (strpos($query,'TeXStage1')) {
- $output = algebra2tex($algebra);
+ $output = algebra2tex($algebra);
}
if (strpos($query,'TeXStage2')) {
- $output = algebra2tex($algebra);
+ $output = algebra2tex($algebra);
$output = refineTeX($output);
}
if (strpos($query,'ShowImage')||strpos($query,'SlashArguments')) {
- $output = algebra2tex($algebra);
+ $output = algebra2tex($algebra);
$output = refineTeX($output);
if (strpos($query,'ShowImage')) {
- tex2image($output, $md5);
+ tex2image($output, $md5);
} else {
slasharguments($output, $md5);
}
@@ -103,7 +103,7 @@ function algebra2tex($algebra) {
echo "The shell command $cmd returned status = $status \n";
$commandpath = "$CFG->dirroot\\$CFG->algebrafilterdirwin\\algebra2tex.pl";
if (file_exists($commandpath)) {
- echo "The file permissions of algebra2tex.pl are: " . decoct(fileperms($commandpath)) . " ";
+ echo "The file permissions of algebra2tex.pl are: " . decoct(fileperms($commandpath)) . " ";
}
die;
}
@@ -222,7 +222,7 @@ function tex2image($texexp, $md5, $return=false) {
}
$pathname = "$CFG->dataroot/$CFG->algebraimagedir/$image";
if (file_exists($pathname)) {
- unlink($pathname);
+ unlink($pathname);
}
$commandpath = "";
$cmd = "";
@@ -234,23 +234,23 @@ function tex2image($texexp, $md5, $return=false) {
case "WINNT":
case "WIN32":
case "Windows":
- $commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
- $texexp = str_replace('"','\"',$texexp);
- $cmd = str_replace(' ','^ ',$commandpath);
- $cmd .= " ++ -e \"$pathname\" \"$texexp\"";
+ $commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.exe";
+ $texexp = str_replace('"','\"',$texexp);
+ $cmd = str_replace(' ','^ ',$commandpath);
+ $cmd .= " ++ -e \"$pathname\" \"$texexp\"";
break;
case "Darwin":
- $commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin";
+ $commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin";
$cmd = "\"$CFG->dirroot/$CFG->texfilterdir/mimetex.darwin\" -e \"$pathname\" ". escapeshellarg($texexp);
break;
}
if (!$cmd) {
- if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
+ if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
- $cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname ". escapeshellarg($texexp);
- } else {
- error($error_message1);
- }
+ $cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname ". escapeshellarg($texexp);
+ } else {
+ error($error_message1);
+ }
}
system($cmd, $status);
}
@@ -329,7 +329,7 @@ function slasharguments($texexp, $md5) {
- First click on this button
to see the cache_filters database entry for this expression.
- - If the database entry looks corrupt, click on this button to delete it:
+
- If the database entry looks corrupt, click on this button to delete it:
- Now click on this button .
A preliminary translation into TeX will appear in the box below.
diff --git a/filter/algebra/filter.php b/filter/algebra/filter.php
index d672da556d6..75e3578e4e4 100644
--- a/filter/algebra/filter.php
+++ b/filter/algebra/filter.php
@@ -180,28 +180,28 @@ function algebra_filter ($courseid, $text) {
$texexp = str_replace('\right}','}',$texexp);
$texexp = str_replace('\fun',' ',$texexp);
$texexp = str_replace('infty','\infty',$texexp);
- $texexp = str_replace('alpha','\alpha',$texexp);
- $texexp = str_replace('gamma','\gamma',$texexp);
- $texexp = str_replace('iota','\iota',$texexp);
- $texexp = str_replace('kappa','\kappa',$texexp);
- $texexp = str_replace('lambda','\lambda',$texexp);
- $texexp = str_replace('mu','\mu',$texexp);
- $texexp = str_replace('nu','\nu',$texexp);
- $texexp = str_replace('xi','\xi',$texexp);
- $texexp = str_replace('rho','\rho',$texexp);
- $texexp = str_replace('sigma','\sigma',$texexp);
- $texexp = str_replace('tau','\tau',$texexp);
- $texexp = str_replace('phi','\phi',$texexp);
- $texexp = str_replace('chi','\chi',$texexp);
- $texexp = str_replace('psi','\psi',$texexp);
- $texexp = str_replace('omega','\omega',$texexp);
- $texexp = str_replace('zdelta','\delta',$texexp);
- $texexp = str_replace('bita','\beta',$texexp);
- $texexp = str_replace('thita','\theta',$texexp);
- $texexp = str_replace('zita','\zeta',$texexp);
- $texexp = str_replace('xeta','\eta',$texexp);
- $texexp = str_replace('zepslon','\epsilon',$texexp);
- $texexp = str_replace('zupslon','\upsilon',$texexp);
+ $texexp = str_replace('alpha','\alpha',$texexp);
+ $texexp = str_replace('gamma','\gamma',$texexp);
+ $texexp = str_replace('iota','\iota',$texexp);
+ $texexp = str_replace('kappa','\kappa',$texexp);
+ $texexp = str_replace('lambda','\lambda',$texexp);
+ $texexp = str_replace('mu','\mu',$texexp);
+ $texexp = str_replace('nu','\nu',$texexp);
+ $texexp = str_replace('xi','\xi',$texexp);
+ $texexp = str_replace('rho','\rho',$texexp);
+ $texexp = str_replace('sigma','\sigma',$texexp);
+ $texexp = str_replace('tau','\tau',$texexp);
+ $texexp = str_replace('phi','\phi',$texexp);
+ $texexp = str_replace('chi','\chi',$texexp);
+ $texexp = str_replace('psi','\psi',$texexp);
+ $texexp = str_replace('omega','\omega',$texexp);
+ $texexp = str_replace('zdelta','\delta',$texexp);
+ $texexp = str_replace('bita','\beta',$texexp);
+ $texexp = str_replace('thita','\theta',$texexp);
+ $texexp = str_replace('zita','\zeta',$texexp);
+ $texexp = str_replace('xeta','\eta',$texexp);
+ $texexp = str_replace('zepslon','\epsilon',$texexp);
+ $texexp = str_replace('zupslon','\upsilon',$texexp);
$texexp = str_replace('\mbox{logten}','\mbox{log}_{10}',$texexp);
$texexp = str_replace('\mbox{acos}','\mbox{cos}^{-1}',$texexp);
$texexp = str_replace('\mbox{asin}','\mbox{sin}^{-1}',$texexp);
@@ -216,26 +216,26 @@ function algebra_filter ($courseid, $text) {
$texexp = str_replace('\mbox{acsch}','\mbox{csch}^{-1}',$texexp);
$texexp = str_replace('\mbox{acoth}','\mbox{coth}^{-1}',$texexp);
//$texexp = preg_replace('/\\\frac{(.+?)}{\\\left\((.+?)\\\right\)}/s','\frac{'."\$1}{\$2}",$texexp);
- $texexp = preg_replace('/\\\sqrt{(.+?),(.+?)}/s','\sqrt['. "\$2]{\$1}",$texexp);
- $texexp = preg_replace('/\\\mbox{abs}\\\left\((.+?)\\\right\)/s',"|\$1|",$texexp);
+ $texexp = preg_replace('/\\\sqrt{(.+?),(.+?)}/s','\sqrt['. "\$2]{\$1}",$texexp);
+ $texexp = preg_replace('/\\\mbox{abs}\\\left\((.+?)\\\right\)/s',"|\$1|",$texexp);
$texexp = preg_replace('/\\\log\\\left\((.+?),(.+?)\\\right\)/s','\log_{'. "\$2}\\left(\$1\\right)",$texexp);
$texexp = preg_replace('/(\\\cos|\\\sin|\\\tan|\\\sec|\\\csc|\\\cot)([h]*)\\\left\((.+?),(.+?)\\\right\)/s',"\$1\$2^{". "\$4}\\left(\$3\\right)",$texexp);
- $texexp = preg_replace('/\\\int\\\left\((.+?),(.+?),(.+?)\\\right\)/s','\int_'. "{\$2}^{\$3}\$1 ",$texexp);
+ $texexp = preg_replace('/\\\int\\\left\((.+?),(.+?),(.+?)\\\right\)/s','\int_'. "{\$2}^{\$3}\$1 ",$texexp);
$texexp = preg_replace('/\\\int\\\left\((.+?d[a-z])\\\right\)/s','\int '. "\$1 ",$texexp);
- $texexp = preg_replace('/\\\lim\\\left\((.+?),(.+?),(.+?)\\\right\)/s','\lim_'. "{\$2\\to \$3}\$1 ",$texexp);
- $texcache->filter = 'algebra';
- $texcache->version = 1;
- $texcache->md5key = $md5;
- $texcache->rawtext = addslashes($texexp);
- $texcache->timemodified = time();
- insert_record("cache_filters",$texcache, false);
- $text = str_replace( $matches[0][$i], string_file_picture_algebra($filename, $texexp, '', '', $align), $text);
- } else {
- $text = str_replace( $matches[0][$i],"Undetermined error: ",$text);
+ $texexp = preg_replace('/\\\lim\\\left\((.+?),(.+?),(.+?)\\\right\)/s','\lim_'. "{\$2\\to \$3}\$1 ",$texexp);
+ $texcache->filter = 'algebra';
+ $texcache->version = 1;
+ $texcache->md5key = $md5;
+ $texcache->rawtext = addslashes($texexp);
+ $texcache->timemodified = time();
+ insert_record("cache_filters",$texcache, false);
+ $text = str_replace( $matches[0][$i], string_file_picture_algebra($filename, $texexp, '', '', $align), $text);
+ } else {
+ $text = str_replace( $matches[0][$i],"Undetermined error: ",$text);
}
- } else {
- $text = str_replace( $matches[0][$i], string_file_picture_algebra($filename, $texcache->rawtext), $text);
- }
+ } else {
+ $text = str_replace( $matches[0][$i], string_file_picture_algebra($filename, $texcache->rawtext), $text);
+ }
}
return $text;
}
diff --git a/filter/tex/filter.php b/filter/tex/filter.php
index 72f25d44ed7..18df876cf9f 100644
--- a/filter/tex/filter.php
+++ b/filter/tex/filter.php
@@ -61,14 +61,14 @@ function string_file_picture_tex($imagefile, $tex= "", $height="", $width="", $a
}
if ($imagefile) {
if (!file_exists("$CFG->dataroot/$CFG->texfilterdir/$imagefile") && isadmin()) {
- $output .= "wwwroot/$CFG->texfilterdir/texdebug.php\">";
+ $output .= "wwwroot/$CFG->texfilterdir/texdebug.php\">";
} else {
$output .= "wwwroot/$CFG->texfilterdir/displaytex.php?";
$output .= urlencode($tex) . "\" onclick=\"return openpopup('/$CFG->texfilterdir/displaytex.php?";
$output .= urlencode($tex) . "', 'popup', 'menubar=0,location=0,scrollbars,";
$output .= "resizable,width=300,height=240', 0);\">";
- }
+ }
$output .= " slasharguments) { // Use this method if possible for better caching
$output .= "$CFG->wwwroot/$CFG->texfilterdir/pix.php/$imagefile";
diff --git a/filter/tex/texdebug.php b/filter/tex/texdebug.php
index d08cdea3082..6c3973638f4 100644
--- a/filter/tex/texdebug.php
+++ b/filter/tex/texdebug.php
@@ -121,17 +121,17 @@
break;
}
if (!$cmd) {
- if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
+ if (is_executable("$CFG->dirroot/$CFG->texfilterdir/mimetex")) { /// Use the custom binary
$commandpath="$CFG->dirroot/$CFG->texfilterdir/mimetex";
$cmd = "$CFG->dirroot/$CFG->texfilterdir/mimetex -e $pathname ". escapeshellarg($texexp);
} else {
error($error_message1);
- }
+ }
}
system($cmd, $status);
}
- if ($return) {
- return $image;
+ if ($return) {
+ return $image;
}
if ($texexp && file_exists($pathname)) {
$lastmodified = filemtime($pathname);
diff --git a/grade/exceptions.html b/grade/exceptions.html
index b585c576bbf..cd0d736790d 100644
--- a/grade/exceptions.html
+++ b/grade/exceptions.html
@@ -2,7 +2,7 @@
| |