func (VS *Server) toViewVideoCourse(c *gin.Context, products VideoCourse) VideoCourseHTML {
	var prodHTML VideoCourseHTML
	prodHTML.ID = products.ID
	prodHTML.VideoCourseID = products.ID

	prodHTML.VideoCourseName = products.Name
	prodHTML.Description = products.Description
	prodHTML.Price = products.Price
	prodHTML.Photo = "/local/video-courses/" + products.Name + "/" + products.Photo

	//Get all Steps from DataBase
	steps := VS.getAllStepsFromSpecificVideoCourse(c, products.ID, "h_view", "toViewVideoCourse", "steps := VS.getAllStepsFromSpecificVideoCourse")
	prodHTML.Steps = len(steps)
	prodHTML.StepsID = nil
	for j := len(steps) - 1; 0 <= j; j-- {
		prodHTML.StepsID = append(prodHTML.StepsID, steps[j].ID.Hex())
	}
	return prodHTML
}
// This method takes a VideoCourses and returns a VideoCourseHTML
This method takes a VideoCourses and returns a VideoCourseHTML
// This method takes a VideoCourses and returns a VideoCourseHTML
func (VS *Server) toViewVideoCourse(c *gin.Context, products VideoCourse) VideoCourseHTML {
	var prodHTML VideoCourseHTML
	prodHTML.ID = products.ID
	prodHTML.VideoCourseID = products.ID
	prodHTML.VideoCourseName = products.Name
	prodHTML.Description = products.Description
	prodHTML.Price = products.Price
	prodHTML.Photo = "/local/video-courses/" + products.Name + "/" + products.Photo
	steps := VS.getAllStepsFromSpecificVideoCourse(c, products.ID, "h_view", "toViewVideoCourse", "steps := VS.getAllStepsFromSpecificVideoCourse")
	prodHTML.Steps = len(steps)
	prodHTML.StepsID = nil
	for j := len(steps) - 1; 0 <= j; j-- {
		prodHTML.StepsID = append(prodHTML.StepsID, steps[j].ID.Hex())
	}
	return prodHTML
}
func ( VS * Server ) toViewVideoCourse ( c * gin . Context , products VideoCourse ) VideoCourseHTML { var prodHTML VideoCourseHTML prodHTML . ID = products . ID prodHTML . VideoCourseID = products . ID prodHTML . VideoCourseName = products . Name prodHTML . Description = products . Description prodHTML . Price = products . Price prodHTML . Photo = " " + products . Name + " " + products . Photo steps := VS . getAllStepsFromSpecificVideoCourse ( c , products . ID , " " , " " , " " ) prodHTML . Steps = len ( steps ) prodHTML . StepsID = nil for j := len ( steps ) - 1 ; 0 <= j ; j -- { prodHTML . StepsID = append ( prodHTML . StepsID , steps [ j ] . ID . Hex ( ) ) } return prodHTML }
This method takes a VideoCourses and returns a VideoCourseHTML
This method takes a VideoCourses and returns a VideoCourseHTML
//Get all Steps from DataBase