Skip to content

Commit

Permalink
MDL-14342 fixed wrong quotes; merged from MOODLE_19_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Apr 13, 2008
1 parent ca182d9 commit 02af98b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions mod/data/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ class data_field_base { /// Base class for Database Field Types (see field/*
function data_field_base($field=0, $data=0) { // Field or data or both, each can be id or object

if (empty($field) && empty($data)) {
print_error('Programmer error: You must specify field and/or data when defining field class. ');
error('Programmer error: You must specify field and/or data when defining field class. ');
}

if (!empty($field)) {
if (is_object($field)) {
$this->field = $field; // Programmer knows what they are doing, we hope
} else if (!$this->field = get_record('data_fields','id',$field)) {
print_error('Bad field ID encountered: '.$field);
error('Bad field ID encountered: '.$field);
}
if (empty($data)) {
if (!$this->data = get_record('data','id',$this->field->dataid)) {
print_error('Bad data ID encountered in field data');
error('Bad data ID encountered in field data');
}
}
}
Expand All @@ -61,10 +61,10 @@ function data_field_base($field=0, $data=0) { // Field or data or both, each c
if (is_object($data)) {
$this->data = $data; // Programmer knows what they are doing, we hope
} else if (!$this->data = get_record('data','id',$data)) {
print_error('Bad data ID encountered: '.$data);
error('Bad data ID encountered: '.$data);
}
} else { // No way to define it!
print_error('Data id or object must be provided to field class');
error('Data id or object must be provided to field class');
}
}

Expand Down Expand Up @@ -1711,7 +1711,7 @@ function data_user_can_add_entry($data, $currentgroup, $groupmode) {
global $USER;

if (!$cm = get_coursemodule_from_instance('data', $data->id)) {
print_error('Course Module ID was incorrect');
error('Course Module ID was incorrect');
}
$context = get_context_instance(CONTEXT_MODULE, $cm->id);

Expand Down Expand Up @@ -1841,7 +1841,7 @@ function data_presets_export($course, $cm, $data) {

/* Check all is well */
if (!is_directory_a_preset($tempfolder)) {
print_error("Not all files generated!");
error("Not all files generated!");
}

$filelist = array(
Expand Down Expand Up @@ -1884,7 +1884,7 @@ function get_settings() {
global $CFG;

if (!is_directory_a_preset($this->folder)) {
print_error("$this->userid/$this->shortname Not a preset");
error("$this->userid/$this->shortname Not a preset");
}

/* Grab XML */
Expand Down Expand Up @@ -1935,7 +1935,7 @@ function get_settings() {

function import_options() {
if (!confirm_sesskey()) {
print_error("Sesskey Invalid");
error("Sesskey Invalid");
}

$strblank = get_string('blank', 'data');
Expand Down Expand Up @@ -1972,7 +1972,7 @@ function import_options() {
$selected=true;
}
else {
echo '<option value="$cid">'.$currentfield->name.'</option>';
echo '<option value="'.$cid.'">'.$currentfield->name.'</option>';
}
}
}
Expand All @@ -1987,7 +1987,7 @@ function import_options() {
echo "<p>$strwarning</p>";
}
else if (empty($newfields)) {
print_error("New preset has no defined fields!");
error("New preset has no defined fields!");
}
echo '<input type="submit" value="'.$strcontinue.'" /></fieldset></form></div>';

Expand All @@ -2006,7 +2006,7 @@ function import() {
$cid = optional_param("field_$nid", -1, PARAM_INT);
if ($cid == -1) continue;

if (array_key_exists($cid, $preservedfields)) print_error("Not an injective map");
if (array_key_exists($cid, $preservedfields)) error("Not an injective map");
else $preservedfields[$cid] = true;
}

Expand Down
2 changes: 1 addition & 1 deletion mod/data/preset_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function get_import_html() {
$selected=true;
}
else {
$html .= '<option value="$cid">'.$currentfield->name.'</option>';
$html .= '<option value="'.$cid.'">'.$currentfield->name.'</option>';
}
}
}
Expand Down

0 comments on commit 02af98b

Please sign in to comment.