Homework System for LMS

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Homework System for LMS
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    847
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    451

Building Homework System in LMS

Homework system is for assignments with file submission, deadlines, late submission handling, grading rubrics, and feedback. Instructors create assignment templates, students submit work, instructors grade with comments.

Assignment Model

interface Assignment {
  id: string;
  lessonId: string;
  title: string;
  description: string;
  dueDate: Date;
  maxScore: number;
  rubric?: Array<{ criterion: string; points: number }>;
  allowLateSubmission: boolean;
  lateDeductionPercent?: number;
  requiresApproval: boolean;
}

interface Submission {
  id: string;
  assignmentId: string;
  userId: string;
  files: Array<{ name: string; url: string; size: number }>;
  submittedAt: Date;
  isLate: boolean;
  grade?: number;
  feedback?: string;
  rubricScores?: Record<string, number>;
}

Create Assignment API

app.post('/api/assignments', authenticate, async (req, res) => {
  const { lessonId, title, description, dueDate, maxScore, rubric } = req.body;

  const assignment = await db.assignments.create({
    lessonId,
    title,
    description,
    dueDate: new Date(dueDate),
    maxScore,
    rubric: rubric || [],
    createdBy: req.user.id,
  });

  res.json(assignment);
});

// Student submission
app.post('/api/assignments/:assignmentId/submit', authenticate, upload.array('files'), async (req, res) => {
  const assignment = await db.assignments.findById(req.params.assignmentId);
  const existingSubmission = await db.submissions.findByUserAndAssignment(
    req.user.id, req.params.assignmentId
  );

  if (existingSubmission && !assignment.allowResubmission) {
    return res.status(409).json({ error: 'Already submitted' });
  }

  const now = new Date();
  const isLate = now > new Date(assignment.dueDate);

  const files = await Promise.all(
    req.files?.map(async (f) => ({
      name: f.originalname,
      url: await uploadToStorage(f),
      size: f.size,
    })) || []
  );

  const submission = await db.submissions.create({
    assignmentId: req.params.assignmentId,
    userId: req.user.id,
    files,
    submittedAt: now,
    isLate,
  });

  res.json(submission);
});

Grading Interface

function GradingPanel({ submission, assignment, onSave }) {
  const [rubricScores, setRubricScores] = useState<Record<string, number>>({});
  const [feedback, setFeedback] = useState(submission.feedback || '');
  const [grade, setGrade] = useState(submission.grade || 0);

  const totalRubricScore = Object.values(rubricScores).reduce((a, b) => a + b, 0);

  const handleSave = async () => {
    await fetch(`/api/submissions/${submission.id}/grade`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        grade,
        rubricScores,
        feedback,
      }),
    });
    onSave?.();
  };

  return (
    <div className="max-w-2xl mx-auto p-6 space-y-6">
      <div>
        <h3 className="font-semibold mb-4">Submission Files</h3>
        {submission.files.map(f => (
          <a key={f.url} href={f.url} className="block text-blue-600 hover:underline">
            {f.name}
          </a>
        ))}
      </div>

      {assignment.rubric?.length > 0 && (
        <div>
          <h3 className="font-semibold mb-4">Rubric</h3>
          {assignment.rubric.map(criterion => (
            <div key={criterion.criterion} className="mb-3">
              <label className="text-sm text-gray-600">{criterion.criterion} (max {criterion.points})</label>
              <input
                type="number"
                min="0"
                max={criterion.points}
                value={rubricScores[criterion.criterion] || 0}
                onChange={(e) => setRubricScores({
                  ...rubricScores,
                  [criterion.criterion]: Number(e.target.value),
                })}
                className="w-24 border rounded px-2 py-1"
              />
            </div>
          ))}
        </div>
      )}

      <div>
        <label className="block text-sm font-medium mb-2">Final Grade</label>
        <input
          type="number"
          min="0"
          max={assignment.maxScore}
          value={grade}
          onChange={(e) => setGrade(Number(e.target.value))}
          className="w-24 border rounded px-2 py-1"
        />
      </div>

      <div>
        <label className="block text-sm font-medium mb-2">Feedback</label>
        <textarea
          value={feedback}
          onChange={(e) => setFeedback(e.target.value)}
          rows={6}
          className="w-full border rounded px-3 py-2"
        />
      </div>

      <button
        onClick={handleSave}
        className="w-full bg-blue-600 text-white rounded-lg py-2 font-medium hover:bg-blue-700"
      >
        Save Grade
      </button>
    </div>
  );
}

Late Submission Handling

async function calculateGrade(submission: Submission, assignment: Assignment): Promise<number> {
  let finalGrade = submission.grade || 0;

  if (submission.isLate && assignment.lateDeductionPercent) {
    finalGrade = finalGrade * (1 - assignment.lateDeductionPercent / 100);
  }

  return Math.round(finalGrade * 100) / 100;
}

Timeframe

Basic assignment submission and grading — 1 week. With rubrics, late penalties, and detailed feedback — 2–3 weeks.