? .project
Index: backup/backup.php
===================================================================
RCS file: /cvsroot/moodle/moodle/backup/backup.php,v
retrieving revision 1.40.2.2
diff -n -c -b -B -r1.40.2.2 backup.php
*** backup/backup.php 14 Feb 2007 20:59:14 -0000 1.40.2.2
--- backup/backup.php 24 Feb 2007 02:52:44 -0000
***************
*** 78,84 ****
print_heading(get_string("choosecourse"));
print_simple_box_start("center");
foreach ($courses as $course) {
! echo ''.s($course->fullname).' ('.s($course->shortname).')
'."\n";
}
print_simple_box_end();
} else {
--- 78,84 ----
print_heading(get_string("choosecourse"));
print_simple_box_start("center");
foreach ($courses as $course) {
! echo ''.format_title($course->fullname).' ('.format_title($course->shortname).')
'."\n";
}
print_simple_box_end();
} else {
***************
*** 98,104 ****
if (has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
print_header("$site->shortname: $strcoursebackup", $site->fullname,
"wwwroot/$CFG->admin/index.php\">$stradministration ->
! $strcoursebackup -> $course->fullname ($course->shortname)");
} else {
print_header("$course->shortname: $strcoursebackup", $course->fullname,
"wwwroot/course/view.php?id=$course->id\">$course->shortname ->
--- 98,105 ----
if (has_capability('moodle/site:backup', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
print_header("$site->shortname: $strcoursebackup", $site->fullname,
"wwwroot/$CFG->admin/index.php\">$stradministration ->
! $strcoursebackup -> " . format_title($course->fullname)
! . " (" . format_title($course->shortname) . ")");
} else {
print_header("$course->shortname: $strcoursebackup", $course->fullname,
"wwwroot/course/view.php?id=$course->id\">$course->shortname ->
***************
*** 106,112 ****
}
//Print form
! print_heading("$strcoursebackup: $course->fullname ($course->shortname)");
print_simple_box_start("center");
//Adjust some php variables to the execution of this script
--- 107,114 ----
}
//Print form
! print_heading("$strcoursebackup: " . format_title($course->fullname)
! . " (" . format_title($course->shortname) . ")");
print_simple_box_start("center");
//Adjust some php variables to the execution of this script
Index: blocks/admin/block_admin.php
===================================================================
RCS file: /cvsroot/moodle/moodle/blocks/admin/block_admin.php,v
retrieving revision 1.84.2.1
diff -n -c -b -B -r1.84.2.1 block_admin.php
Index: blocks/course_list/block_course_list.php
===================================================================
RCS file: /cvsroot/moodle/moodle/blocks/course_list/block_course_list.php,v
retrieving revision 1.40.2.2
diff -n -c -b -B -r1.40.2.2 block_course_list.php
Index: course/category.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/category.php,v
retrieving revision 1.93.2.1
diff -n -c -b -B -r1.93.2.1 category.php
*** course/category.php 16 Feb 2007 08:43:13 -0000 1.93.2.1
--- course/category.php 24 Feb 2007 02:52:45 -0000
***************
*** 312,318 ****
$linkcss = $acourse->visible ? "" : ' class="dimmed" ';
echo '
';
! echo ''.$acourse->fullname.' | ';
if ($creatorediting) {
echo "";
if (has_capability('moodle/course:update', $coursecontext)) {
--- 312,318 ----
$linkcss = $acourse->visible ? "" : ' class="dimmed" ';
echo ' |
';
! echo ''.format_title($acourse->fullname).' | ';
if ($creatorediting) {
echo "";
if (has_capability('moodle/course:update', $coursecontext)) {
***************
*** 432,438 ****
echo '";
echo " ";
--- 432,438 ----
echo '";
echo " ";
Index: course/index.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/index.php,v
retrieving revision 1.67.2.1
diff -n -c -b -B -r1.67.2.1 index.php
*** course/index.php 23 Feb 2007 05:05:57 -0000 1.67.2.1
--- course/index.php 24 Feb 2007 02:52:45 -0000
***************
*** 106,114 ****
$newcategory->name = $form->addcategory;
$newcategory->sortorder = 999;
if (!insert_record('course_categories', $newcategory)) {
! notify("Could not insert the new category '" . s($newcategory->name) . "'");
} else {
! notify(get_string('categoryadded', '', s($newcategory->name)));
}
}
}
--- 106,114 ----
$newcategory->name = $form->addcategory;
$newcategory->sortorder = 999;
if (!insert_record('course_categories', $newcategory)) {
! notify("Could not insert the new category '" . format_title($newcategory->name) . "'");
} else {
! notify(get_string('categoryadded', '', format_title($newcategory->name)));
}
}
}
***************
*** 145,155 ****
/// Finally delete the category itself
if (delete_records('course_categories', 'id', $deletecat->id)) {
! notify(get_string('categorydeleted', '', s($deletecat->name)));
}
}
else {
! $strdeletecategorycheck = get_string('deletecategorycheck','', s($deletecat->name));
notice_yesno($strdeletecategorycheck,
"index.php?delete=$delete&sure=".md5($deletecat->timemodified)."&sesskey=$USER->sesskey",
"index.php?sesskey=$USER->sesskey");
--- 145,155 ----
/// Finally delete the category itself
if (delete_records('course_categories', 'id', $deletecat->id)) {
! notify(get_string('categorydeleted', '', format_title($deletecat->name)));
}
}
else {
! $strdeletecategorycheck = get_string('deletecategorycheck','', format_title($deletecat->name));
notice_yesno($strdeletecategorycheck,
"index.php?delete=$delete&sure=".md5($deletecat->timemodified)."&sesskey=$USER->sesskey",
"index.php?sesskey=$USER->sesskey");
***************
*** 353,359 ****
$linkcss = $category->visible ? '' : ' class="dimmed" ';
echo ''.
! s($category->name).'';
echo ' | ';
echo ''.$category->coursecount.' | ';
--- 353,359 ----
$linkcss = $category->visible ? '' : ' class="dimmed" ';
echo ''.
! format_title($category->name).'';
echo '';
echo ''.$category->coursecount.' | ';
Index: course/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/course/lib.php,v
retrieving revision 1.484.2.3
diff -n -c -b -B -r1.484.2.3 lib.php
*** course/lib.php 23 Feb 2007 08:17:54 -0000 1.484.2.3
--- course/lib.php 24 Feb 2007 02:52:46 -0000
***************
*** 1559,1565 ****
if ($path) {
$path = $path.' / '.s($category->name);
} else {
! $path = s($category->name);
}
$list[$category->id] = $path;
} else {
--- 1559,1565 ----
if ($path) {
$path = $path.' / '.s($category->name);
} else {
! $path = format_title($category->name);
}
$list[$category->id] = $path;
} else {
Index: lib/simpletestlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/simpletestlib.php,v
retrieving revision 1.3.2.1
diff -n -c -b -B -r1.3.2.1 simpletestlib.php
Index: lib/weblib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/weblib.php,v
retrieving revision 1.812.2.9
diff -n -c -b -B -r1.812.2.9 weblib.php
*** lib/weblib.php 23 Feb 2007 20:11:21 -0000 1.812.2.9
--- lib/weblib.php 24 Feb 2007 02:52:49 -0000
***************
*** 1372,1377 ****
--- 1372,1379 ----
* @param boolean $plaintext Convert string to plaintext, otherwise keep fancy html tags
* @param int $courseid Current course as filters can, potentially, use it
* @return string
+ * @todo Based on parameter, preserve tags
+ * @todo Breadcrumb links include < and > symbols, preserve them
*/
function format_title($string, $plaintext=true, $courseid=null) {
global $CFG;
***************
*** 1388,1394 ****
// TODO: try to add some detection of lonely < and > and convert them to html entitites
! // use filters if needed and cleam text
$options = new object();
$options->smiley = false;
$options->filter = !empty($CFG->filterall);
--- 1390,1396 ----
// TODO: try to add some detection of lonely < and > and convert them to html entitites
! // use filters if needed and clean text
$options = new object();
$options->smiley = false;
$options->filter = !empty($CFG->filterall);
***************
*** 1392,1400 ****
$options = new object();
$options->smiley = false;
$options->filter = !empty($CFG->filterall);
$string = format_text($string, FORMAT_HTML, $options, $courseid);
! //filters often produce links, we do not want these in titles
return preg_replace('/(]+?>)(.+?)(<\/a>)/is','$2', $string);
}
}
--- 1394,1405 ----
$options = new object();
$options->smiley = false;
$options->filter = !empty($CFG->filterall);
+
$string = format_text($string, FORMAT_HTML, $options, $courseid);
! // filters often produce links, we do not want these in titles
! // nicolasconnault: We do if they are part of the breadcrumbs :-)
! return $string;
return preg_replace('/(]+?>)(.+?)(<\/a>)/is','$2', $string);
}
}
***************
*** 2320,2326 ****
$shortname = ''. s($COURSE->shortname) .' ->';
}
! $output = print_header(s($COURSE->shortname) .': '. s($title), s($COURSE->fullname) .' '. s($heading), $shortname.' '. $navigation, $focus, $meta,
$cache, $button, $menu, $usexml, $bodytags, true);
if ($return) {
--- 2325,2331 ----
$shortname = ''. s($COURSE->shortname) .' ->';
}
! $output = print_header(s($COURSE->shortname) .': '. s($title), s($COURSE->fullname) .' '. s($heading), s($shortname) .' '. s($navigation), $focus, $meta,
$cache, $button, $menu, $usexml, $bodytags, true);
if ($return) {
***************
*** 2820,2826 ****
$site->shortname = get_string('home');
}
! $navigation = "$separator ". str_replace('->', "\n$separator", s($navigation, false, false)) ."\n";
$output .= 'frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
? '/my' : '') .'/">'. s($site->shortname) ."\n". $navigation;
$output .= "\n";
--- 2825,2831 ----
$site->shortname = get_string('home');
}
! $navigation = "$separator ". preg_replace("/\-\>|\-\>\;/", "\n$separator", format_title($navigation, false)) ."\n";
$output .= 'frametarget.' onclick="this.target=\''.$CFG->framename.'\'" href="'. $CFG->wwwroot.((!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID)) && !empty($USER->id) && !empty($CFG->mymoodleredirect) && !isguest())
? '/my' : '') .'/">'. s($site->shortname) ."\n". $navigation;
$output .= "\n";
Index: theme/chameleon/header.html
===================================================================
RCS file: /cvsroot/moodle/moodle/theme/chameleon/header.html,v
retrieving revision 1.6.2.2
diff -n -c -b -B -r1.6.2.2 header.html