version 1.12, 2010/09/14 06:23:15
|
version 1.16, 2010/11/29 04:33:35
|
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','015','016','017','018','019','020','021','022'); |
@development = ('001','002','003','004','005','006','007','008','009','010','011','012','013','014','015','016','017','018','019','020','021','022','023','024','025','026','027'); |
} |
} |
|
|
sub checkvalid { |
sub checkvalid { |
Line 219 sub listresources {
|
Line 219 sub listresources {
|
} else { |
} else { |
$r->print('<fieldset><legend>'.&mt('Modify Test').'</legend>'. |
$r->print('<fieldset><legend>'.&mt('Modify Test').'</legend>'. |
&mt('Currently no student submissions have been recorded, so you may modify the contents of the Concept Test.'). |
&mt('Currently no student submissions have been recorded, so you may modify the contents of the Concept Test.'). |
'<br /><form name="changetest" method="post" action="/adm/coursedocs">'. |
'<br /><br /><form name="changetest" method="post" action="/adm/coursedocs">'. |
'<input type="hidden" name="concepttest" value="editmyown" />'. |
'<input type="hidden" name="concepttest" value="editmyown" />'. |
'<input type="submit" name="modifytest" value="'.&mt('Edit Concept Test').'" /></form></fieldset></p>'); |
'<input type="submit" name="modifytest" value="'.&mt('Edit Concept Test').'" /></form></fieldset></p>'); |
} |
} |
my ($crsparms,$ineffect,$parmlev) = ¤t_parms($cdom,$cnum); |
my ($crsparms,$ineffect,$parmlev) = ¤t_parms($cdom,$cnum); |
my $formname = 'datesform'; |
my $formname = 'datesform'; |
my $datebutton = &mt('Save'); |
my $datebutton = &mt('Save'); |
|
my $hide_timezone = 1; |
my $startform = |
my $startform = |
&Apache::lonhtmlcommon::date_setter($formname,'opendate', |
&Apache::lonhtmlcommon::date_setter($formname,'opendate', |
$crsparms->{'opendate'}); |
$crsparms->{'opendate'},'','','', |
|
'','','','','',$hide_timezone); |
my $endform = |
my $endform = |
&Apache::lonhtmlcommon::date_setter($formname,'duedate', |
&Apache::lonhtmlcommon::date_setter($formname,'duedate', |
$crsparms->{'duedate'}); |
$crsparms->{'duedate'},'','','', |
|
'','','','','',$hide_timezone); |
|
my $includeempty = 1; |
|
my $timezone = &Apache::lonlocal::gettimezone(); |
|
my $tzform = &Apache::loncommon::select_timezone('timezone',$timezone, |
|
undef,$includeempty); |
$r->print('<p><fieldset><legend>'.&mt('Test Availability').'</legend>'. |
$r->print('<p><fieldset><legend>'.&mt('Test Availability').'</legend>'. |
&mt('Open and close dates for test items for the concept test are currently set as follows:'). |
&mt('Open and close dates for test items for the concept test are currently set as follows:'). |
'<br />'. |
'<br /><br />'. |
'<form name="'.$formname.'" method="post" '. |
'<form name="'.$formname.'" method="post" '. |
'action="/adm/coursedocs">'. |
'action="/adm/coursedocs">'. |
&Apache::lonhtmlcommon::start_pick_box(). |
&Apache::lonhtmlcommon::start_pick_box(). |
|
&Apache::lonhtmlcommon::row_title(&mt('Time zone')). |
|
$tzform. |
|
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_title(&mt('Open date')). |
&Apache::lonhtmlcommon::row_title(&mt('Open date')). |
$startform. |
$startform. |
&Apache::lonhtmlcommon::row_closure(1). |
&Apache::lonhtmlcommon::row_closure(1). |
Line 282 sub editor {
|
Line 292 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 327 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 546 sub current_parms {
|
Line 557 sub current_parms {
|
sub store_dates_parms { |
sub store_dates_parms { |
my ($cdom,$cnum) = @_; |
my ($cdom,$cnum) = @_; |
my $topsymb = '___0___uploaded/'.$cdom.'/'.$cnum.'/default.sequence'; |
my $topsymb = '___0___uploaded/'.$cdom.'/'.$cnum.'/default.sequence'; |
|
my $tz_change; |
|
my $timezone = &Apache::lonlocal::gettimezone(); |
|
if ($env{'form.timezone'} ne '') { |
|
if (&Apache::lonlocal::gettimezone($env{'form.timezone'}) ne 'local') { |
|
if ($timezone ne $env{'form.timezone'}) { |
|
$tz_change = 1; |
|
$timezone = $env{'form.timezone'}; |
|
} |
|
} |
|
} |
my ($opendate,$duedate) = |
my ($opendate,$duedate) = |
&Apache::lonuserutils::get_dates_from_form('opendate','duedate'); |
&Apache::lonuserutils::get_dates_from_form('opendate','duedate',$timezone); |
my %dates = ( |
my %dates = ( |
opendate => { |
opendate => { |
value => $opendate, |
value => $opendate, |
Line 565 sub store_dates_parms {
|
Line 586 sub store_dates_parms {
|
'0_'.$date,14,$dates{$date}{'value'}, |
'0_'.$date,14,$dates{$date}{'value'}, |
$dates{$date}{'type'},undef,$cdom); |
$dates{$date}{'type'},undef,$cdom); |
} |
} |
|
if ($tz_change) { |
|
&Apache::lonnet::appenv({'course.'.$env{'request.course.id'}.'.timezone' => $timezone}); |
|
} |
my $output = &mt('Open and Close dates set for test items').'<ul>'. |
my $output = &mt('Open and Close dates set for test items').'<ul>'. |
'<li>'.&mt('Concept Test Questions open:').' '. |
'<li>'.&mt('Concept Test Questions open:').' '. |
&Apache::lonlocal::locallocaltime($opendate).'</li>'. |
&Apache::lonlocal::locallocaltime($opendate,$timezone).'</li>'. |
'<li>'.&mt('Concept Test Questions close:').' '. |
'<li>'.&mt('Concept Test Questions close:').' '. |
&Apache::lonlocal::locallocaltime($duedate).'</li>'. |
&Apache::lonlocal::locallocaltime($duedate,$timezone).'</li>'. |
'</ul>'; |
'</ul>'; |
return $output; |
return $output; |
} |
} |
Line 675 function hideQuestions(content,title) {
|
Line 699 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++) { |