version 1.10, 2010/01/09 01:07:56
|
version 1.14, 2010/11/09 01:19:04
|
Line 115 sub setdefaults {
|
Line 115 sub setdefaults {
|
$revreqs{$prereqs{$item}} = $item; |
$revreqs{$prereqs{$item}} = $item; |
} |
} |
@defchosen=('01','02','03','07','12','18','26','32','37','38','47','54','63','66','2004_73'); |
@defchosen=('01','02','03','07','12','18','26','32','37','38','47','54','63','66','2004_73'); |
@development = ('001','002','003','004','005','006','007','008','009','010','011','012','013','014'); |
@development = ('001','002','003','004','005','006','007','008','009','010','011','012','013','014','015','016','017','018','019','020','021','022'); |
} |
} |
|
|
sub checkvalid { |
sub checkvalid { |
Line 282 sub editor {
|
Line 282 sub editor {
|
$r->print(&display_questions(\@devitems,'development',$devleg,\%chosenitems)); |
$r->print(&display_questions(\@devitems,'development',$devleg,\%chosenitems)); |
$r->print('<input type="hidden" name="phase" value="storemap" />'. |
$r->print('<input type="hidden" name="phase" value="storemap" />'. |
'<input type="hidden" name="context" value="'.$context.'" />'. |
'<input type="hidden" name="context" value="'.$context.'" />'. |
|
'<input type="hidden" name="concepttest" value="'.$env{'form.concepttest'}.'" />'. |
'<input type="submit" value="'.&mt('Store Problem Selection').'" />'. |
'<input type="submit" value="'.&mt('Store Problem Selection').'" />'. |
'</form>'); |
'</form>'); |
&Apache::lonnet::delenv('request.gcicontext'); |
&Apache::lonnet::delenv('request.gcicontext'); |
Line 316 sub display_questions {
|
Line 317 sub display_questions {
|
$output .= '<span id="'.$titleid.'">'. |
$output .= '<span id="'.$titleid.'">'. |
'<a href="javascript:showQuestions('."'$fieldid','$titleid'".')">'. |
'<a href="javascript:showQuestions('."'$fieldid','$titleid'".')">'. |
&mt('Show').'</a> ...</span><br />'. |
&mt('Show').'</a> ...</span><br />'. |
'<div id="'.$fieldid.'">'. |
'<div id="'.$fieldid.'" style="display: none">'. |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(); |
&Apache::loncommon::start_data_table_header_row(); |
unless (($catname eq 'development') || ($catname eq 'mandatory')) { |
unless (($catname eq 'development') || ($catname eq 'mandatory')) { |
Line 361 sub display_questions {
|
Line 362 sub display_questions {
|
} |
} |
$output .= '<b>'.$title.'</b></td>'; |
$output .= '<b>'.$title.'</b></td>'; |
my $content=&Apache::lonindexer::showpreview($url); |
my $content=&Apache::lonindexer::showpreview($url); |
|
my $startformtag = '<form name="lonhomework" enctype="multipart/form-data" method="post" action="'.$url.'?inhibitmenu=yes" >'; |
|
my $endtag = '<table><tr><td><input onmouseup="javascript:setSubmittedPart'; |
|
$content =~ s/^\Q$startformtag\E//; |
|
$content =~ s/\Q$endtag\E.+$//s; |
$output .= '<td> '.($content eq '' ? ' ':$content).' </td>'."\n". |
$output .= '<td> '.($content eq '' ? ' ':$content).' </td>'."\n". |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row(); |
} |
} |
Line 671 function hideQuestions(content,title) {
|
Line 676 function hideQuestions(content,title) {
|
return; |
return; |
} |
} |
|
|
function setInitialVisibility() { |
|
if (document.getElementById('GCI_mandatory_q') == null) { |
|
return; |
|
} |
|
document.getElementById('GCI_mandatory_q').style.display = "none"; |
|
document.getElementById('GCI_bin0_q').style.display = "none"; |
|
document.getElementById('GCI_bin1_q').style.display = "none"; |
|
document.getElementById('GCI_bin2_q').style.display = "none"; |
|
document.getElementById('GCI_bin3_q').style.display = "none"; |
|
document.getElementById('GCI_bin4_q').style.display = "none"; |
|
document.getElementById('GCI_bin5_q').style.display = "none"; |
|
document.getElementById('GCI_bin6_q').style.display = "none"; |
|
document.getElementById('GCI_bin7_q').style.display = "none"; |
|
document.getElementById('GCI_bin8_q').style.display = "none"; |
|
document.getElementById('GCI_bin9_q').style.display = "none"; |
|
document.getElementById('GCI_bin10_q').style.display = "none"; |
|
document.getElementById('GCI_optional_q').style.display = "none"; |
|
document.getElementById('GCI_development_q').style.display = "none"; |
|
} |
|
|
|
function countChecked(binname) { |
function countChecked(binname) { |
var count = 0; |
var count = 0; |
for (var i=0; i<document.selecteditems.elements.length; i++) { |
for (var i=0; i<document.selecteditems.elements.length; i++) { |
Line 732 function setDocsPhase() {
|
Line 717 function setDocsPhase() {
|
if (document.choices.concepttest[i].checked) { |
if (document.choices.concepttest[i].checked) { |
if (document.choices.concepttest[i].value == 'defchosen') { |
if (document.choices.concepttest[i].value == 'defchosen') { |
document.choices.phase.value = 'storemap'; |
document.choices.phase.value = 'storemap'; |
alert("Setting value for phase to "+document.choices.phase.value); |
|
|
|
} |
} |
} |
} |
} |
} |