Skip to content

Commit

Permalink
merge enhancements from develop40
Browse files Browse the repository at this point in the history
  • Loading branch information
rlucke committed Dec 12, 2018
1 parent b8c881b commit 76bc470
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 17 deletions.
7 changes: 7 additions & 0 deletions blocks/DownloadBlock/DownloadBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ public function exportProperties()

public function getFiles()
{
if ($this->file_id == '') {
return;
}

$document = new \StudipDocument($this->file_id);
$files[] = array (
'id' => $this->file_id,
Expand Down Expand Up @@ -221,6 +225,9 @@ private function setFileId($file_name)

public function importContents($contents, array $files)
{
if ($file->name == '') {
return;
}
$file = reset($files);
if ($file->id == $this->file_id) {
$this->save();
Expand Down
2 changes: 1 addition & 1 deletion blocks/EmbedBlock/js/author_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default AuthorView.extend({
this.$('.cw-embedblock-url-info-wrong-plattform').hide();
}
},

toggleTime() {
var use_start_time = this.$('.cw-embedblock-time-start-check').prop( "checked" );
if (use_start_time){
Expand Down
5 changes: 3 additions & 2 deletions blocks/OpenCastBlock/js/author_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default AuthorView.extend({
if ($opencastid != '') {
$view.$('.cw-opencast-content option[data-opencastid="'+$opencastid+'"]').prop('selected', true);
}

return this;
},

Expand All @@ -36,7 +37,7 @@ export default AuthorView.extend({
return;
}
event.isUserInputHandled = true;
Backbone.trigger('preventnavigateto', !confirm('Es gibt nicht gespeicherte Änderungen. Möchten Sie die Seite trotzdem verlassen?'));
Backbone.trigger('preventnavigateto', !confirm('Es gibt nicht gespeicherte Änderungen. Möchten Sie die Seite trotzdem verlassen?'));
},

onModeSwitch(toView, event) {
Expand All @@ -52,7 +53,7 @@ export default AuthorView.extend({
return;
}
event.isUserInputHandled = true;
Backbone.trigger('preventviewswitch', !confirm('Es gibt nicht gespeicherte Änderungen. Möchten Sie trotzdem fortfahren?'));
Backbone.trigger('preventviewswitch', !confirm('Es gibt nicht gespeicherte Änderungen. Möchten Sie trotzdem fortfahren?'));
},

onSave(event) {
Expand Down
3 changes: 3 additions & 0 deletions blocks/PdfBlock/PdfBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ public function exportProperties()

public function getFiles()
{
if (empty($this->pdf_file_id)) {
return array();
}
$document = new \StudipDocument($this->pdf_file_id);
$files[] = array(
'id' => $this->pdf_file_id,
Expand Down
4 changes: 2 additions & 2 deletions blocks/PostBlock/css/post_block.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import '../../../assets/less/mixins';

.PostBlock {
section#courseware .PostBlock {
.block-content:not([data-view="student"]){
label {
width: 26em;
Expand All @@ -26,7 +26,7 @@

.cw-postblock-messagebox {
margin: 1em 0;

.cw-postblock-textbox {
resize: none;
height: 3em;
Expand Down
3 changes: 3 additions & 0 deletions blocks/VideoBlock/VideoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ public function importContents($contents, array $files)
{
$webvideo = json_decode($this->webvideo);
foreach($files as $file){
if ($file->name == '') {
continue;
}
foreach ($webvideo as &$source) {
if(($source->file_name == $file->name) && ($source->file_id != '')) {
$source->file_id = $file->id;
Expand Down
2 changes: 1 addition & 1 deletion blocks/VideoBlock/js/author_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default AuthorView.extend({
this.$('.videosource-webvideo').show();
this.$('video').show();
this.$('iframe').hide();
if (webvideodata == '') {
if ((webvideodata == '') || (webvideodata == 'null')|| (webvideodata == null)){
break;
}
this.setVideoData();
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "courseware",
"version": "3.2.2",
"version": "3.3.0",
"description": "Interaktive multimediale Lernmodule erstellen und bereitstellen",
"repository": "git@github.com:virtUOS/courseware.git",
"author": "Zentrum virtUOS / ELAN e.V.",
"license": "GPL-2.0",
"devDependencies": {
"autoprefixer": "9.1.5",
"autoprefixer": "9.4.2",
"autosize": "4.0.2",
"babel-core": "6.26.3",
"babel-loader": "7.1.5",
Expand All @@ -15,21 +15,21 @@
"babel-preset-env": "1.7.0",
"backbone": "1.3.3",
"before-after.js": "1.0.1",
"chart.js": "2.7.2",
"css-loader": "1.0.0",
"chart.js": "2.7.3",
"css-loader": "2.0.0",
"dateformat": "3.0.3",
"extract-text-webpack-plugin": "3.0.2",
"highlight.js": "9.12.0",
"highlight.js": "9.13.1",
"jquery.scrollto": "2.1.2",
"less": "3.8.1",
"less": "3.9.0",
"less-loader": "4.1.0",
"mustache": "2.3.2",
"mustache": "3.0.1",
"postcss-loader": "3.0.0",
"query-string": "5.1.1",
"slick-carousel": "1.8.1",
"style-loader": "0.23.0",
"style-loader": "0.23.1",
"webpack": "3.12.0",
"webpack-dev-server": "2.11.3"
"webpack-dev-server": "3.1.10"
},
"browserslist": [
"last 2 versions",
Expand All @@ -42,5 +42,6 @@
"locales": "php buildLocales.php",
"prezip": "npm run build:prod && npm run locales",
"zip": "zip -r courseware-v$npm_package_version.zip assets blocks controllers cronjobs export import locale migrations models vendor views LICENSE Courseware.php CoursewareObserver.php plugin.manifest README.md"
}
},
"dependencies": {}
}
2 changes: 1 addition & 1 deletion plugin.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pluginname=Courseware
pluginclassname=Courseware
pluginclassname=CoursewareObserver
origin=virtUOS
version=3.2.2
version=3.3.0
category=Inhalte und Aufgabenstellungen
icon=../../../assets/images/icons/black/group3.svg
homepage=https://github.com/virtuos/courseware
Expand Down

0 comments on commit 76bc470

Please sign in to comment.