]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13025 added data intro text formatting without cleaning - manage activity cap...
authorskodak <skodak>
Mon, 21 Apr 2008 13:26:08 +0000 (13:26 +0000)
committerskodak <skodak>
Mon, 21 Apr 2008 13:26:08 +0000 (13:26 +0000)
mod/data/index.php
mod/data/view.php

index 6f8d6c7b106c0821021fd79d7005d51357c60266..648f0549b364846f4ae9a8268a4acba2ec68828d 100755 (executable)
@@ -28,7 +28,7 @@
     $id = required_param('id', PARAM_INT);   // course
 
     if (! $course = get_record("course", "id", $id)) {
-        print_error("Course ID is incorrect");
+        error("Course ID is incorrect");
     }
 
     require_course_login($course);
@@ -80,6 +80,9 @@
         array_push($table->align, 'center');
     }
 
+    $options = new object();
+    $options->noclean = true;
+
     $currentsection = "";
 
     foreach ($datas as $data) {
                 }
                 $currentsection = $data->section;
             }
-            $row = array ($printsection, $link, $data->intro, $numrecords, $numunapprovedrecords);
+            $row = array ($printsection, $link, format_text($data->intro, FORMAT_MOODLE, $options), $numrecords, $numunapprovedrecords);
 
         } else {
-            $row = array ($link, $data->intro, $numrecords, $numunapprovedrecords);
+            $row = array ($link, format_text($data->intro, FORMAT_MOODLE, $options), $numrecords, $numunapprovedrecords);
         }
 
         if ($rss) {
index acdeb0593ed54be3c65632adfb050dfded8d5340..bb5cab3c2ebf4abcc94711df145f8aa39baf79de 100755 (executable)
     }
 
     if ($data->intro and empty($page) and empty($record) and $mode != 'single') {
-        print_box(format_text($data->intro), 'generalbox', 'intro');
+        $options = new object();
+        $options->noclean = true;
+        print_box(format_text($data->intro, FORMAT_MOODLE, $options), 'generalbox', 'intro');
     }
 
 /// Delete any requested records