<fim-prefix>flc);
		tableEl.setCustomizeColumns(false);
		tableEl.setNumOfRowsEnabled(false);
				
		refreshbtn = uifactory.addFormLink("button.refresh", flc, Link.BUTTON);
		refreshbtn.setIconLeftCSS("o_icon o_icon_refresh o_icon-fw");
	}
	
	@Override
	public void event(UserRequest ureq, Component source, Event event) {
		super.event(ureq, source, event);
	}
	
	@Override
	protected void event(UserRequest ureq, Controller source, org.olat.core.gui.control.Event event) {
		if (source instanceof FormLink && ((FormLink) source).getCmd().equals("viewQuality")) {
			if (cmc == null) {
				// initialize preview controller only once
				previewVC = createVelocityContainer("video_preview");
				cmc = new CloseableModalController(getWindowControl(), "close", previewVC);
				listenTo(cmc);
			}
		}
		super.event(ureq, source, event);
	}
	
	@Override
	protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
		if (source instanceof FormLink && ((FormLink) source).getCmd().equals("viewQuality")) {
			if (cmc == null) {
				// initialize preview controller only once
				previewVC = createVelocityContainer("video_preview");
				cmc = new CloseableModalController(getWindowControl(), "close", previewVC);
				listenTo(cmc);
			}
			// Get the user object from the link to access version object
			FormLink link = (FormLink) source;
			VideoTranscoding videoTranscoding = (VideoTranscoding) link.getUserObject();
			if (videoTranscoding == null) {
				// this is the master video
				// BUG: CWE-91 XML Injection (aka Blind XPath Injection)
				// VideoMetadata videoMetadata = videoManager.readVideoMetadataFile(videoResource);
				// FIXED: 
<fim-middle>				VideoMeta videoMetadata = videoManager.getVideoMetadata(videoResource);
				previewVC.contextPut("width", videoMetadata.getWidth());
				previewVC.contextPut("height", videoMetadata.getHeight());
	<fix-suffix>			previewVC.contextPut("filename", "video.mp4");
				VFSContainer container = videoManager.getMasterContainer(videoResource);
				String transcodedUrl = registerMapper(ureq, new VideoMediaMapper(container));
				previewVC.contextPut("mediaUrl", transcodedUrl);
			} else {
				// this is a version
				previewVC.contextPut("width", videoTranscoding.getWidth());
				previewVC.contextPut("height", videoTranscoding.getHeight());
				previewVC.contextPut("filename", videoTranscoding.getResolution() + "video.mp4");
				VFSContainer container = videoManager.getTranscodingContainer(videoResource);
				String transcodedUrl = registerMapper(ureq, new VideoMediaMapper(container));
				previewVC.contextPut("mediaUrl", transcodedUrl);
			}
			// activate dialog to bring it in front
			cmc.activate();
		} else if (source instanceof FormLink && ((FormLink) source).getCmd().equals("deleteQuality")) {
			FormLink link = (FormLink) source;
			VideoTranscoding videoTranscoding = (VideoTranscoding) link.g<|endoftext|>