Merge pull request #250 from emarguin/audio_in_lp_langvar

add message in multiple lp audio upload form when no items in lp - refs #6948
1.9.x
Yannick Warnier 11 years ago
commit 7832202531
  1. 7
      main/newscorm/learnpath.class.php

@ -5086,6 +5086,12 @@ class learnpath
$return .= '<form action="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;updateaudio=' . Security :: remove_XSS($_GET['updateaudio']) .'&amp;action=' . Security :: remove_XSS($_GET['action']) . '&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" method="post" enctype="multipart/form-data" name="updatemp3" id="updatemp3">'; $return .= '<form action="' . api_get_self() . '?cidReq=' . Security :: remove_XSS($_GET['cidReq']) . '&amp;updateaudio=' . Security :: remove_XSS($_GET['updateaudio']) .'&amp;action=' . Security :: remove_XSS($_GET['action']) . '&amp;lp_id=' . $_SESSION['oLP']->lp_id . '" method="post" enctype="multipart/form-data" name="updatemp3" id="updatemp3">';
} }
$return .= '<div id="message"></div>'; $return .= '<div id="message"></div>';
if(count($this->items) == 0)
{
$return .= Display::display_normal_message(get_lang('YouShouldAddItemsBeforeAttachAudio'));
}
else
{
$return_audio = '<table class="data_table">'; $return_audio = '<table class="data_table">';
$return_audio .= '<tr>'; $return_audio .= '<tr>';
@ -5107,6 +5113,7 @@ class learnpath
if ($update_audio == 'true') { if ($update_audio == 'true') {
$return .= '<div style="margin:40px 0; float:right;"><button class="save" type="submit" name="save_audio" id="save_audio">' . get_lang('SaveAudioAndOrganization') . '</button></div>'; // TODO: What kind of language variable is this? $return .= '<div style="margin:40px 0; float:right;"><button class="save" type="submit" name="save_audio" id="save_audio">' . get_lang('SaveAudioAndOrganization') . '</button></div>'; // TODO: What kind of language variable is this?
} }
}
// We need to close the form when we are updating the mp3 files. // We need to close the form when we are updating the mp3 files.
if ($update_audio == 'true' && count($arrLP) != 0) { if ($update_audio == 'true' && count($arrLP) != 0) {

Loading…
Cancel
Save