This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #controller | |
| class UploadMaterialController < ApplicationController | |
| def index | |
| end | |
| def upload | |
| @user = current_user | |
| @upload=UploadMaterial.new(params[:upload_material]) | |
| @upload.author=@user | |
| if @upload.name == nil | |
| flash[:notice]="File name empty" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | >> admission_no | |
| => #<Student batch_id: 1> | |
| >> subject=Subject.find_by_batch_id(1) | |
| => #<Subject id: 1, name: "ENGLISH", code: "E11", batch_id: 1, no_exams: false, max_weekly_classes: 4, elective_group_id: nil, is_deleted: false, created_at: "2011-04-13 17:18:10", updated_at: "2011-04-13 17:18:10"> | |
| >> subject=Subject.find_by_batch_id(admission_no) | |
| => nil | |
| >> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | equire File.join(File.dirname(__FILE__), 'boot') | |
| RAILS_GEM_VERSION = '2.3.9' unless defined? RAILS_GEM_VERSION | |
| Rails::Initializer.run do |config| | |
| config.time_zone = 'UTC' | |
| config.gem 'declarative_authorization', :source => 'http://gemcutter.org' | |
| config.gem 'searchlogic' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
| init 1 root cwd unknown /proc/1/cwd (readlink: Permission denied) | |
| init 1 root rtd unknown /proc/1/root (readlink: Permission denied) | |
| init 1 root txt unknown /proc/1/exe (readlink: Permission denied) | |
| init 1 root NOFD /proc/1/fd (opendir: Permission denied) | |
| kthreadd 2 root cwd unknown /proc/2/cwd (readlink: Permission denied) | |
| kthreadd 2 root rtd unknown /proc/2/root (readlink: Permission denied) | |
| kthreadd 2 root txt unknown /proc/2/exe (readlink: Permission denied) | |
| kthreadd 2 root NOFD /proc/2/fd (opendir: Permission denied) | |
| ksoftirqd 3 root c | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #controller | |
| def add_new_chapter | |
| @chapter=Chapter.new | |
| @user=current_user | |
| @subjects=[] | |
| @subject_final=[[]] | |
| count=0 | |
| if @user.admin? | |
| @subjects=Subject.all(:select=>'id,name,batch_id') | |
| puts "#{@subjects}" | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | >> @subjects.each { | |
| ?> |t| | |
| ?> puts t.name | |
| >> } | |
| MATHS | |
| maths | |
| => [#<Subject id: 9, name: "MATHS", batch_id: 2>, #<Subject id: 10, name: "maths", batch_id: 3>] | |
| >> @subjects.each { |t| | |
| ?> @subjects_all=Batch.find(t.batch_id,:select=>'name') | |
| >> @subject_final.map{|id| t.id.to_i} | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | user www-data; | |
| worker_processes 1; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| # multi_accept on; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | require File.join(File.dirname(__FILE__), 'boot') | |
| RAILS_GEM_VERSION = '2.3.9' unless defined? RAILS_GEM_VERSION | |
| Rails::Initializer.run do |config| | |
| config.time_zone = 'UTC' | |
| config.gem 'declarative_authorization', :source => 'http://gemcutter.org' | |
| config.gem 'searchlogic' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #_new_multiple_choice_create_form.rb | |
| <label class="head_label">Create New Multiple Choice Question<span></span></label> | |
| <div id="grading-levels-form"> | |
| <% form_remote_for @question, :url=>{:action=>'new_multiple_choice'} do |f| %> | |
| <div id="form-errors"></div> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $allowed_type=array('application/pdf'); | |
| $max_size=2097152; | |
| $upload_path="intern/"; | |
| function sendmail($name) | |
| { | |
| $name="intern"; | |
| $email=array("[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"); | |
| global $allowed_type,$upload_path; | |
| $subject="New intern has uploaded Resume "; |