forked from openwebwork/webwork2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update check_modules and add new UI for archive
This adds Archive::Extract to check_modules.pl and libarchive-extract-perl to docker files. In addition, the UI now has a secondary page for creating an archive. ran perltidy
- Loading branch information
Showing
7 changed files
with
112 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ =head1 DESCRIPTION | |
); | ||
|
||
my @modulesList = qw( | ||
Archive::Extract | ||
Archive::Zip | ||
Array::Utils | ||
Benchmark | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
templates/ContentGenerator/Instructor/FileManager/archive.html.ep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
% # template for the archive subpage. | ||
<div class="card w-75 mx-auto"> | ||
<div class="card-body"> | ||
<div class="mb-3"> | ||
<b><%= maketext('The following files have been selected for archiving. Select the type ' | ||
. 'of archive and any subset of the requested files.') =%> </b> | ||
</div> | ||
<div class="row"> | ||
<div class="col-4"> | ||
<div class="input-group input-group-sm mb-2"> | ||
<span class="input-group-text"><%= maketext('Archive Filename') %>:</span> | ||
<%= text_field archive_filename => '', | ||
'aria-labelledby' => 'archive_filename', placeholder => maketext('Archive Filename'), | ||
class => 'form-control', size => 30 =%> | ||
<span class="input-group-text" id="filename_suffix">.zip</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="input-group input-group-sm mb-2"> | ||
<span class="input-group-text"><%= maketext('Archive Type') %>:</span> | ||
<div class="input-group-text flex-grow-1"> | ||
<label class="form-check-label me-4"> | ||
<%= radio_button archive_type => 'zip', checked => undef, class => 'form-check-input mx-1' =%> | ||
<%= maketext('Zip File') =%> | ||
</label> | ||
<label class="form-check-label me-4"> | ||
<%= radio_button archive_type => 'tgz', class => 'form-check-input mx-1' =%> | ||
<%= maketext('Compressed Tar') =%> | ||
</label> | ||
<button type="button" class="btn btn-sm btn-secondary" id="select-all-files-button"> | ||
<%= maketext('Select All Files') =%> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
% my @files_to_compress; | ||
% chdir($dir); | ||
% for my $f (@$files) { | ||
% push(@files_to_compress, glob("$f/**")) if -d $f; | ||
% push(@files_to_compress, $f) if -f $f; | ||
% } | ||
% # remove any directories | ||
% @files_to_compress = grep { -f $_ } @files_to_compress; | ||
|
||
<%= select_field files => \@files_to_compress, | ||
id => 'archive-files', | ||
class => 'form-select', | ||
size => 20, | ||
multiple => undef | ||
=%> | ||
|
||
<p><%= maketext('Create the archive of the select files?') %></p> | ||
<div class="d-flex justify-content-evenly"> | ||
<%= submit_button maketext('Cancel'), name => 'action', class => 'btn btn-sm btn-secondary' =%> | ||
<%= submit_button maketext('Make Archive'), name => 'action', class => 'btn btn-sm btn-primary' =%> | ||
</div> | ||
</div> | ||
</div> | ||
<%= $c->HiddenFlags =%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters