version 1.409, 2009/10/31 19:58:48
|
version 1.411.2.3, 2009/12/20 02:09:00
|
Line 41 use Apache::lonratedt();
|
Line 41 use Apache::lonratedt();
|
use Apache::lonxml; |
use Apache::lonxml; |
use Apache::lonclonecourse; |
use Apache::lonclonecourse; |
use Apache::lonnavmaps; |
use Apache::lonnavmaps; |
|
use Apache::londocsgci; |
use HTML::Entities; |
use HTML::Entities; |
use GDBM_File; |
use GDBM_File; |
use Apache::lonlocal; |
use Apache::lonlocal; |
Line 2478 ENDHEADERS
|
Line 2479 ENDHEADERS
|
('select_form_order' => |
('select_form_order' => |
['',1..$currentversion,'mostrecent'], |
['',1..$currentversion,'mostrecent'], |
'' => '', |
'' => '', |
'mostrecent' => 'most recent', |
'mostrecent' => &mt('most recent'), |
map {$_,$_} (1..$currentversion)))); |
map {$_,$_} (1..$currentversion)))); |
$r->print('</span></td></tr><tr><td></td>'); |
$r->print('</span></td></tr><tr><td></td>'); |
my $lastold=1; |
my $lastold=1; |
Line 2618 sub handler {
|
Line 2619 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
|
|
|
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
if ($coursedom eq 'gcitest') { |
|
my $coursenum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
|
if ($allowed) { |
|
&concept_test_builder($r,$coursedom,$coursenum); |
|
return OK; |
|
} |
|
} |
|
|
# --------------------------------------------- Initialize help topics for this |
# --------------------------------------------- Initialize help topics for this |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
Line 2972 FUFORM
|
Line 2982 FUFORM
|
<input type="hidden" name="active" value="bb" /> |
<input type="hidden" name="active" value="bb" /> |
SEDFFORM |
SEDFFORM |
my @simpleeditdefaultforma = ( |
my @simpleeditdefaultforma = ( |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/src.png" alt="pic03" />' => "$uploadtag<a onclick='javascript:groupsearch()'>$lt{'srch'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/src.png" alt="'.&mt('Search').'" />' => "$uploadtag<a onclick='javascript:groupsearch()'>$lt{'srch'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/res.png" alt="pic04" />' => "<a onclick='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" }, |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/res.png" alt="'.&mt('Import').'" />' => "<a onclick='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" }, |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/vbkm.png" alt="pic05" />' => "<a onclick='javascript:groupopen(0,1,1);'>$lt{'book'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/vbkm.png" alt="'.&mt('Import Bookmarks').'" />' => "<a onclick='javascript:groupopen(0,1,1);'>$lt{'book'}</a>" }, |
); |
); |
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma)); |
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma)); |
$simpleeditdefaultform .=(<<SEDFFORM); |
$simpleeditdefaultform .=(<<SEDFFORM); |
Line 3264 NSYLFORM
|
Line 3274 NSYLFORM
|
</form> |
</form> |
NGFFORM |
NGFFORM |
@specialdocumentsforma=( |
@specialdocumentsforma=( |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/page.png" alt="pic06" />'=>$newpageform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/page.png" alt="'.&mt('New Composite Page').'" />'=>$newpageform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="pic07" />'=>$newsylform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="'.&mt('Syllabus').'" />'=>$newsylform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/groupportfolio.png" alt="pic08" />'=>$newgroupfileform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/groupportfolio.png" alt="'.&mt('Group Portfolio').'" />'=>$newgroupfileform}, |
); |
); |
|
|
} |
} |
push @specialdocumentsforma, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/navigation.png" alt="pic09" />'=>$newnavform}, |
push @specialdocumentsforma, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/navigation.png" alt="'.&mt('Navigate Contents').'" />'=>$newnavform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simple.png" alt="pic10" />'=>$newsmppageform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simple.png" alt="'.&mt('Simple Course Page').'" />'=>$newsmppageform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="pic11" />'=>$newsmpproblemform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="'.&mt('Simple Problem').'" />'=>$newsmpproblemform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dropbox.png" alt="pic12" />'=>$newdropboxform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dropbox.png" alt="'.&mt('Drop Box').'" />'=>$newdropboxform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="pic13" />'=>$newexuploadform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="'.&mt('Score Upload Form').'" />'=>$newexuploadform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/bchat.png" alt="pic14" />'=>$newbulform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/bchat.png" alt="'.&mt('Discussion Board').'" />'=>$newbulform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="pic15" />'=>$newaboutmeform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="'.&mt('My Personal Information Page').'" />'=>$newaboutmeform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/aboutme.png" alt="pic16" />'=>$newaboutsomeoneform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/aboutme.png" alt="'.&mt('Personal Information Page for a User').'" />'=>$newaboutsomeoneform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/chrt.png" alt="pic17" />'=>$newrosterform},); |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/chrt.png" alt="'.&mt('Course Roster').'" />'=>$newrosterform},); |
|
|
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma)); |
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma)); |
|
|
if($env{'form.pagepath'}) { |
if($env{'form.pagepath'}) { |
|
|
@specialdocumentsforma=( |
@specialdocumentsforma=( |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="pic32" />'=>$newsmpproblemform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="'.&mt('Simple Problem').'" />'=>$newsmpproblemform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="pic33" />'=>$newexuploadform} |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="'.&mt('Score Upload Form').'" />'=>$newexuploadform} |
); |
); |
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma)); |
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma)); |
} |
} |
|
|
my @tools = ( |
my @tools = ( |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="pic18" />'=>$extresourcesform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="'.&mt('External Resource').'" />'=>$extresourcesform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/ims.png" alt="pic19" />'=>$imspform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/ims.png" alt="'.&mt('IMS Import').'" />'=>$imspform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/recover.png" alt="pic20" />'=>$recoverform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/recover.png" alt="'.&mt('Recover Deleted Resources').'" />'=>$recoverform}, |
); |
); |
|
|
my %orderhash = ( |
my %orderhash = ( |
Line 3409 SNAMFORM
|
Line 3419 SNAMFORM
|
|
|
|
|
my @specialdocs = ( |
my @specialdocs = ( |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="pic29" />'=>$supnewextform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="'.&mt('External Resource').'" />'=>$supnewextform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="pic30" />'=>$supnewsylform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="'.&mt('Syllabus').'" />'=>$supnewsylform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="pic31" />'=>$supnewaboutmeform}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="'.&mt('My Personal Information Page').'" />'=>$supnewaboutmeform}, |
); |
); |
my %suporderhash = ( |
my %suporderhash = ( |
'00' => ['Supnewfolder', $supnewfolderform], |
'00' => ['Supnewfolder', $supnewfolderform], |
Line 3473 sub generate_admin_options {
|
Line 3483 sub generate_admin_options {
|
my $dumpbut=&dumpbutton(); |
my $dumpbut=&dumpbutton(); |
my $exportbut=&exportbutton(); |
my $exportbut=&exportbutton(); |
my @list = ( |
my @list = ( |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/verify.png" alt="pic21" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"verify\", \"$lt{'vc'}\")'>$lt{'vc'}</a>$help{'Verify_Content'}"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/verify.png" alt="'.&mt('Verify Content').'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"verify\", \"$lt{'vc'}\")'>$lt{'vc'}</a>$help{'Verify_Content'}"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/resversion.png" alt="pic22" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"versions\", \"$lt{'cv'}\")'>$lt{'cv'}</a>$help{'Check_Resource_Versions'}"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/resversion.png" alt="'.&mt('Check/Set Resource Versions').'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"versions\", \"$lt{'cv'}\")'>$lt{'cv'}</a>$help{'Check_Resource_Versions'}"}, |
); |
); |
if($dumpbut ne ''){ |
if($dumpbut ne ''){ |
push @list, {'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dump.png" alt="pic23" />'=>$dumpbut}; |
push @list, {'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dump.png" alt="'.&mt('Dump Course DOCS to Construction Space: available on other servers').'" />'=>$dumpbut}; |
} |
} |
push @list, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/imsexport.png" alt="pic24" />'=>$exportbut}, |
push @list, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/imsexport.png" alt="'.&mt('IMS Export').'" />'=>$exportbut}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/symbs.png" alt="pic25" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"listsymbs\", \"$lt{'ls'}\")'>$lt{'ls'}</a><input type='hidden' name='folder' value='$env{'form.folder'}' />"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/symbs.png" alt="'.&mt('List Symbs').'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"listsymbs\", \"$lt{'ls'}\")'>$lt{'ls'}</a><input type='hidden' name='folder' value='$env{'form.folder'}' />"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/log.png" alt="pic26" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"docslog\", \"$lt{'sl'}\")'>$lt{'sl'}</a>"}, |
{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/log.png" alt="'.&mt('Show Log').'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"docslog\", \"$lt{'sl'}\")'>$lt{'sl'}</a>"}, |
); |
); |
return '<form action="/adm/coursedocs" method="post" name="courseverify"><input type="hidden" id="dummy" />'.create_form_ul(create_list_elements(@list)).'</form>'; |
return '<form action="/adm/coursedocs" method="post" name="courseverify"><input type="hidden" id="dummy" />'.create_form_ul(create_list_elements(@list)).'</form>'; |
|
|
Line 3532 sub generate_edit_table {
|
Line 3542 sub generate_edit_table {
|
return $form; |
return $form; |
} |
} |
|
|
|
sub concept_test_builder { |
|
my ($r,$cdom,$cnum) = @_; |
|
my $js = ' |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
'. |
|
&Apache::londocsgci::builder_javascript(). |
|
' |
|
// ]]> |
|
</script> |
|
'; |
|
my $starthash = { |
|
add_entries => {'onload' => "javascript:setInitialVisibility();"}, |
|
}; |
|
|
|
$r->print(&Apache::loncommon::start_page('Assemble Test',$js,$starthash)); |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs', |
|
text=>"Assemble Test"}); |
|
&Apache::londocsgci::setdefaults(); |
|
if ($env{'form.phase'} eq 'storemap') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs?phase=storemap', |
|
text=>"Validate Test"}); |
|
&Apache::londocsgci::evaluate(); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
$r->print(&Apache::londocsgci::store('edit',$cdom,$cnum)); |
|
} elsif ($env{'form.phase'} eq 'storeparms') { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
|
({href=>'/adm/coursedocs?phase=storeparms', |
|
text=>"Set Availability"}); |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
$r->print(&Apache::londocsgci::store_dates_parms($cdom,$cnum)); |
|
$r->print(&Apache::loncommon::end_page()); |
|
return; |
|
} else { |
|
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
|
('Build Concept Test','Concept_Test_Assembly')); |
|
} |
|
&Apache::londocsgci::load(); |
|
&Apache::londocsgci::listresources($r,'edit',$cdom,$cnum); |
|
$r->print(&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
|
sub editing_js { |
sub editing_js { |
my ($udom,$uname) = @_; |
my ($udom,$uname) = @_; |
my $now = time(); |
my $now = time(); |