Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Using Issues for Quality Control
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Issues plugins=== The default EPrints Issues plugins can be found in ''perl_lib/EPrints/Plugin/Issues/''. Local repository plugins should be stored in ''archives/ARCHIVEID/cfg/plugins/EPrints/Plugin/Issues/''. Each plugin receives a list of EPrints to test. Plugins can implement some or all of the following methods: * '''process_item_in_list''' - record issues/details for whole list * '''item_issues''' - return a list of issues for the given item * '''process_at_end''' - add any additional issues after the list has been processed If a plugin implements '''process_item_in_list'' this will be called for each item in the list, otherwise, '''item_issues''' will be called for each item in the list. '''process_at_end''' will be called after the whole list has been processed. '''Example 1''' Use '''process_item_in_list''' to keep a record of all the titles encountered; check for duplicate titles in '''process_at_end''' and create issue for each matching item (code excerpts from the EPrints 3.1.3 default ExactTitleDups.pm plugin): sub process_item_in_list { ... my $title = $item->get_value( "title" ); push @{$info->{titlemap}->{$title}}, $item->get_id; } sub process_at_end { ... foreach my $code ( keys %{$info->{titlemap}} ) { my @set = @{$info->{titlemap}->{$code}}; next unless scalar @set > 1; foreach my $id ( @set ) { ... push @{$info->{issues}->{$id2}}, { type => "duplicate_title", id => "duplicate_title_$id", description => $desc, }; ... } } } '''Example 2''' Implement the item_issues method to check for PDF documents where the depositor has accidentally uploaded more than 1 file. sub item_issues { my( $plugin, $dataobj ) = @_; my @issues; foreach my $doc ( $dataobj->get_all_documents ) { my $format = $doc->get_value( "format" ); my %files = $doc->files; if( $format eq "application/pdf" && scalar keys %files > 1 ) { push @issues, { id => "extra_files_" . $dataobj->get_id, type => "extra_files", description => "Extra files uploaded to PDF document", }; } } return @issues; } [[Image:Issues_extra.png]]
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)