Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peter fogg/remove video xml #132

Merged
merged 38 commits into from
Jun 20, 2013
Merged

Peter fogg/remove video xml #132

merged 38 commits into from
Jun 20, 2013

Conversation

peter-fogg
Copy link
Contributor

Removes XML from the video component. Maintains backwards compatibility on export/import from XML-based courses.

Peter Fogg added 5 commits June 6, 2013 10:29
TODO: This breaks the 1.5x and .75x speeds. I'm still looking into
why.

TODO: VideoDescriptor inherits from RawDescriptor in order to
use the from_xml and export_to_xml methods. This seems really ugly,
though; I'd rather find a better way to do this.
position = Integer(help="Current position in the video", scope=Scope.user_state, default=0)
show_captions = Boolean(help="Whether or not captions are shown", display_name="Show Captions", scope=Scope.settings, default=True)
youtube_id_1_0 = String(help="Youtube ID for normal speed video", display_name="Normal Speed", scope=Scope.settings, default="OEoXaMPEzfM")
youtube_id_0_75 = String(help="Youtube ID for .75x speed video", display_name=".75x", scope=Scope.settings, default="JMD_ifUUfsU")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need better display names for these properties (and help text). I recommend crafting the display names in such a way that they alphabetically appear together.

Toddi is our documentation person, and she's out this week. I'd recommend having Marco help you in the interim, both with display names and help text.

@cahrens
Copy link

cahrens commented Jun 11, 2013

