mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Fixing import interface. Step2. MDL-8793
This commit is contained in:
parent
f81b4b1a1b
commit
7cf3b7fabd
2 changed files with 18 additions and 27 deletions
|
@ -43,6 +43,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
<input type="hidden" name="id" value="<?php p($id) ?>" />
|
||||||
<input type="hidden" name="l" value="<?php p($l) ?>" />
|
|
||||||
<input type="hidden" name="step" value="1" />
|
<input type="hidden" name="step" value="1" />
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -43,29 +43,22 @@
|
||||||
$strsearchconcept = get_string("searchconcept", "glossary");
|
$strsearchconcept = get_string("searchconcept", "glossary");
|
||||||
$strsearchindefinition = get_string("searchindefinition", "glossary");
|
$strsearchindefinition = get_string("searchindefinition", "glossary");
|
||||||
$strsearch = get_string("search");
|
$strsearch = get_string("search");
|
||||||
|
$strimportentries = get_string('importentries', 'glossary');
|
||||||
|
|
||||||
print_header_simple(format_string($glossary->name), "",
|
print_header_simple(format_string($glossary->name), "",
|
||||||
"<a href=\"index.php?id=$course->id\">$strglossaries</a> -> ".format_string($glossary->name),
|
"<a href=\"index.php?id=$course->id\">$strglossaries</a> -> " .
|
||||||
|
"<a href=\"view.php?id=$id\">" .format_string($glossary->name) . "</a> -> " .
|
||||||
|
$strimportentries,
|
||||||
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
"", "", true, update_module_button($cm->id, $course->id, $strglossary),
|
||||||
navmenu($course, $cm));
|
navmenu($course, $cm));
|
||||||
|
|
||||||
print_heading(format_string($glossary->name));
|
print_heading($strimportentries);
|
||||||
|
|
||||||
/// Info box
|
|
||||||
|
|
||||||
if ( $glossary->intro ) {
|
|
||||||
print_simple_box(format_text($glossary->intro), 'center', '70%', '', 5, 'generalbox', 'intro');
|
|
||||||
echo '<br />';
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Tabbed browsing sections
|
|
||||||
$tab = GLOSSARY_IMPORT_VIEW;
|
|
||||||
include("tabs.php");
|
|
||||||
|
|
||||||
if ( !$step ) {
|
if ( !$step ) {
|
||||||
|
print_box_start('glossarydisplay generalbox');
|
||||||
include("import.html");
|
include("import.html");
|
||||||
|
print_box_end();
|
||||||
|
|
||||||
glossary_print_tabbed_table_end();
|
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -77,9 +70,10 @@
|
||||||
$um = new upload_manager('file',false,false,$course,false,0);
|
$um = new upload_manager('file',false,false,$course,false,0);
|
||||||
|
|
||||||
if (!$um->preprocess_files()) {
|
if (!$um->preprocess_files()) {
|
||||||
echo '</center>';
|
print_box_start('glossarydisplay generalbox');
|
||||||
glossary_print_tabbed_table_end();
|
|
||||||
print_continue('import.php?id='.$id);
|
print_continue('import.php?id='.$id);
|
||||||
|
print_box_end();
|
||||||
|
|
||||||
print_footer();
|
print_footer();
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -193,8 +187,6 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
notify("Error while trying to create the new glossary.");
|
notify("Error while trying to create the new glossary.");
|
||||||
echo '</center>';
|
|
||||||
glossary_print_tabbed_table_end();
|
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
@ -323,12 +315,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// processed entries
|
// processed entries
|
||||||
echo '<table border="0" width="100%">';
|
print_box_start('glossarydisplay generalbox');
|
||||||
|
echo '<table class="glossaryimportexport">';
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td width="50%" align="right">';
|
echo '<td width="50%" align="right">';
|
||||||
echo get_string("totalentries","glossary");
|
echo get_string("totalentries","glossary");
|
||||||
echo ':</td>';
|
echo ':</td>';
|
||||||
echo '<td width="50%">';
|
echo '<td width="50%" align="left">';
|
||||||
echo $importedentries + $entriesrejected;
|
echo $importedentries + $entriesrejected;
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
|
@ -336,7 +329,7 @@
|
||||||
echo '<td width="50%" align="right">';
|
echo '<td width="50%" align="right">';
|
||||||
echo get_string("importedentries","glossary");
|
echo get_string("importedentries","glossary");
|
||||||
echo ':</td>';
|
echo ':</td>';
|
||||||
echo '<td width="50%">';
|
echo '<td width="50%" align="left">';
|
||||||
echo $importedentries;
|
echo $importedentries;
|
||||||
if ( $entriesrejected ) {
|
if ( $entriesrejected ) {
|
||||||
echo ' <small>(' . get_string("rejectedentries","glossary") . ": $entriesrejected)</small>";
|
echo ' <small>(' . get_string("rejectedentries","glossary") . ": $entriesrejected)</small>";
|
||||||
|
@ -353,21 +346,20 @@
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
echo '</table><hr width="75%">';
|
echo '</table><hr />';
|
||||||
|
|
||||||
// rejected entries
|
// rejected entries
|
||||||
if ($rejections) {
|
if ($rejections) {
|
||||||
echo '<div class="boxaligncenter"><table border="0" width="70%">';
|
echo '<table class="glossaryimportexport">';
|
||||||
echo '<tr><td align="center" colspan="2" width="100%"><strong>' . get_string("rejectionrpt","glossary") . '</strong></tr>';
|
echo '<tr><td align="center" colspan="2" width="100%"><strong>' . get_string("rejectionrpt","glossary") . '</strong></tr>';
|
||||||
echo $rejections;
|
echo $rejections;
|
||||||
echo '</div></center><p><hr width="75%">';
|
echo '</table><hr />';
|
||||||
}
|
}
|
||||||
|
print_box_end();
|
||||||
} else {
|
} else {
|
||||||
notify("Error while trying to read the file.");
|
notify("Error while trying to read the file.");
|
||||||
}
|
}
|
||||||
|
|
||||||
glossary_print_tabbed_table_end();
|
|
||||||
|
|
||||||
/// Finish the page
|
/// Finish the page
|
||||||
print_footer($course);
|
print_footer($course);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue