mirror of
https://github.com/moodle/moodle.git
synced 2025-04-30 05:18:55 +02:00
community block MDL-24830 better "wait for upload" message + fix a javascript issue when screenshot number = 0 (metadata page)
This commit is contained in:
parent
ba14d721f2
commit
4a73f9be8c
@ -154,12 +154,13 @@ class course_publication_form extends moodleform {
|
||||
$defaultcreatornotesformat = $publishedcourse['creatornotesformat'];
|
||||
$screenshotsnumber = $publishedcourse['screenshots'];
|
||||
$privacy = $publishedcourse['privacy'];
|
||||
|
||||
$page->requires->yui_module('moodle-block_community-imagegallery',
|
||||
'M.blocks_community.init_imagegallery',
|
||||
array(array('imageids' => array($hubcourseid),
|
||||
'imagenumbers' => array($screenshotsnumber),
|
||||
'huburl' => $huburl)));
|
||||
if (($screenshotsnumber > 0) and !empty($privacy)) {
|
||||
$page->requires->yui_module('moodle-block_community-imagegallery',
|
||||
'M.blocks_community.init_imagegallery',
|
||||
array(array('imageids' => array($hubcourseid),
|
||||
'imagenumbers' => array($screenshotsnumber),
|
||||
'huburl' => $huburl)));
|
||||
}
|
||||
} else {
|
||||
$defaultfullname = $course->fullname;
|
||||
$defaultshortname = $course->shortname;
|
||||
|
@ -164,14 +164,10 @@ class core_publish_renderer extends plugin_renderer_base {
|
||||
* @return $html string
|
||||
*/
|
||||
public function sendingbackupinfo($backupfile) {
|
||||
$html = html_writer::tag('div', get_string('sending', 'hub'),
|
||||
array('class' => 'textinfo'));
|
||||
$sizeinfo = new stdClass();
|
||||
$sizeinfo->total = $backupfile->get_filesize() / 1000000;
|
||||
$sizeinfo->modem = (int) ($backupfile->get_filesize() / 5000);
|
||||
$sizeinfo->dsl = (int) $sizeinfo->total;
|
||||
$html .= html_writer::tag('div', get_string('sendingsize', 'hub', $sizeinfo),
|
||||
array('class' => 'textinfo'));
|
||||
$sizeinfo->total = number_format($backupfile->get_filesize() / 1000000, 2);
|
||||
$html = html_writer::tag('div', get_string('sendingsize', 'hub', $sizeinfo),
|
||||
array('class' => 'courseuploadtextinfo'));
|
||||
return $html;
|
||||
}
|
||||
|
||||
@ -184,7 +180,7 @@ class core_publish_renderer extends plugin_renderer_base {
|
||||
*/
|
||||
public function sentbackupinfo($id, $huburl, $hubname) {
|
||||
$html = html_writer::tag('div', get_string('sent', 'hub'),
|
||||
array('class' => 'textinfo'));
|
||||
array('class' => 'courseuploadtextinfo'));
|
||||
$publishindexurl = new moodle_url('/course/publish/index.php',
|
||||
array('sesskey' => sesskey(), 'id' => $id,
|
||||
'published' => true, 'huburl' => $huburl, 'hubname' => $hubname));
|
||||
|
@ -184,9 +184,8 @@ $string['selecthub'] = 'Select hub';
|
||||
$string['selecthubinfo'] = 'A community hub is a server that lists courses. You can only publish your courses on hubs that this Moodle site is registered with. If the hub you want is not listed below, please contact your site administrator.';
|
||||
$string['selecthubforadvertise'] = 'Select hub for advertising';
|
||||
$string['selecthubforsharing'] = 'Select hub for uploading';
|
||||
$string['sending'] = 'Do not refresh your browser ! The site is sending the course backup...';
|
||||
$string['sendingcourse'] = 'Sending course';
|
||||
$string['sendingsize'] = 'Sending the backup ({$a->total}Mb) should take approximately between {$a->dsl}s and {$a->modem}s, depending on the site/hub connection...';
|
||||
$string['sendingsize'] = 'Please wait the course file is uploading ({$a->total}Mb)...';
|
||||
$string['sendfollowinginfo'] = 'More information';
|
||||
$string['sendfollowinginfo_help'] = 'The following information will be sent to contribute to overall statistics only. It will not be made public on any site listing.';
|
||||
$string['sent'] = '...finished';
|
||||
|
@ -120,4 +120,6 @@
|
||||
}
|
||||
|
||||
/* Publication */
|
||||
#page-course-publish-metadata .metadatatext {width: 400px;}
|
||||
#page-course-publish-metadata .metadatatext {width: 400px;}
|
||||
#page-course-publish-backup .courseuploadtextinfo {text-align: center;}
|
||||
#page-course-publish-backup .sharecoursecontinue {text-align: center;}
|
@ -104,4 +104,6 @@
|
||||
.course_category_tree .category .course:hover {background-color:#eee;}
|
||||
|
||||
/* Publication */
|
||||
#page-course-publish-metadata .metadatatext {width: 400px;}
|
||||
#page-course-publish-metadata .metadatatext {width: 400px;}
|
||||
#page-course-publish-backup .courseuploadtextinfo {text-align: center;}
|
||||
#page-course-publish-backup .sharecoursecontinue {text-align: center;}
|
Loading…
x
Reference in New Issue
Block a user