skala
Julio Montoya 14 years ago
commit 5a0da5d32f
  1. 8
      main/exercice/exercise.class.php
  2. 14
      main/exercice/exercise_admin.php
  3. 21
      main/metadata/md_funcs.php

@ -871,8 +871,8 @@ class Exercise {
if($type=='full') {
// feedback type
$radios_feedback = array();
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0');
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2');
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_1','onclick' => 'check_feedback()'));
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
$form -> addGroup($radios_feedback, null, get_lang('FeedbackType'));
$feedback_option[0]=get_lang('ExerciseAtTheEndOfTheTest');
@ -906,8 +906,8 @@ class Exercise {
}
$radios_results_disabled = array();
$radios_results_disabled[] = FormValidator :: createElement ('radio', 'results_disabled', null, get_lang('Yes'),'0');
$radios_results_disabled[] = FormValidator :: createElement ('radio', 'results_disabled', null, get_lang('No'),'1');
$radios_results_disabled[] = FormValidator :: createElement ('radio', 'results_disabled', null, get_lang('Yes'), '0', array('id'=>'result_disabled_0'));
$radios_results_disabled[] = FormValidator :: createElement ('radio', 'results_disabled', null, get_lang('No'), '1',array('id'=>'result_disabled_1','onclick' => 'check_results_disabled()'));
$form -> addGroup($radios_results_disabled, null, get_lang('ShowResultsToStudents'));
$random = array();

@ -112,8 +112,7 @@ $htmlHeadXtra[] = '<script>
}
}
function check_per_page_all()
{
function check_per_page_all() {
if (document.getElementById(\'divtimecontrol\').style.display==\'block\')
{
document.getElementById(\'divtimecontrol\').style.display=\'none\';
@ -121,6 +120,17 @@ $htmlHeadXtra[] = '<script>
}
}
function check_feedback() {
document.getElementById(\'result_disabled_0\').checked = true;
}
function check_results_disabled() {
document.getElementById(\'exerciseType_2\').checked = true;
}
</script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript" language="javascript"></script>'; //jQuery

@ -415,20 +415,16 @@ function mds_update_xml_and_mdt($mdo, &$xmlDoc, $mda, $eid, &$traceinfo,
function mdstore($allow_create)
{
global $_course; if (!isset($_course)) return;
define('MDS_TABLE', Database::get_course_table(TABLE_METADATA));
$this->_query("CREATE TABLE IF NOT EXISTS " . MDS_TABLE . " ( " .
"eid varchar(250) NOT NULL," . // entry-id, e.g. doc.1
"mdxmltext text default ''," . // MD-text, XML-formatted
"md5 char(32) default ''," . // hash-validator
"htmlcache1 text default ''," . // cached HTML, part 1
"htmlcache2 text default ''," . // cached HTML, part 2
"indexabletext text default ''," . // indexable for search
"PRIMARY KEY (eid) )");
if (!Database::query("SELECT eid FROM " . MDS_TABLE))
if ($allow_create)
$this->_query("CREATE TABLE " . MDS_TABLE . " ( " .
"eid varchar(250) NOT NULL," . // entry-id, e.g. doc.1
"mdxmltext text default ''," . // MD-text, XML-formatted
"md5 char(32) default ''," . // hash-validator
"htmlcache1 text default ''," . // cached HTML, part 1
"htmlcache2 text default ''," . // cached HTML, part 2
"indexabletext text default ''," . // indexable for search
"PRIMARY KEY (eid) )");
else give_up('No metadata store is available for this course.');
}
function _coldatstart($column, $data)
@ -445,7 +441,6 @@ function _query($sql, $eid = '', $sep = '')
{
if ($eid) $sql .= $sep ? $this->_coldatstart('eid', $eid . $sep) :
$this->_coldat('eid', $eid);
return Database::query($sql);
}

Loading…
Cancel
Save