func (VS *Server) showStepVideoCourse(c *gin.Context) {
	service, b := VS.getOurService(c, "h_videos", "showStepVideoCourse", "service, _ := VS.getOurService")
	if !b {
		return
	}
	prodID, b := VS.getIDParamFromURL(c, "id")
	if !b {
		return
	}
	product, _ := VS.getVideoCourseByID(c, prodID, "h_videos", "showStepVideoCourse", "product := v.getProductByID", true)
	steps := VS.getAllStepsFromSpecificVideoCourse(c, prodID, "h_videos", "showStepVideoCourse", "steps := v.getAllStepsFromSpecificProduct")
	if len(steps) == 0 {
		c.Redirect(http.StatusFound, "/videos/new-step/"+prodID.Hex()+"/"+service.TypeID.Hex())
		return
	}

	// Get the /number param of the URL
	nURL, b := VS.getParamFromURL(c, "step-number")
	if !b {
		return
	}
	numbernoURL, err := strconv.Atoi(nURL)
	VS.checkOperation(c, "h_videos", "showStepVideoCourse", "product := v.getProductByID", err)

	step := steps[numbernoURL]
	// Check for a translation in another language
	trans, b := VS.mayLookForTranslation(c, step.ID)
	if b {
		step = trans.(Step)
	}

	var pagination []Pagination
	var p Pagination
	for i := 0; i < len(steps); i++ {
		p.Active = false
		p.Fakenumb = i + 1
		pagination = append(pagination, p)
	}
	pagination[numbernoURL].Active = true
	toolsHTML, materialsHTML := VS.getToolsAndMaterialsHTMLFromStep(c, step)
	render(c, gin.H{
		"product":     product,
		"step":        step,
		"id":          prodID,
		"pagination":  pagination,
		"tools":       toolsHTML,
		"materials":   materialsHTML,
		"serviceType": service.TypeID,
	}, "step-video-course.html")
}
// Shows the screen with the Step of the specific Video course from the database
Shows the screen with the Step of the specific Video course from the database
// Shows the screen with the Step of the specific Video course from the database
func (VS *Server) showStepVideoCourse(c *gin.Context) {
	service, b := VS.getOurService(c, "h_videos", "showStepVideoCourse", "service, _ := VS.getOurService")
	if !b {
		return
	}
	prodID, b := VS.getIDParamFromURL(c, "id")
	if !b {
		return
	}
	product, _ := VS.getVideoCourseByID(c, prodID, "h_videos", "showStepVideoCourse", "product := v.getProductByID", true)
	steps := VS.getAllStepsFromSpecificVideoCourse(c, prodID, "h_videos", "showStepVideoCourse", "steps := v.getAllStepsFromSpecificProduct")
	if len(steps) == 0 {
		c.Redirect(http.StatusFound, "/videos/new-step/"+prodID.Hex()+"/"+service.TypeID.Hex())
		return
	}
	nURL, b := VS.getParamFromURL(c, "step-number")
	if !b {
		return
	}
	numbernoURL, err := strconv.Atoi(nURL)
	VS.checkOperation(c, "h_videos", "showStepVideoCourse", "product := v.getProductByID", err)
	step := steps[numbernoURL]
	trans, b := VS.mayLookForTranslation(c, step.ID)
	if b {
		step = trans.(Step)
	}
	var pagination []Pagination
	var p Pagination
	for i := 0; i < len(steps); i++ {
		p.Active = false
		p.Fakenumb = i + 1
		pagination = append(pagination, p)
	}
	pagination[numbernoURL].Active = true
	toolsHTML, materialsHTML := VS.getToolsAndMaterialsHTMLFromStep(c, step)
	render(c, gin.H{
		"product":     product,
		"step":        step,
		"id":          prodID,
		"pagination":  pagination,
		"tools":       toolsHTML,
		"materials":   materialsHTML,
		"serviceType": service.TypeID,
	}, "step-video-course.html")
}
func ( VS * Server ) showStepVideoCourse ( c * gin . Context ) { service , b := VS . getOurService ( c , " " , " " , " " ) if ! b { return } prodID , b := VS . getIDParamFromURL ( c , " " ) if ! b { return } product , _ := VS . getVideoCourseByID ( c , prodID , " " , " " , " " , true ) steps := VS . getAllStepsFromSpecificVideoCourse ( c , prodID , " " , " " , " " ) if len ( steps ) == 0 { c . Redirect ( http . StatusFound , " " + prodID . Hex ( ) + " " + service . TypeID . Hex ( ) ) return } nURL , b := VS . getParamFromURL ( c , " " ) if ! b { return } numbernoURL , err := strconv . Atoi ( nURL ) VS . checkOperation ( c , " " , " " , " " , err ) step := steps [ numbernoURL ] trans , b := VS . mayLookForTranslation ( c , step . ID ) if b { step = trans . ( Step ) } var pagination [ ] Pagination var p Pagination for i := 0 ; i < len ( steps ) ; i ++ { p . Active = false p . Fakenumb = i + 1 pagination = append ( pagination , p ) } pagination [ numbernoURL ] . Active = true toolsHTML , materialsHTML := VS . getToolsAndMaterialsHTMLFromStep ( c , step ) render ( c , gin . H { " " : product , " " : step , " " : prodID , " " : pagination , " " : toolsHTML , " " : materialsHTML , " " : service . TypeID , } , " " ) }
Shows the screen with the Step of the specific Video course from the database
Shows the screen with the Step of the specific Video course from the database
// Get the /number param of the URL // Check for a translation in another language