/home/christina/mitx_all/edx-platform/common/lib/xmodule/xmodule/templates/video/default.yaml needs to be updated. You will want to remove the XML data stub there (though I'm not sure you can entirely delete it, as described in https://edx-wiki.atlassian.net/browse/STUD-146. You may need to make it an empty String or something). Don would be a good person to talk to about this, as the work he's doing may allow us to actually remove the data from the template entirely.

You should also remove data_dir in that template, as it's no longer a metadata field.

To update templates, run django-admin.py update_templates --traceback --settings=cms.envs.dev --pythonpath=.

@videos[speed] = video[1]
@videos =
'0.75': @el.data('youtube-id-0-75')
'1.0': @el.data('normal-speed-video-id')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should the behavior be if not all of these speeds are specified? When I tried it, I still got all the speed options in the LMS, but "An Error Occurred" when I select the unspecified ones. Is that the current behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could change this to only show a speed if @el.data('youtube-id-x') != ''; that is, if the speed is actually specified by the course author.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be oh so nice.

module_class = VideoModule
stores_state = True
template_dir_name = "video"

metadata_attributes = RawDescriptor.metadata_attributes + ('youtube_id_1_0',
'youtube_id_0_75',
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

if @el.data('youtube-id-1-25')
@videos['1.25'] = @el.data('youtube-id-1-25')
if @el.data('youtube-id-1-5')
@videos['1.50'] = @el.data('youtube-id-1-5')

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this PR hard codes that only up to 4 speeds can exist - which is the case in practice, but this change may make it harder to change that. Is this OK from a Product Management standpoint?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@markchang You are OK with just the 4 speeds, right? With videoalpha, the interpolation will happen automatically, correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cahrens in videoalpha you will need xblock fields for storing any number of speeds. It is possible to add fields to xblocks dynamically?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that with videoalpha the video speed would be interpolated for you (so you wouldn't need to specify multiple speeds). That is not correct?

You could use a xblock field of type List. However, that would not allow you to specify which speed corresponds to each entry.

There is an xblock field of type Dict. That would allow you to specify the key (speed) and the video.

We currently don't have metadata editors for either of these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cahrens @peter-fogg In HTML5 player youtube you need only one video link and one subtitles link.
In HTML5 player non-youtube you will need 3 fields for different sources of video for cross-browser compatibility.
All speeds for video and subtitles will be adjusted automatically in player itself.

My question was related to videoalpha supporting not-html5 youtube. In that case we use same speeds that video player does, it was misunderstanding. Don't mind about this.

@valera-rozuvan
Copy link
Contributor

@peter-fogg @cahrens @chrisndodge Are you aware of Video Alpha ( https://edx-wiki.atlassian.net/wiki/display/BLD/Video+Alpha )? Should this also be worked into Video Alpha, since it is the future player of the system...

@chrisndodge
Copy link
Contributor

@valera-rozuvan yea we discussed this yesterday in our standup, so we're aware that this is applicable to the Video Alpha. Peter's working on the old video player first.

@cahrens
Copy link

cahrens commented Jun 18, 2013

👍

Oh, but remember to follow up on that LMS/CMS videoalpha/normal video step naming problem.

@peter-fogg
Copy link
Contributor Author

Just merged in master to get the import os dev environment fix.

@vasylnakvasiuk
Copy link
Contributor

Please, use @rocha suggestion and cleanup commits history using $ git rebase master -i. Thanks.

@@ -1 +1 @@
<video youtube="1.0:1bK-WdDi6Qw" display_name="Video Resources"/>
<video youtube_id_1_0="&quot;1bK-WdDi6Qw&quot;" display_name="Video Resources"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not leave old xml format? Just when reading inside descriptor, you can parse it to proper xblocks fields.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Cause now you change interface and create possible problems in future (for new branches, tests, etc.)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Peter's code reads in the old format-- he has unit tests around this. Can you explain more you think it is necessary to keep the old format?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cahrens I see not reason to implement new format in xml if we just can change parsing logics in descriptor from_xml, as have been already done by @peter-fogg . Please explain me why we need new format of xml?

@valera-rozuvan
Copy link
Contributor

@peter-fogg Please rebase with current master.

@cahrens
Copy link

cahrens commented Jun 19, 2013

Just a note about interactive rebase-- we do not require an interactive rebase before merging a pull request. Some people do prefer it, but in the case where you have been doing merges with master along the way, interactive rebase is very difficult. I do not think we should require Peter to do it.

@auraz
Copy link
Contributor

auraz commented Jun 20, 2013

@cahrens When you mentioned interactive rebase, did you mean common rebase like "git rebase master"?
I'm sure you know, that the idea behind that, is after jenkins will verify tests, you can press "Merge pull request" button. Otherwise, you should run tests manually and do manual merge. This how i understand your message.

It this particular case, there are lot of tests in master that tests video module, and they are not included in current branch. They need to be included and passing before merge.

@auraz
Copy link
Contributor

auraz commented Jun 20, 2013

@peter-fogg why you merged master in but not rebasing on top of it? If you use rebase, you will have same changes you need, but you will not have commits in git history with "merged master to you branch" message, which will be hard to merge again in master. (this is just a suggestion)

@cahrens
Copy link

cahrens commented Jun 20, 2013

@auraz Alex, it is true that either a merge or rebase must be done so that the PR can be cleanly merged with master. What I meant was that it is not currently required to do a rebase where multiple commits are "squashed" together and the commit history cleaned up/altered. @vaxXxa had suggested that.

peter-fogg added a commit that referenced this pull request Jun 20, 2013
@peter-fogg peter-fogg merged commit 0ef4390 into master Jun 20, 2013
@peter-fogg peter-fogg deleted the peter-fogg/remove-video-xml branch June 20, 2013 19:40
chrisrossi pushed a commit to jazkarta/edx-platform that referenced this pull request Mar 31, 2014
I'll go ahead and merge this, since it fixes nearly all the issues we had with problem and html css, and this should go in before more changes.  The table borders can be fixed in another round.
aboudreault pushed a commit to aboudreault/edx-platform that referenced this pull request Jul 20, 2014
…-preferences-delete

mattdrayer/api-user-preferences-delete: Added new Detail view, GET/DELET...
jbau pushed a commit that referenced this pull request Oct 10, 2014
prabhanshu pushed a commit to prabhanshu/edx-platform that referenced this pull request Oct 13, 2018
identical to PR openedx#132 

* live oauth support (openedx#115)

* Updated message for Certificates

* Update test_views.py
(cherry picked from commit ab88963)
xavierchan added a commit to xavierchan/edx-platform-1 that referenced this pull request Dec 24, 2018
rediris pushed a commit to gymnasium/edx-platform that referenced this pull request Feb 25, 2021
…re/fix-activation-email-for-sites

Use site_configuration helper to get url base for activation email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants