projects
/
atutor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8462643
)
Took out debug messages from schemaValidation for ims import.
author
harris wong
<hwong@ocad.ca>
Fri, 26 Aug 2011 15:07:46 +0000
(15:07 -0000)
committer
harris wong
<hwong@ocad.ca>
Fri, 26 Aug 2011 15:07:46 +0000
(15:07 -0000)
docs/mods/_core/imscp/ims_import.php
patch
|
blob
|
history
diff --git
a/docs/mods/_core/imscp/ims_import.php
b/docs/mods/_core/imscp/ims_import.php
index
6201322
..
a162fe5
100644
(file)
--- a/
docs/mods/_core/imscp/ims_import.php
+++ b/
docs/mods/_core/imscp/ims_import.php
@@
-97,16
+97,16
@@
function checkResources($import_path){
$data = rscandir($import_path);
//check if every file is presented in the manifest
foreach($data as $filepath){
$data = rscandir($import_path);
//check if every file is presented in the manifest
foreach($data as $filepath){
-
debug(preg_match('/(.*)\.xml/', substr($filepath, strlen($import_path))));
+
//
debug(preg_match('/(.*)\.xml/', substr($filepath, strlen($import_path))));
//validate xml via its xsd/dtds
if (preg_match('/(.*)\.xml/', substr($filepath, strlen($import_path)))){
libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->load(realpath($filepath));
//validate xml via its xsd/dtds
if (preg_match('/(.*)\.xml/', substr($filepath, strlen($import_path)))){
libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->load(realpath($filepath));
-
debug(realpath($filepath), 'filepath');
+
//
debug(realpath($filepath), 'filepath');
if (!$dom->schemaValidate('main.xsd')){
$errors = libxml_get_errors();
if (!$dom->schemaValidate('main.xsd')){
$errors = libxml_get_errors();
-
debug($errors);exit;
+
//
debug($errors);exit;
foreach ($errors as $error) {
//suppress warnings
if ($error->level==LIBXML_ERR_WARNING){
foreach ($errors as $error) {
//suppress warnings
if ($error->level==LIBXML_ERR_WARNING){