📜 ⬆️ ⬇️

Software Development for Saratov SFD'09: How It Was

In 2009, a rotation of personnel took place at SSSEU (Saratov Social and Economic University), as a result of which Saratov Software Freedom Day could no longer be held.
The baton of the SFD in Saratov picked up SSU.
The organizers of SSU were mainly people with a technical bias, and therefore this year Saratov SFD turned out to be much more technically advanced than before.
For the organization of SFD 2009, several software products were developed at SSU (up to Linux drivers!)

The organization Saratov SFD 2009 took into account the experience of previous years.
A special site was opened dedicated to this event sfd.sgu.ru

Work on the site


The site is actually a project in the free project management system Redmine cc.sgu.ru/redmine used in the Computational Center of the SSU cc.sgu.ru.
Redmine is written in Ruby on Rails and is currently considered the best Open Source BugTracker / Project Management System.
It was decided to make SFD a project in the ECS project management system (and not, for example, raise a separate instance of the same Redmine):


As a result, the organizers faced a number of problems:

')
These problems were solved by developing a Redmine plugin (no changes to the Redmine sources)
In the future, it is planned to refactor it (divided into separate plug-ins by function) and put it in opensource. I will give here only some pieces of code:

Adding CSS, removing unnecessary fields for non-participants of the project, and adding JS:

  1. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  2. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  3. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  4. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  5. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  6. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  7. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  8. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  9. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  10. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  11. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  12. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  13. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  14. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  15. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end
  16. def view_layouts_base_html_head (context = { }) ret= '' project = context[:project] baseurl = url_for (:controller => 'wiki' , :action => 'index' , :id => project) + '/../../..' if not project. nil ? if not User.current.member_of?(project) if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/stylesheets/non_member.css" ) ret+= stylesheet_link_tag (baseurl + "/themes/#{project.identifier}/stylesheets/non_member.css" ) end end if File .exists?( "#{RAILS_ROOT}/public/themes/#{project.identifier}/js/project.js" ) ret+= javascript_include_tag (baseurl + "/themes/#{project.identifier}/js/project.js" ) end end return ret end


Replacing the functions of the redmine plugin itself (per-project themes):

  1. require_dependency 'redmine / themes'
  2. module CSSPatch
  3. def self .included (base) #: nodoc:
  4. base.send (: include , InstanceMethods)
  5. base.class_eval do
  6. alias_method_chain: path_to_stylesheet,: perproject
  7. end
  8. end
  9. module InstanceMethods
  10. # Adds rates tab to the user administration page
  11. def path_to_stylesheet_with_perproject (source)
  12. th = String . new (Setting.ui_theme)
  13. if not @project. nil ?
  14. projecttheme = "#{RAILS_ROOT}/public/themes/#{@project.identifier}"
  15. if File .exists? (projecttheme)
  16. th = @ project.identifier
  17. end
  18. end
  19. @current_theme || = Redmine :: Themes.theme (th)
  20. stylesheet_path ((@current_theme && @ current_theme.stylesheets. include ? (source))?
  21. "/themes/#{@current_theme.dir}/stylesheets/#{source}" : source)
  22. end
  23. end
  24. end
  25. ApplicationHelper.send (: include , CSSPatch)

Electronic Kiosk Touch Screen Drivers


To popularize open source software, the possibility of direct interaction of visitors with this software, as well as for visual advertising of the event at SSU, it was decided to use the electronic kiosk remaining at the EC after the informatization project of Saratov municipal institutions.
image

And of course free software should have been on the kiosk.
But as it turned out, the iron filling of the kiosk was not very free ...
under the touchscreen GeneralTouch were very old proprietary drivers for Xfree86 graphics that are not compatible with modern Xorg and there was still a wild bike from some enthusiast linuxportal.ru/forums/index.php/m/81607/#msg_81607 (there is some service like there that masked this touchscreen under some other kind to which also old and third-party firewood), which also did not work ...
We decided, why not try to write normal firewood yourself? Especially since the drivers for the Elotouch touch screens are also included in the Xorg, which also connects to the COM port as our GeneralTouch and, besides, from that “cyclist” we got the protocol on which GeneralTouch works.
We opened the source code of xorg-x11-drv-elographics , we look and the format of the main Touch package is exactly the same! (We do not have the format of other GeneralTouch packages) ...
Removed initialization and other unnecessary pieces, compiled ... Earned!
Subsequently, our patch was adopted

Conclusion ... do not be afraid to program ... Take up practically useful and interesting tasks ...
Before writing firewood, looking at the source code of xorg-x11-drv-elographics, even some former Olympiad students from the CSC (Center for the Olympic Preparation of SSU) said :
" :(
- ."


Ps. As already written in the topic this year, Saratov SFD 2010 is also being conducted by Saratov State University. As they say welcome!

Source: https://habr.com/ru/post/102300/


All Articles