🎨 Мавзуъ
Ранг
Sapphire
Amethyst
Malachite
Amber
Замина

Бор мешавад...

D DOVTALAB
⭐ Миллӣ санҷиш · ИМТ · 2025–2026

Довталаб

Системаи расмии санҷиши дониш барои дохилшавӣ ба мактабҳои олӣ
🇹🇯 Тоҷикистон · ИМТ · 2025–2026

37
Саволҳо
5
Қисмҳо
0
Талабагон

📋 Охирин имтиҳонҳо

D

📋 Дастурамал

1
Қисматро интихоб кунед

5 қисмати имтиҳон пешниҳод мешавад.

2
Вақт: 45 дақиқа

Вақт тамом шуд — имтиҳон худ қатъ мешавад.

3
Ҷавобҳоро интихоб кунед

Ҳар савол 1 ҷавоби дуруст дорад.

4
Натиҷа

Дар охир хол ва ҷавобҳои дуруст нишон дода мешавад.

Қисматро интихоб кунед

Имтиҳон
45:00
1/10
Савол 1

📋 Саволҳо

Ҷорӣ
Ҷавоб дода
Нишон
📝

Пеш аз супурдан

0Ҷавоб дода
0Ҷавоб надода
0Нишон
🏆

Натиҷа

0%
0/0
Хол
0✓ Дуруст
0✗ Нодуруст
0— Надода

📊 Кабинети шахсӣ

U
Ном
email
0
Имтиҳон
0
Гузашт
Беҳтарин
Миёна

📊 Охирин натиҷаҳо

📈 Пешрафт аз рӯи қисм

🔐 Панели Admin

🛠 Панели Администратор

dovtalab.com · Supabase

0
Саволҳо
0
Қисмҳо
0
Корбарон
0
Имтиҳонҳо
Гузаштан %
Миёна %
#ТалабагПочтаҚисмХол%ҲолатВақтСанаАмал
#НомПочтаНақшИмтиҳонҳоСанаАмал

⏱ Танзимоти имтиҳон

🤖 Танзимоти AI

💡 Ollama: url/api/generate · OpenAI-compat: url/v1/chat/completions

🌐 Танзимоти сайт

🔑 Админ Email-ҳо

Email-ҳое, ки пас аз воридшавӣ ба панели Admin ҳидоят мешаванд.

⚠️ Хатарнок

Ин амалҳоро бодиққат иҷро кунед!

🗄️ Supabase SQL Setup

Ин SQL-ро дар Supabase → SQL Editor иҷро кунед то ҳамаи ҷадвалҳо сохта шаванд:

🌐 Кушодани Supabase
-- DOVTALAB: Full Supabase Schema
-- Run this in Supabase → SQL Editor → New query

-- 1. PROFILES TABLE
create table if not exists public.profiles (
  id uuid primary key references auth.users(id) on delete cascade,
  email text,
  name text,
  role text default 'student' check (role in ('student','admin','superadmin','banned')),
  created_at timestamptz default now()
);
alter table public.profiles enable row level security;
create policy "Users can view own profile" on public.profiles for select using (auth.uid() = id);
create policy "Users can update own profile" on public.profiles for update using (auth.uid() = id);
create policy "Admins can view all profiles" on public.profiles for select using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);
create policy "Admins can update all profiles" on public.profiles for update using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);

-- 2. SECTIONS TABLE
create table if not exists public.sections (
  id uuid primary key default gen_random_uuid(),
  name_tj text not null,
  name_ru text,
  description text,
  description_ru text,
  icon text default '📚',
  display_order int default 0,
  created_at timestamptz default now()
);
alter table public.sections enable row level security;
create policy "Anyone can view sections" on public.sections for select using (true);
create policy "Admins can manage sections" on public.sections for all using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);

-- 3. QUESTIONS TABLE
create table if not exists public.questions (
  id uuid primary key default gen_random_uuid(),
  section_id uuid references public.sections(id) on delete cascade,
  text_tj text not null,
  text_ru text,
  options jsonb not null default '[]',
  correct_option int not null default 0,
  difficulty int default 1 check (difficulty in (1,2,3)),
  display_order int default 0,
  created_at timestamptz default now()
);
alter table public.questions enable row level security;
create policy "Anyone can view questions" on public.questions for select using (true);
create policy "Admins can manage questions" on public.questions for all using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);

-- 4. EXAM RESULTS TABLE
create table if not exists public.exam_results (
  id uuid primary key default gen_random_uuid(),
  student_id uuid references auth.users(id) on delete set null,
  section_id uuid,
  section_name text,
  student_name text,
  correct_answers int default 0,
  total_questions int default 0,
  score_percentage int default 0,
  passed boolean default false,
  time_spent int default 0,
  submitted_at timestamptz default now()
);
alter table public.exam_results enable row level security;
create policy "Users can insert own results" on public.exam_results for insert with check (auth.uid() = student_id);
create policy "Users can view own results" on public.exam_results for select using (auth.uid() = student_id);
create policy "Admins can view all results" on public.exam_results for select using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);
create policy "Admins can delete results" on public.exam_results for delete using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);

-- 5. SETTINGS TABLE
create table if not exists public.settings (
  key text primary key,
  value text,
  updated_at timestamptz default now()
);
alter table public.settings enable row level security;
create policy "Anyone can view settings" on public.settings for select using (true);
create policy "Admins can manage settings" on public.settings for all using (
  exists (select 1 from public.profiles where id = auth.uid() and role in ('admin','superadmin'))
);

-- 6. AUTO-CREATE PROFILE ON SIGNUP
create or replace function public.handle_new_user()
returns trigger language plpgsql security definer set search_path = public as $$
begin
  insert into public.profiles (id, email, name, role)
  values (new.id, new.email, coalesce(new.raw_user_meta_data->>'name', split_part(new.email,'@',1)), 'student')
  on conflict (id) do nothing;
  return new;
end;
$$;
drop trigger if exists on_auth_user_created on auth.users;
create trigger on_auth_user_created after insert on auth.users
  for each row execute procedure public.handle_new_user();

-- 7. DEFAULT SETTINGS
insert into public.settings (key, value) values
  ('EXAM_MINUTES', '45'),
  ('PASS_PERCENT', '60'),
  ('SITE_NAME', 'Довталаб'),
  ('SITE_URL', 'https://dovtalab.com')
on conflict (key) do nothing;

-- Done! ✅

👤 Админ сохтан

Пас аз қайди корбар, нақши ӯро ба admin иваз кунед:

-- Paste the user's email below:
update public.profiles
set role = 'admin'
where email = 'your-admin@email.com';

🔍 Санҷиши пайваст

Санҷед, ки Supabase дуруст кор мекунад: